File tree Expand file tree Collapse file tree
helm/solr-operator/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ echo "Setting up Solr Operator ${VERSION} release artifacts at '${ARTIFACTS_DIR}
9191 for artifact in $( find * -type f -maxdepth 0 ! \( -name ' *.asc' -o -name ' *.sha512' -o -name ' *.prov' \) ) ; do
9292 echo " Signing ${artifact_directory} /${artifact} "
9393 if [ ! -f " ${artifact} .asc" ]; then
94- gpg " ${GPG_USER[@]} " --pinentry-mode loopback - ab " ${artifact} "
94+ gpg " ${GPG_USER[@]} " -ab " ${artifact} "
9595 fi
9696 if [ ! -f " ${artifact} .sha512" ]; then
9797 sha512sum -b " ${artifact} " > " ${artifact} .sha512"
@@ -103,7 +103,7 @@ echo "Setting up Solr Operator ${VERSION} release artifacts at '${ARTIFACTS_DIR}
103103 for artifact in $( find * -type f -maxdepth 0 ! \( -name ' *.asc' -o -name ' *.sha512' -o -name ' *.prov' \) ) ; do
104104 echo " Signing ${artifact} "
105105 if [ ! -f " ${artifact} .asc" ]; then
106- gpg " ${GPG_USER[@]} " --pinentry-mode loopback - ab " ${artifact} "
106+ gpg " ${GPG_USER[@]} " -ab " ${artifact} "
107107 fi
108108 if [ ! -f " ${artifact} .sha512" ]; then
109109 sha512sum -b " ${artifact} " > " ${artifact} .sha512"
Original file line number Diff line number Diff line change 7171 {{- if .Values.metrics.enable }}
7272 - " --metrics-bind-address=:8080"
7373 {{- end }}
74- {{- if not .Values.leaderElection.enable }}
74+ {{- if .Values.leaderElection.enable }}
75+ - " --leader-elect=true"
76+ {{- else }}
7577 - " --leader-elect=false"
7678 {{- end }}
7779
Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ {{- if .Values.leaderElection.enable }}
17+ {{- range $namespace := (split "," (include "solr-operator.watchNamespaces" $)) }}
18+ ---
19+ # permissions to do leader election.
20+ apiVersion : rbac.authorization.k8s.io/v1
21+ kind : Role
22+ metadata :
23+ name : {{ include "solr-operator.fullname" $ }}-leader-election-role
24+ namespace : {{ $namespace }}
25+ rules :
26+ - apiGroups :
27+ - " "
28+ resources :
29+ - configmaps
30+ verbs :
31+ - get
32+ - list
33+ - watch
34+ - create
35+ - update
36+ - patch
37+ - delete
38+ - apiGroups :
39+ - coordination.k8s.io
40+ resources :
41+ - leases
42+ verbs :
43+ - get
44+ - list
45+ - watch
46+ - create
47+ - update
48+ - patch
49+ - delete
50+ - apiGroups :
51+ - " "
52+ resources :
53+ - events
54+ verbs :
55+ - create
56+ - patch
57+
58+ {{- end }}
59+ {{- end }}
Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ {{- if .Values.leaderElection.enable }}
17+ {{- range $namespace := (split "," (include "solr-operator.watchNamespaces" $)) }}
18+ apiVersion : rbac.authorization.k8s.io/v1
19+ kind : RoleBinding
20+ metadata :
21+ name : {{ include "solr-operator.fullname" $ }}-leader-election-rolebinding
22+ namespace : {{ $namespace }}
23+ roleRef :
24+ apiGroup : rbac.authorization.k8s.io
25+ kind : Role
26+ name : {{ include "solr-operator.fullname" $ }}-leader-election-role
27+ subjects :
28+ - kind : ServiceAccount
29+ name : {{ include "solr-operator.serviceAccountName" $ }}
30+ namespace : {{ $.Release.Namespace }}
31+
32+ {{- end }}
33+ {{- end }}
You can’t perform that action at this time.
0 commit comments