From 9ee20fd30a0e8e1296535da1e7e0d96922e0969d Mon Sep 17 00:00:00 2001 From: Thomas Way Date: Thu, 11 May 2023 10:52:02 +0100 Subject: [PATCH] do not propagate labels by default Deployment tools like kubectl ApplySets use labels to keep track of objects they manage. Propagating those labels where a tool is actively pruning resources will cause resources managed by the operator to be pruned also. https://kubernetes.io/blog/2023/05/09/introducing-kubectl-applyset-pruning/ Fixes #592 --- operator/redisfailover/handler.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/operator/redisfailover/handler.go b/operator/redisfailover/handler.go index 6a03afd56..95c26d53f 100644 --- a/operator/redisfailover/handler.go +++ b/operator/redisfailover/handler.go @@ -106,9 +106,6 @@ func (r *RedisFailoverHandler) getLabels(rf *redisfailoverv1.RedisFailover) map[ } } } - } else { - // If no whitelist is specified then don't filter the labels. - filteredCustomLabels = rf.Labels } return util.MergeLabels(defaultLabels, dynLabels, filteredCustomLabels) }