Skip to content
Snippets Groups Projects
Commit 3de4fe87 authored by erthalion's avatar erthalion
Browse files

WIP: pass metrics env to spilo image

parent c70905ae
No related tags found
No related merge requests found
...@@ -558,6 +558,31 @@ func (c *Cluster) generateSpiloPodEnvVars(uid types.UID, spiloConfiguration stri ...@@ -558,6 +558,31 @@ func (c *Cluster) generateSpiloPodEnvVars(uid types.UID, spiloConfiguration stri
envVars = append(envVars, c.generateCloneEnvironment(cloneDescription)...) envVars = append(envVars, c.generateCloneEnvironment(cloneDescription)...)
} }
if c.OpConfig.MetricsHost != "" {
envVars = append(envVars, []v1.EnvVar{
{
Name: "METRICS_HOST",
Value: c.OpConfig.MetricHostName,
},
{
Name: "METRICS_USER",
Value: c.OpConfig.MetricUserName,
},
{
Name: "METRICS_PASSWORD",
ValueFrom: &v1.EnvVarSource{
SecretKeyRef: &v1.SecretKeySelector{
LocalObjectReference: v1.LocalObjectReference{
Name: c.credentialSecretName(c.OpConfig.MetricUserName),
},
Key: "password",
},
},
},
})
}
if len(customPodEnvVarsList) > 0 { if len(customPodEnvVarsList) > 0 {
envVars = append(envVars, customPodEnvVarsList...) envVars = append(envVars, customPodEnvVarsList...)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment