Skip to content
Snippets Groups Projects
Unverified Commit 2943b3d6 authored by Sergio Ballesteros's avatar Sergio Ballesteros Committed by GitHub
Browse files

Merge pull request #461 from pych/sentinel-exporter-env

Sentinel exporter env
parents fa0d9d7f a5d43bd9
Branches
Tags
Loading
......@@ -670,7 +670,21 @@ func createSentinelExporterContainer(rf *redisfailoverv1.RedisFailover) corev1.C
ImagePullPolicy: pullPolicy(rf.Spec.Sentinel.Exporter.ImagePullPolicy),
SecurityContext: getContainerSecurityContext(rf.Spec.Sentinel.Exporter.ContainerSecurityContext),
Args: rf.Spec.Sentinel.Exporter.Args,
Env: rf.Spec.Sentinel.Exporter.Env,
Env: append(rf.Spec.Sentinel.Exporter.Env, corev1.EnvVar{
Name: "REDIS_ALIAS",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "metadata.name",
},
},
}, corev1.EnvVar{
Name: "REDIS_EXPORTER_WEB_LISTEN_ADDRESS",
Value: fmt.Sprintf("0.0.0.0:%[1]v", sentinelExporterPort),
}, corev1.EnvVar{
Name: "REDIS_ADDR",
Value: "redis://localhost:26379",
},
),
Ports: []corev1.ContainerPort{
{
Name: "metrics",
......@@ -680,6 +694,7 @@ func createSentinelExporterContainer(rf *redisfailoverv1.RedisFailover) corev1.C
},
Resources: resources,
}
return container
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment