plumdog opened a new pull request, #444:
URL: https://github.com/apache/solr-operator/pull/444

   Found that I was getting errors like:
   ```
   error retrieving resource lock mynamespace1/88488bdc.solr.apache.org: 
leases.coordination.k8s.io "88488bdc.solr.apache.org" is forbidden: User 
"system:serviceaccount:system:solr-operator" cannot get resource "leases" in 
API group "coordination.k8s.io" in the namespace "mynamespace1"
   ```
   I have deployed with the following values:
   ```
   watchNamespaces: mynamespace1,mynamespace2
   ```
   When I did a helm diff to switch off leader elections, I saw something like 
the following in the diff:
   ```
   - # Source: solr-operator/templates/leader_election_role_binding.yaml
   ...
   - apiVersion: rbac.authorization.k8s.io/v1
   - kind: RoleBinding
   - metadata:
   -   name: solr-operator-leader-election-rolebinding
   -   namespace: mynamespace1
   - roleRef:
   -   apiGroup: rbac.authorization.k8s.io
   -   kind: Role
   -   name: solr-operator-leader-election-role
   - subjects:
   -   - kind: ServiceAccount
   -     name: solr-operator
   -     namespace: system
   - apiVersion: rbac.authorization.k8s.io/v1
   - kind: RoleBinding
   - metadata:
   -   name: solr-operator-leader-election-rolebinding
   -   namespace: mynamespace2
   - roleRef:
   -   apiGroup: rbac.authorization.k8s.io
   -   kind: Role
   -   name: solr-operator-leader-election-role
   - subjects:
   -   - kind: ServiceAccount
   -     name: solr-operator
   -     namespace: system
   ```
   Which looks right, except for the missing `---`, which is what this PR adds.
   
   My workaround is to run with:
   ```yaml
   leaderElection:
     enable: false
   replicaCount: 1
   ```
   (1 is the default number of replicas anyway, but I imagine strange things 
happen with multiple replicas and no leader election, so important it is set to 
1)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to