1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-08 10:04:09 +00:00

test/e2e: Fix wrong override of Prometheus config reloader arg

The e2e framework overrides the Prometheus config reloader argument of
the Prometheus Operator. Instead of overriding the correct argument, it
had been overriding the config reloader argument, resulting in two
specifications of the Prometheus config reloader argument one shadowing
the other.

This has only now caused problems as previously v0.21.0 would win, which
is present on quay.io. With the new release (v0.22.0) it fails as the
Prometheus config reloader v0.22.0 is not yet present on quay.io.

This patch resolves the wrong override and thereby fixes the e2e tests.
This commit is contained in:
Max Leonard Inden 2018-07-09 18:16:38 +02:00
parent 3db93ccdb6
commit ca3ba97b34
No known key found for this signature in database
GPG key ID: 5403C5464810BC26

View file

@ -136,9 +136,14 @@ func (f *Framework) setupPrometheusOperator(opImage string) error {
repoAndTag,
)
}
deploy.Spec.Template.Spec.Containers[0].Args[1] = "--prometheus-config-reloader=" +
"quay.io/coreos/prometheus-config-reloader:" +
repoAndTag[1]
// Override Prometheus config reloader image
for i, arg := range deploy.Spec.Template.Spec.Containers[0].Args {
if strings.Contains(arg, "--prometheus-config-reloader=") {
deploy.Spec.Template.Spec.Containers[0].Args[i] = "--prometheus-config-reloader=" +
"quay.io/coreos/prometheus-config-reloader:" +
repoAndTag[1]
}
}
}
deploy.Spec.Template.Spec.Containers[0].Args = append(deploy.Spec.Template.Spec.Containers[0].Args, "--log-level=all")