ProxySQL missing env variables
@@ -147,32 +147,6 @@ func (c *Proxy) SidecarContainers(spec *api.PodSpec, secrets string) []corev1.Co
SecretKeyRef: app.SecretKeySelector(secrets, "monitor"),
},
},
- {
- Name: "DB_TYPE",
- Value: "mysql",
- },
- {
- Name: "DB_USER",
- Value: "monitor",
- },
- {
- Name: "DB_PASSWORD",
- ValueFrom: &corev1.EnvVarSource{
- SecretKeyRef: app.SecretKeySelector(secrets, "monitor"),
- },
- },
- {
- Name: "DB_CLUSTER",
- Value: app.Name,
- },
- {
- Name: "DB_HOST",
- Value: c.labels["app.kubernetes.io/instance"] + "-" + c.labels["app.kubernetes.io/component"],
- },
- {
- Name: "DB_PORT",
- Value: "3306",
- },
},
},
@@ -235,6 +209,28 @@ func (c *Proxy) PMMContainer(spec *api.PMMSpec, secrets string) corev1.Container
SecretKeyRef: app.SecretKeySelector(secrets, "monitor"),
},
},
+ {
+ Name: "DB_USER",
+ Value: "monitor",
+ },
+ {
+ Name: "DB_PASSWORD",
+ ValueFrom: &corev1.EnvVarSource{
+ SecretKeyRef: app.SecretKeySelector(secrets, "monitor"),
+ },
+ },
+ {
+ Name: "DB_CLUSTER",
+ Value: app.Name,
+ },
+ {
+ Name: "DB_HOST",
+ Value: c.labels["app.kubernetes.io/instance"] + "-" + c.labels["app.kubernetes.io/component"],
+ },
+ {
+ Name: "DB_PORT",
+ Value: "3306",
+ },
}
ct.Env = append(ct.Env, pmmEnvs...)
