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 92782c5 Allow ZkConnectionStrings without ports, log when statefulset
is skipped (#429)
92782c5 is described below
commit 92782c5ee7aa4bf0eb72163b3bc941c04128367d
Author: Houston Putman <[email protected]>
AuthorDate: Wed Jun 8 11:35:28 2022 -0400
Allow ZkConnectionStrings without ports, log when statefulset is skipped
(#429)
---
controllers/solrcloud_controller.go | 6 ++++--
helm/solr-operator/Chart.yaml | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/controllers/solrcloud_controller.go
b/controllers/solrcloud_controller.go
index 2270353..89fbd06 100644
--- a/controllers/solrcloud_controller.go
+++ b/controllers/solrcloud_controller.go
@@ -288,9 +288,11 @@ func (r *SolrCloudReconciler) Reconcile(ctx
context.Context, req ctrl.Request) (
}
}
- // Only create stateful set if zkConnectionString can be found (must
contain host and port)
- if !strings.Contains(newStatus.ZkConnectionString(), ":") {
+ // Only create stateful set if zkConnectionString can be found (must
contain a host before the chroot)
+ zkConnectionString := newStatus.ZkConnectionString()
+ if len(zkConnectionString) < 2 || strings.HasPrefix(zkConnectionString,
"/") {
blockReconciliationOfStatefulSet = true
+ logger.Info("Will not create/update the StatefulSet because the
zookeeperConnectionString has no host", "zookeeperConnectionString",
zkConnectionString)
}
// Holds TLS config info for a server cert and optionally a client cert
as well
diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index a5bee09..c947820 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -115,6 +115,13 @@ annotations:
links:
- name: Github PR
url: https://github.com/apache/solr-operator/pull/444
+ - kind: fixed
+ description: SolrClouds now support a ZookeeperConnection address
without the port (uses 2181 by default). The operator will also log whenever
the statefulSet is skipped because of the zkConnectionString.
+ links:
+ - name: Github Issue
+ url: https://github.com/apache/solr-operator/issues/428
+ - name: Github PR
+ url: https://github.com/apache/solr-operator/pull/429
artifacthub.io/images: |
- name: solr-operator
image: apache/solr-operator:v0.6.0-prerelease