From 0915ebf5e499996b87d77d13c5e9aa1c7694e433 Mon Sep 17 00:00:00 2001 From: Aaron Kuehler Date: Wed, 3 Jan 2024 16:26:47 -0500 Subject: [PATCH] Remove haproxy pods from headless service --- operator/redisfailover/service/constants.go | 1 + operator/redisfailover/service/generator.go | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/operator/redisfailover/service/constants.go b/operator/redisfailover/service/constants.go index bce35a0a9..c03f4d27a 100644 --- a/operator/redisfailover/service/constants.go +++ b/operator/redisfailover/service/constants.go @@ -16,6 +16,7 @@ const ( const ( baseName = "rf" + haproxyRoleName = "haproxy" sentinelName = "s" sentinelRoleName = "sentinel" sentinelConfigFileName = "sentinel.conf" diff --git a/operator/redisfailover/service/generator.go b/operator/redisfailover/service/generator.go index f7c67e48d..7d701e889 100644 --- a/operator/redisfailover/service/generator.go +++ b/operator/redisfailover/service/generator.go @@ -58,11 +58,8 @@ func generateHAProxyDeployment(rf *redisfailoverv1.RedisFailover, labels map[str namespace := rf.Namespace - labels = util.MergeLabels(labels, map[string]string{ - "app.kubernetes.io/component": "redis", - }) - - selectorLabels := util.MergeLabels(labels, generateComponentLabel("haproxy")) + labels = util.MergeLabels(labels, generateComponentLabel(haproxyRoleName)) + selectorLabels := util.MergeLabels(labels) volumeMounts := []corev1.VolumeMount{ {