This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 54b4fe3 Fix imagePullSecrets bug when updating Zookeeper Clusters
(#344)
54b4fe3 is described below
commit 54b4fe315d5155c759522c7b7cb979d96de3d7a0
Author: Houston Putman <[email protected]>
AuthorDate: Wed Oct 13 17:01:37 2021 -0400
Fix imagePullSecrets bug when updating Zookeeper Clusters (#344)
---
controllers/util/zk_util.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/controllers/util/zk_util.go b/controllers/util/zk_util.go
index 1e740f9..01fefd8 100644
--- a/controllers/util/zk_util.go
+++ b/controllers/util/zk_util.go
@@ -295,6 +295,12 @@ func CopyZookeeperClusterFields(from, to
*zk_api.ZookeeperCluster, logger logr.L
to.Spec.Pod.ServiceAccountName =
from.Spec.Pod.ServiceAccountName
}
+ if !DeepEqualWithNils(to.Spec.Pod.ImagePullSecrets,
from.Spec.Pod.ImagePullSecrets) {
+ logger.Info("Update required because field changed", "field",
"Spec.Pod.ImagePullSecrets", "from", to.Spec.Pod.ImagePullSecrets, "to",
from.Spec.Pod.ImagePullSecrets)
+ requireUpdate = true
+ to.Spec.Pod.ImagePullSecrets = from.Spec.Pod.ImagePullSecrets
+ }
+
if !DeepEqualWithNils(to.Spec.KubernetesClusterDomain,
from.Spec.KubernetesClusterDomain) && from.Spec.KubernetesClusterDomain != "" {
logger.Info("Update required because field changed", "field",
"Spec.KubernetesClusterDomain", "from", to.Spec.KubernetesClusterDomain, "to",
from.Spec.KubernetesClusterDomain)
requireUpdate = true