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 }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
rules:
|
rules:
|
||||||
# Patroni needs to watch and manage endpoints
|
# 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:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -23,6 +44,7 @@ rules:
|
||||||
- patch
|
- patch
|
||||||
- update
|
- update
|
||||||
- watch
|
- watch
|
||||||
|
{{- end }}
|
||||||
# Patroni needs to watch pods
|
# Patroni needs to watch pods
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,15 @@ rules:
|
||||||
- patch
|
- patch
|
||||||
- update
|
- update
|
||||||
- watch
|
- watch
|
||||||
# to manage endpoints which are also used by Patroni
|
# to manage endpoints/configmaps which are also used by Patroni
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
{{- if toString .Values.configGeneral.kubernetes_use_configmaps | eq "true" }}
|
||||||
|
- configmaps
|
||||||
|
{{- else }}
|
||||||
- endpoints
|
- endpoints
|
||||||
|
{{- end }}
|
||||||
verbs:
|
verbs:
|
||||||
- create
|
- create
|
||||||
- delete
|
- delete
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue