1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 03:38:43 +00:00

Chore: Remove outdated code from AM Statefulset generation ()

This commit is contained in:
M Viswanath Sai 2024-11-28 15:58:55 +05:30 committed by GitHub
parent 1f3993ebf4
commit bb4514e0d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View file

@ -616,12 +616,8 @@ func makeStatefulSetSpec(logger *slog.Logger, a *monitoringv1.Alertmanager, conf
volumes = append(volumes, configVol...)
amVolumeMounts = append(amVolumeMounts, configMount...)
// To avoid breaking users deploying an old version of the config-reloader image.
// TODO: remove the if condition after v0.72.0.
if a.Spec.Web != nil {
configReloaderWebConfigFile = confArg.Value
configReloaderVolumeMounts = append(configReloaderVolumeMounts, configMount...)
}
configReloaderWebConfigFile = confArg.Value
configReloaderVolumeMounts = append(configReloaderVolumeMounts, configMount...)
}
finalSelectorLabels := config.Labels.Merge(podSelectorLabels)

View file

@ -645,6 +645,7 @@ func TestMakeStatefulSetSpecNotificationTemplates(t *testing.T) {
expectedArgsConfigReloader := []string{
"--listen-address=:8080",
"--web-config-file=/etc/alertmanager/web_config/web-config.yaml",
"--reload-url=http://localhost:9093/-/reload",
"--config-file=/etc/alertmanager/config/alertmanager.yaml.gz",
"--config-envsubst-file=/etc/alertmanager/config_out/alertmanager.env.yaml",
@ -1024,6 +1025,7 @@ func TestConfigReloader(t *testing.T) {
expectedArgsConfigReloader := []string{
"--listen-address=:8080",
"--web-config-file=/etc/alertmanager/web_config/web-config.yaml",
"--reload-url=http://localhost:9093/-/reload",
"--config-file=/etc/alertmanager/config/alertmanager.yaml.gz",
"--config-envsubst-file=/etc/alertmanager/config_out/alertmanager.env.yaml",