You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2021/04/23 21:29:54 UTC

[solr-operator] branch release-0.3 updated: Changes to address issues found in v0.3.0 RC2 (#262)

This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch release-0.3
in repository https://gitbox.apache.org/repos/asf/solr-operator.git


The following commit(s) were added to refs/heads/release-0.3 by this push:
     new ee969fc  Changes to address issues found in v0.3.0 RC2 (#262)
ee969fc is described below

commit ee969fc7bcd478cd107cb94e6170fcb8481600c4
Author: Houston Putman <ho...@apache.org>
AuthorDate: Fri Apr 23 14:46:43 2021 -0500

    Changes to address issues found in v0.3.0 RC2 (#262)
    
    - Ability to not use the Zookeeper Operator in the Solr Operator Helm Chart
    - Add missing RBAC for finalizers (#263)
---
 config/rbac/role.yaml                        | 6 ++++++
 controllers/solrcloud_controller.go          | 5 +++--
 helm/solr-operator/templates/deployment.yaml | 8 +++++---
 helm/solr-operator/templates/role.yaml       | 6 ++++++
 4 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml
index a038fc9..30d176f 100644
--- a/config/rbac/role.yaml
+++ b/config/rbac/role.yaml
@@ -215,6 +215,12 @@ rules:
 - apiGroups:
   - solr.apache.org
   resources:
+  - solrclouds/finalizers
+  verbs:
+  - update
+- apiGroups:
+  - solr.apache.org
+  resources:
   - solrclouds/status
   verbs:
   - get
diff --git a/controllers/solrcloud_controller.go b/controllers/solrcloud_controller.go
index f625b9c..c2dae2f 100644
--- a/controllers/solrcloud_controller.go
+++ b/controllers/solrcloud_controller.go
@@ -73,11 +73,12 @@ func UseZkCRD(useCRD bool) {
 // +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete
 // +kubebuilder:rbac:groups="",resources=configmaps/status,verbs=get;update;patch
 // +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=get;list;watch;delete
-// +kubebuilder:rbac:groups=solr.apache.org,resources=solrclouds,verbs=get;list;watch;create;update;patch;delete
-// +kubebuilder:rbac:groups=solr.apache.org,resources=solrclouds/status,verbs=get;update;patch
 // +kubebuilder:rbac:groups=zookeeper.pravega.io,resources=zookeeperclusters,verbs=get;list;watch;create;update;patch;delete
 // +kubebuilder:rbac:groups=zookeeper.pravega.io,resources=zookeeperclusters/status,verbs=get;update;patch
 // +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;patch;delete
+// +kubebuilder:rbac:groups=solr.apache.org,resources=solrclouds,verbs=get;list;watch;create;update;patch;delete
+// +kubebuilder:rbac:groups=solr.apache.org,resources=solrclouds/status,verbs=get;update;patch
+// +kubebuilder:rbac:groups=solr.apache.org,resources=solrclouds/finalizers,verbs=update
 
 func (r *SolrCloudReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
 	_ = context.Background()
diff --git a/helm/solr-operator/templates/deployment.yaml b/helm/solr-operator/templates/deployment.yaml
index 7f800d7..093749b 100644
--- a/helm/solr-operator/templates/deployment.yaml
+++ b/helm/solr-operator/templates/deployment.yaml
@@ -46,10 +46,12 @@ spec:
         image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         args:
-        # TODO: v0.4.0 - Remove (eq "true" .Values.useZkOperator)
-        {{- if or ".Values.zookeeper-operator.install" (or ".Values.zookeeper-operator.use" (eq .Values.useZkOperator "true")) }}
+        # DEPRECATION: v0.4.0 - Remove (eq "true" .Values.useZkOperator)
+        {{- if or (index .Values "zookeeper-operator" "install") (or (index .Values "zookeeper-operator" "use") (eq .Values.useZkOperator "true")) }}
         - -zk-operator=true
-        {{- end}}
+        {{- else }}
+        - -zk-operator=false
+        {{- end }}
         {{- if .Values.watchNamespaces }}
         - --watch-namespaces={{- include "solr-operator.watchNamespaces" . -}}
         {{- end }}
diff --git a/helm/solr-operator/templates/role.yaml b/helm/solr-operator/templates/role.yaml
index 88ce35d..a6790ac 100644
--- a/helm/solr-operator/templates/role.yaml
+++ b/helm/solr-operator/templates/role.yaml
@@ -219,6 +219,12 @@ rules:
 - apiGroups:
   - solr.apache.org
   resources:
+  - solrclouds/finalizers
+  verbs:
+  - update
+- apiGroups:
+  - solr.apache.org
+  resources:
   - solrclouds/status
   verbs:
   - get