helm-chart: allow configmaps instead of endpoints for leader elections… (#1037)
* helm-chart: allow configmaps instead of endpoints if leader elections uses the configmaps method * helm-chart: allow endpoints get even if config maps are used * helm-chart: allow configmaps instead of endpoints on the operator role too. Co-authored-by: Enno Boland <mail@eboland.de>
This commit is contained in:
parent
fbd04896c2
commit
4b90809ade
|
|
@ -10,6 +10,27 @@ metadata:
|
|||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
rules:
|
||||
# Patroni needs to watch and manage endpoints
|
||||
{{- if toString .Values.configGeneral.kubernetes_use_configmaps | eq "true" }}
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
{{- else }}
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
|
|
@ -23,6 +44,7 @@ rules:
|
|||
- patch
|
||||
- update
|
||||
- watch
|
||||
{{- end }}
|
||||
# Patroni needs to watch pods
|
||||
- apiGroups:
|
||||
- ""
|
||||
|
|
|
|||
|
|
@ -63,11 +63,15 @@ rules:
|
|||
- patch
|
||||
- update
|
||||
- watch
|
||||
# to manage endpoints which are also used by Patroni
|
||||
# to manage endpoints/configmaps which are also used by Patroni
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
{{- if toString .Values.configGeneral.kubernetes_use_configmaps | eq "true" }}
|
||||
- configmaps
|
||||
{{- else }}
|
||||
- endpoints
|
||||
{{- end }}
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
|
|
|
|||
Loading…
Reference in New Issue