Closed elrondwong closed 6 months ago
diff --git a/k8sutils/statefulset.go b/k8sutils/statefulset.go
index 7df1aa3a..6333c10b 100644
--- a/k8sutils/statefulset.go
+++ b/k8sutils/statefulset.go
@@ -477,6 +477,19 @@ func enableRedisMonitoring(params containerParameters) corev1.Container {
if params.RedisExporterResources != nil {
exporterDefinition.Resources = *params.RedisExporterResources
}
+ if params.EnabledPassword != nil && *params.EnabledPassword {
+ exporterDefinition.Env = append(exporterDefinition.Env, corev1.EnvVar{
+ Name: "REDIS_PASSWORD",
+ ValueFrom: &corev1.EnvVarSource{
+ SecretKeyRef: &corev1.SecretKeySelector{
+ LocalObjectReference: corev1.LocalObjectReference{
+ Name: *params.SecretName,
+ },
+ Key: *params.SecretKey,
+ },
+ },
+ })
+ }
return exporterDefinition
}
Do this, manual test pass.
curl xxxx:9121/metrics