postgres-pod clusterrole (#832)
* define postgres-pod clusterrole and align rbac in chart * align UI chart rbac with operator and update doc * operator RBAC needs podsecuritypolicy to grant it to postgres-pod
This commit is contained in:
parent
4b440e59de
commit
aea9e9bd33
|
|
@ -24,6 +24,13 @@ If release name contains chart name it will be used as a full name.
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a service account name.
|
||||||
|
*/}}
|
||||||
|
{{- define "postgres-operator-ui.serviceAccountName" -}}
|
||||||
|
{{ default (include "postgres-operator-ui.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create chart name and version as used by the chart label.
|
Create chart name and version as used by the chart label.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
{{ if .Values.rbac.create }}
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ include "postgres-operator-ui.serviceAccountName" . }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }}
|
||||||
|
helm.sh/chart: {{ template "postgres-operator-ui.chart" . }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- acid.zalan.do
|
||||||
|
resources:
|
||||||
|
- postgresqls
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- statefulsets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- namespaces
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
{{ end }}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{ if .Values.rbac.create }}
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "postgres-operator-ui.serviceAccountName" . }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }}
|
||||||
|
helm.sh/chart: {{ template "postgres-operator-ui.chart" . }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: {{ include "postgres-operator-ui.serviceAccountName" . }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "postgres-operator-ui.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{ end }}
|
||||||
|
|
@ -20,7 +20,7 @@ spec:
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
team: "acid" # Parameterize?
|
team: "acid" # Parameterize?
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ template "postgres-operator-ui.name" . }}
|
serviceAccountName: {{ include "postgres-operator-ui.serviceAccountName" . }}
|
||||||
containers:
|
containers:
|
||||||
- name: "service"
|
- name: "service"
|
||||||
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
|
@ -45,8 +45,8 @@ spec:
|
||||||
value: {{ .Values.envs.targetNamespace }}
|
value: {{ .Values.envs.targetNamespace }}
|
||||||
- name: "TEAMS"
|
- name: "TEAMS"
|
||||||
value: |-
|
value: |-
|
||||||
[
|
[
|
||||||
"acid"
|
"acid"
|
||||||
]
|
]
|
||||||
- name: "OPERATOR_UI_CONFIG"
|
- name: "OPERATOR_UI_CONFIG"
|
||||||
value: |-
|
value: |-
|
||||||
|
|
@ -66,4 +66,4 @@ spec:
|
||||||
"9.6",
|
"9.6",
|
||||||
"9.5"
|
"9.5"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,81 +1,11 @@
|
||||||
|
{{ if .Values.serviceAccount.create }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "postgres-operator-ui.name" . }}
|
name: {{ include "postgres-operator-ui.serviceAccountName" . }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }}
|
app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }}
|
||||||
helm.sh/chart: {{ template "postgres-operator-ui.chart" . }}
|
helm.sh/chart: {{ template "postgres-operator-ui.chart" . }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{ end }}
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: {{ template "postgres-operator-ui.name" . }}
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }}
|
|
||||||
helm.sh/chart: {{ template "postgres-operator-ui.chart" . }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- acid.zalan.do
|
|
||||||
resources:
|
|
||||||
- postgresqls
|
|
||||||
verbs:
|
|
||||||
- create
|
|
||||||
- delete
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- patch
|
|
||||||
- update
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- pods
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- services
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- apiGroups:
|
|
||||||
- apps
|
|
||||||
resources:
|
|
||||||
- statefulsets
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- namespaces
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: {{ template "postgres-operator-ui.name" . }}
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }}
|
|
||||||
helm.sh/chart: {{ template "postgres-operator-ui.chart" . }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: {{ template "postgres-operator-ui.name" . }}
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
# note: the cluster role binding needs to be defined
|
|
||||||
# for every namespace the operator-ui service account lives in.
|
|
||||||
name: {{ template "postgres-operator-ui.name" . }}
|
|
||||||
namespace: {{ .Release.Namespace }}
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,17 @@ image:
|
||||||
tag: v1.2.0
|
tag: v1.2.0
|
||||||
pullPolicy: "IfNotPresent"
|
pullPolicy: "IfNotPresent"
|
||||||
|
|
||||||
|
rbac:
|
||||||
|
# Specifies whether RBAC resources should be created
|
||||||
|
create: true
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a ServiceAccount should be created
|
||||||
|
create: true
|
||||||
|
# The name of the ServiceAccount to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name:
|
||||||
|
|
||||||
# configure UI pod resources
|
# configure UI pod resources
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
|
@ -22,7 +33,7 @@ resources:
|
||||||
|
|
||||||
# configure UI ENVs
|
# configure UI ENVs
|
||||||
envs:
|
envs:
|
||||||
# IMPORTANT: While operator chart and UI chart are idendependent, this is the interface between
|
# IMPORTANT: While operator chart and UI chart are idendependent, this is the interface between
|
||||||
# UI and operator API. Insert the service name of the operator API here!
|
# UI and operator API. Insert the service name of the operator API here!
|
||||||
operatorApiUrl: "http://postgres-operator:8080"
|
operatorApiUrl: "http://postgres-operator:8080"
|
||||||
targetNamespace: "default"
|
targetNamespace: "default"
|
||||||
|
|
@ -44,4 +55,4 @@ ingress:
|
||||||
tls: []
|
tls: []
|
||||||
# - secretName: ui-tls
|
# - secretName: ui-tls
|
||||||
# hosts:
|
# hosts:
|
||||||
# - ui.exmaple.org
|
# - ui.exmaple.org
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
{{ if .Values.rbac.create }}
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: postgres-pod
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ template "postgres-operator.name" . }}
|
||||||
|
helm.sh/chart: {{ template "postgres-operator.chart" . }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
rules:
|
||||||
|
# Patroni needs to watch and manage endpoints
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
# Patroni needs to watch pods
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
# to let Patroni create a headless service
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
# to run privileged pods
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
resources:
|
||||||
|
- podsecuritypolicies
|
||||||
|
resourceNames:
|
||||||
|
- privileged
|
||||||
|
verbs:
|
||||||
|
- use
|
||||||
|
{{ end }}
|
||||||
|
|
@ -9,6 +9,7 @@ metadata:
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
rules:
|
rules:
|
||||||
|
# all verbs allowed for custom operator resources
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- acid.zalan.do
|
- acid.zalan.do
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -16,7 +17,15 @@ rules:
|
||||||
- postgresqls/status
|
- postgresqls/status
|
||||||
- operatorconfigurations
|
- operatorconfigurations
|
||||||
verbs:
|
verbs:
|
||||||
- "*"
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
# to create or get/update CRDs when starting up
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- apiextensions.k8s.io
|
- apiextensions.k8s.io
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -26,12 +35,14 @@ rules:
|
||||||
- get
|
- get
|
||||||
- patch
|
- patch
|
||||||
- update
|
- update
|
||||||
|
# to read configuration from ConfigMaps
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
- configmaps
|
- configmaps
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
# to manage endpoints which are also used by Patroni
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -43,7 +54,9 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- patch
|
- patch
|
||||||
- watch # needed if zalando-postgres-operator account is used for pods as well
|
- update
|
||||||
|
- watch
|
||||||
|
# to CRUD secrets for database access
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -53,6 +66,7 @@ rules:
|
||||||
- update
|
- update
|
||||||
- delete
|
- delete
|
||||||
- get
|
- get
|
||||||
|
# to check nodes for node readiness label
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -61,6 +75,7 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
# to read or delete existing PVCs. Creation via StatefulSet
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -69,6 +84,7 @@ rules:
|
||||||
- delete
|
- delete
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
|
# to read existing PVs. Creation should be done via dynamic provisioning
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -77,6 +93,7 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- update # only for resizing AWS volumes
|
- update # only for resizing AWS volumes
|
||||||
|
# to watch Spilo pods and do rolling updates. Creation via StatefulSet
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -86,13 +103,16 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- update
|
||||||
- patch
|
- patch
|
||||||
|
# to resize the filesystem in Spilo pods when increasing volume size
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
- pods/exec
|
- pods/exec
|
||||||
verbs:
|
verbs:
|
||||||
- create
|
- create
|
||||||
|
# to CRUD services to point to Postgres cluster instances
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -102,6 +122,8 @@ rules:
|
||||||
- delete
|
- delete
|
||||||
- get
|
- get
|
||||||
- patch
|
- patch
|
||||||
|
- update
|
||||||
|
# to CRUD the StatefulSet which controls the Postgres cluster instances
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- apps
|
- apps
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -112,12 +134,26 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- patch
|
- patch
|
||||||
|
# to CRUD cron jobs for logical backups
|
||||||
|
- apiGroups:
|
||||||
|
- batch
|
||||||
|
resources:
|
||||||
|
- cronjobs
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
# to get namespaces operator resources can run in
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
- namespaces
|
- namespaces
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
# to define PDBs. Update happens via delete/create
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- policy
|
- policy
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -126,6 +162,7 @@ rules:
|
||||||
- create
|
- create
|
||||||
- delete
|
- delete
|
||||||
- get
|
- get
|
||||||
|
# to create ServiceAccounts in each namespace the operator watches
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -133,30 +170,21 @@ rules:
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- create
|
- create
|
||||||
|
# to create role bindings to the postgres-pod service account
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- "rbac.authorization.k8s.io"
|
- rbac.authorization.k8s.io
|
||||||
resources:
|
resources:
|
||||||
- rolebindings
|
- rolebindings
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- create
|
- create
|
||||||
|
# to grant privilege to run privileged pods
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- "rbac.authorization.k8s.io"
|
- extensions
|
||||||
resources:
|
resources:
|
||||||
- clusterroles
|
- podsecuritypolicies
|
||||||
verbs:
|
|
||||||
- bind
|
|
||||||
resourceNames:
|
resourceNames:
|
||||||
- {{ include "postgres-operator.serviceAccountName" . }}
|
- privileged
|
||||||
- apiGroups:
|
|
||||||
- batch
|
|
||||||
resources:
|
|
||||||
- cronjobs # enables logical backups
|
|
||||||
verbs:
|
verbs:
|
||||||
- create
|
- use
|
||||||
- delete
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- patch
|
|
||||||
- update
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ roleRef:
|
||||||
name: {{ include "postgres-operator.serviceAccountName" . }}
|
name: {{ include "postgres-operator.serviceAccountName" . }}
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
# note: the cluster role binding needs to be defined
|
|
||||||
# for every namespace the operator service account lives in.
|
|
||||||
name: {{ include "postgres-operator.serviceAccountName" . }}
|
name: {{ include "postgres-operator.serviceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ metadata:
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
data:
|
data:
|
||||||
pod_service_account_name: {{ include "postgres-operator.serviceAccountName" . }}
|
|
||||||
{{ toYaml .Values.configGeneral | indent 2 }}
|
{{ toYaml .Values.configGeneral | indent 2 }}
|
||||||
{{ toYaml .Values.configUsers | indent 2 }}
|
{{ toYaml .Values.configUsers | indent 2 }}
|
||||||
{{ toYaml .Values.configKubernetes | indent 2 }}
|
{{ toYaml .Values.configKubernetes | indent 2 }}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ configuration:
|
||||||
{{ toYaml .Values.configUsers | indent 4 }}
|
{{ toYaml .Values.configUsers | indent 4 }}
|
||||||
kubernetes:
|
kubernetes:
|
||||||
oauth_token_secret_name: {{ template "postgres-operator.fullname" . }}
|
oauth_token_secret_name: {{ template "postgres-operator.fullname" . }}
|
||||||
pod_service_account_name: {{ include "postgres-operator.serviceAccountName" . }}
|
|
||||||
{{ toYaml .Values.configKubernetes | indent 4 }}
|
{{ toYaml .Values.configKubernetes | indent 4 }}
|
||||||
postgres_pod_resources:
|
postgres_pod_resources:
|
||||||
{{ toYaml .Values.configPostgresPodResources | indent 4 }}
|
{{ toYaml .Values.configPostgresPodResources | indent 4 }}
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,8 @@ configKubernetes:
|
||||||
pod_management_policy: "ordered_ready"
|
pod_management_policy: "ordered_ready"
|
||||||
# label assigned to the Postgres pods (and services/endpoints)
|
# label assigned to the Postgres pods (and services/endpoints)
|
||||||
pod_role_label: spilo-role
|
pod_role_label: spilo-role
|
||||||
|
# name of service account to be used by postgres cluster pods
|
||||||
|
pod_service_account_name: "postgres-pod"
|
||||||
# Postgres pods are terminated forcefully after this timeout
|
# Postgres pods are terminated forcefully after this timeout
|
||||||
pod_terminate_grace_period: 5m
|
pod_terminate_grace_period: 5m
|
||||||
# template for database user secrets generated by the operator
|
# template for database user secrets generated by the operator
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,8 @@ configKubernetes:
|
||||||
pod_management_policy: "ordered_ready"
|
pod_management_policy: "ordered_ready"
|
||||||
# label assigned to the Postgres pods (and services/endpoints)
|
# label assigned to the Postgres pods (and services/endpoints)
|
||||||
pod_role_label: spilo-role
|
pod_role_label: spilo-role
|
||||||
|
# name of service account to be used by postgres cluster pods
|
||||||
|
pod_service_account_name: "postgres-pod"
|
||||||
# Postgres pods are terminated forcefully after this timeout
|
# Postgres pods are terminated forcefully after this timeout
|
||||||
pod_terminate_grace_period: 5m
|
pod_terminate_grace_period: 5m
|
||||||
# template for database user secrets generated by the operator
|
# template for database user secrets generated by the operator
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,12 @@ patching the CRD manifest:
|
||||||
zk8 patch crd postgresqls.acid.zalan.do -p '{"spec":{"validation": null}}'
|
zk8 patch crd postgresqls.acid.zalan.do -p '{"spec":{"validation": null}}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Non-default cluster domain
|
||||||
|
|
||||||
|
If your cluster uses a DNS domain other than the default `cluster.local`, this
|
||||||
|
needs to be set in the operator configuration (`cluster_domain` variable). This
|
||||||
|
is used by the operator to connect to the clusters after creation.
|
||||||
|
|
||||||
## Namespaces
|
## Namespaces
|
||||||
|
|
||||||
### Select the namespace to deploy to
|
### Select the namespace to deploy to
|
||||||
|
|
@ -89,36 +95,13 @@ lacks access rights to any of them (except K8s system namespaces like
|
||||||
'list pods' execute at the cluster scope and fail at the first violation of
|
'list pods' execute at the cluster scope and fail at the first violation of
|
||||||
access rights.
|
access rights.
|
||||||
|
|
||||||
The watched namespace also needs to have a (possibly different) service account
|
|
||||||
in the case database pods need to talk to the K8s API (e.g. when using
|
|
||||||
K8s-native configuration of Patroni). The operator checks that the
|
|
||||||
`pod_service_account_name` exists in the target namespace, and, if not, deploys
|
|
||||||
there the `pod_service_account_definition` from the operator
|
|
||||||
[`Config`](../pkg/util/config/config.go) with the default value of:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: operator
|
|
||||||
```
|
|
||||||
|
|
||||||
In this definition, the operator overwrites the account's name to match
|
|
||||||
`pod_service_account_name` and the `default` namespace to match the target
|
|
||||||
namespace. The operator performs **no** further syncing of this account.
|
|
||||||
|
|
||||||
## Non-default cluster domain
|
|
||||||
|
|
||||||
If your cluster uses a DNS domain other than the default `cluster.local`, this
|
|
||||||
needs to be set in the operator configuration (`cluster_domain` variable). This
|
|
||||||
is used by the operator to connect to the clusters after creation.
|
|
||||||
|
|
||||||
## Role-based access control for the operator
|
## Role-based access control for the operator
|
||||||
|
|
||||||
The manifest [`operator-service-account-rbac.yaml`](../manifests/operator-service-account-rbac.yaml)
|
The manifest [`operator-service-account-rbac.yaml`](../manifests/operator-service-account-rbac.yaml)
|
||||||
defines the service account, cluster roles and bindings needed for the operator
|
defines the service account, cluster roles and bindings needed for the operator
|
||||||
to function under access control restrictions. To deploy the operator with this
|
to function under access control restrictions. The file also includes a cluster
|
||||||
RBAC policy use:
|
role `postgres-pod` with privileges for Patroni to watch and manage pods and
|
||||||
|
endpoints. To deploy the operator with this RBAC policies use:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl create -f manifests/configmap.yaml
|
kubectl create -f manifests/configmap.yaml
|
||||||
|
|
@ -127,14 +110,14 @@ kubectl create -f manifests/postgres-operator.yaml
|
||||||
kubectl create -f manifests/minimal-postgres-manifest.yaml
|
kubectl create -f manifests/minimal-postgres-manifest.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Service account and cluster roles
|
### Namespaced service account and role binding
|
||||||
|
|
||||||
Note that the service account is named `zalando-postgres-operator`. You may have
|
For each namespace the operator watches it creates (or reads) a service account
|
||||||
to change the `service_account_name` in the operator ConfigMap and
|
and role binding to be used by the Postgres Pods. The service account is bound
|
||||||
`serviceAccountName` in the `postgres-operator` deployment appropriately. This
|
to the `postgres-pod` cluster role. The name and definitions of these resources
|
||||||
is done intentionally to avoid breaking those setups that already work with the
|
can be [configured](reference/operator_parameters.md#kubernetes-resources).
|
||||||
default `operator` account. In the future the operator should ideally be run
|
Note, that the operator performs **no** further syncing of namespaced service
|
||||||
under the `zalando-postgres-operator` service account.
|
accounts and role bindings.
|
||||||
|
|
||||||
### Give K8s users access to create/list `postgresqls`
|
### Give K8s users access to create/list `postgresqls`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,21 +152,22 @@ configuration they are grouped under the `kubernetes` key.
|
||||||
service account used by Patroni running on individual Pods to communicate
|
service account used by Patroni running on individual Pods to communicate
|
||||||
with the operator. Required even if native Kubernetes support in Patroni is
|
with the operator. Required even if native Kubernetes support in Patroni is
|
||||||
not used, because Patroni keeps pod labels in sync with the instance role.
|
not used, because Patroni keeps pod labels in sync with the instance role.
|
||||||
The default is `operator`.
|
The default is `postgres-pod`.
|
||||||
|
|
||||||
* **pod_service_account_definition**
|
* **pod_service_account_definition**
|
||||||
The operator tries to create the pod Service Account in the namespace that
|
On Postgres cluster creation the operator tries to create the service account
|
||||||
doesn't define such an account using the YAML definition provided by this
|
for the Postgres pods if it does not exist in the namespace. The internal
|
||||||
option. If not defined, a simple definition that contains only the name will
|
default service account definition (defines only the name) can be overwritten
|
||||||
be used. The default is empty.
|
with this parameter. Make sure to provide a valid YAML or JSON string. The
|
||||||
|
default is empty.
|
||||||
|
|
||||||
* **pod_service_account_role_binding_definition**
|
* **pod_service_account_role_binding_definition**
|
||||||
This definition must bind pod service account to a role with permission
|
This definition must bind the pod service account to a role with permission
|
||||||
sufficient for the pods to start and for Patroni to access K8s endpoints;
|
sufficient for the pods to start and for Patroni to access K8s endpoints;
|
||||||
service account on its own lacks any such rights starting with K8s v1.8. If
|
service account on its own lacks any such rights starting with K8s v1.8. If
|
||||||
not explicitly defined by the user, a simple definition that binds the
|
not explicitly defined by the user, a simple definition that binds the
|
||||||
account to the operator's own 'zalando-postgres-operator' cluster role will
|
account to the 'postgres-pod' [cluster role](../../manifests/operator-service-account-rbac.yaml#L198)
|
||||||
be used. The default is empty.
|
will be used. The default is empty.
|
||||||
|
|
||||||
* **pod_terminate_grace_period**
|
* **pod_terminate_grace_period**
|
||||||
Postgres pods are [terminated forcefully](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods)
|
Postgres pods are [terminated forcefully](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods)
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ data:
|
||||||
pod_label_wait_timeout: 10m
|
pod_label_wait_timeout: 10m
|
||||||
pod_management_policy: "ordered_ready"
|
pod_management_policy: "ordered_ready"
|
||||||
pod_role_label: spilo-role
|
pod_role_label: spilo-role
|
||||||
pod_service_account_name: "zalando-postgres-operator"
|
pod_service_account_name: "postgres-pod"
|
||||||
pod_terminate_grace_period: 5m
|
pod_terminate_grace_period: 5m
|
||||||
# postgres_superuser_teams: "postgres_superusers"
|
# postgres_superuser_teams: "postgres_superusers"
|
||||||
# protected_role_names: "admin"
|
# protected_role_names: "admin"
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: zalando-postgres-operator
|
name: postgres-operator
|
||||||
namespace: default
|
namespace: default
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
name: zalando-postgres-operator
|
name: postgres-operator
|
||||||
rules:
|
rules:
|
||||||
# all verbs allowed for custom operator resources
|
# all verbs allowed for custom operator resources
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
|
|
@ -18,7 +18,14 @@ rules:
|
||||||
- postgresqls/status
|
- postgresqls/status
|
||||||
- operatorconfigurations
|
- operatorconfigurations
|
||||||
verbs:
|
verbs:
|
||||||
- "*"
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
# to create or get/update CRDs when starting up
|
# to create or get/update CRDs when starting up
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- apiextensions.k8s.io
|
- apiextensions.k8s.io
|
||||||
|
|
@ -48,7 +55,8 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- patch
|
- patch
|
||||||
- watch # needed if zalando-postgres-operator account is used for pods as well
|
- update
|
||||||
|
- watch
|
||||||
# to CRUD secrets for database access
|
# to CRUD secrets for database access
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
|
|
@ -96,6 +104,7 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- update
|
||||||
- patch
|
- patch
|
||||||
# to resize the filesystem in Spilo pods when increasing volume size
|
# to resize the filesystem in Spilo pods when increasing volume size
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
|
|
@ -126,6 +135,18 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- patch
|
- patch
|
||||||
|
# to CRUD cron jobs for logical backups
|
||||||
|
- apiGroups:
|
||||||
|
- batch
|
||||||
|
resources:
|
||||||
|
- cronjobs
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
# to get namespaces operator resources can run in
|
# to get namespaces operator resources can run in
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
|
|
@ -150,39 +171,82 @@ rules:
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- create
|
- create
|
||||||
# to create role bindings to the operator service account
|
# to create role bindings to the postgres-pod service account
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- "rbac.authorization.k8s.io"
|
- rbac.authorization.k8s.io
|
||||||
resources:
|
resources:
|
||||||
- rolebindings
|
- rolebindings
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- create
|
- create
|
||||||
# to CRUD cron jobs for logical backups
|
# to grant privilege to run privileged pods
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- batch
|
- extensions
|
||||||
resources:
|
resources:
|
||||||
- cronjobs
|
- podsecuritypolicies
|
||||||
|
resourceNames:
|
||||||
|
- privileged
|
||||||
verbs:
|
verbs:
|
||||||
- create
|
- use
|
||||||
- delete
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- patch
|
|
||||||
- update
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: zalando-postgres-operator
|
name: postgres-operator
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: zalando-postgres-operator
|
name: postgres-operator
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
# note: the cluster role binding needs to be defined
|
name: postgres-operator
|
||||||
# for every namespace the operator service account lives in.
|
|
||||||
name: zalando-postgres-operator
|
|
||||||
namespace: default
|
namespace: default
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: postgres-pod
|
||||||
|
rules:
|
||||||
|
# Patroni needs to watch and manage endpoints
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
# Patroni needs to watch pods
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
# to let Patroni create a headless service
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
# to run privileged pods
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
resources:
|
||||||
|
- podsecuritypolicies
|
||||||
|
resourceNames:
|
||||||
|
- privileged
|
||||||
|
verbs:
|
||||||
|
- use
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
name: postgres-operator
|
name: postgres-operator
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: zalando-postgres-operator
|
serviceAccountName: postgres-operator
|
||||||
containers:
|
containers:
|
||||||
- name: postgres-operator
|
- name: postgres-operator
|
||||||
image: registry.opensource.zalan.do/acid/postgres-operator:v1.3.1
|
image: registry.opensource.zalan.do/acid/postgres-operator:v1.3.1
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ configuration:
|
||||||
# pod_priority_class_name: ""
|
# pod_priority_class_name: ""
|
||||||
pod_role_label: spilo-role
|
pod_role_label: spilo-role
|
||||||
# pod_service_account_definition: ""
|
# pod_service_account_definition: ""
|
||||||
pod_service_account_name: zalando-postgres-operator
|
pod_service_account_name: postgres-pod
|
||||||
# pod_service_account_role_binding_definition: ""
|
# pod_service_account_role_binding_definition: ""
|
||||||
pod_terminate_grace_period: 5m
|
pod_terminate_grace_period: 5m
|
||||||
secret_name_template: "{username}.{cluster}.credentials.{tprkind}.{tprgroup}"
|
secret_name_template: "{username}.{cluster}.credentials.{tprkind}.{tprgroup}"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,14 @@ rules:
|
||||||
- postgresqls
|
- postgresqls
|
||||||
- postgresqls/status
|
- postgresqls/status
|
||||||
verbs:
|
verbs:
|
||||||
- "*"
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
|
@ -48,4 +55,3 @@ rules:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -161,11 +161,12 @@ func (c *Controller) initPodServiceAccount() {
|
||||||
|
|
||||||
if c.opConfig.PodServiceAccountDefinition == "" {
|
if c.opConfig.PodServiceAccountDefinition == "" {
|
||||||
c.opConfig.PodServiceAccountDefinition = `
|
c.opConfig.PodServiceAccountDefinition = `
|
||||||
{ "apiVersion": "v1",
|
{
|
||||||
"kind": "ServiceAccount",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"kind": "ServiceAccount",
|
||||||
"name": "operator"
|
"metadata": {
|
||||||
}
|
"name": "postgres-pod"
|
||||||
|
}
|
||||||
}`
|
}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -175,13 +176,13 @@ func (c *Controller) initPodServiceAccount() {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case err != nil:
|
case err != nil:
|
||||||
panic(fmt.Errorf("Unable to parse pod service account definition from the operator config map: %v", err))
|
panic(fmt.Errorf("Unable to parse pod service account definition from the operator configuration: %v", err))
|
||||||
case groupVersionKind.Kind != "ServiceAccount":
|
case groupVersionKind.Kind != "ServiceAccount":
|
||||||
panic(fmt.Errorf("pod service account definition in the operator config map defines another type of resource: %v", groupVersionKind.Kind))
|
panic(fmt.Errorf("pod service account definition in the operator configuration defines another type of resource: %v", groupVersionKind.Kind))
|
||||||
default:
|
default:
|
||||||
c.PodServiceAccount = obj.(*v1.ServiceAccount)
|
c.PodServiceAccount = obj.(*v1.ServiceAccount)
|
||||||
if c.PodServiceAccount.Name != c.opConfig.PodServiceAccountName {
|
if c.PodServiceAccount.Name != c.opConfig.PodServiceAccountName {
|
||||||
c.logger.Warnf("in the operator config map, the pod service account name %v does not match the name %v given in the account definition; using the former for consistency", c.opConfig.PodServiceAccountName, c.PodServiceAccount.Name)
|
c.logger.Warnf("in the operator configuration, the pod service account name %v does not match the name %v given in the account definition; using the former for consistency", c.opConfig.PodServiceAccountName, c.PodServiceAccount.Name)
|
||||||
c.PodServiceAccount.Name = c.opConfig.PodServiceAccountName
|
c.PodServiceAccount.Name = c.opConfig.PodServiceAccountName
|
||||||
}
|
}
|
||||||
c.PodServiceAccount.Namespace = ""
|
c.PodServiceAccount.Namespace = ""
|
||||||
|
|
@ -223,9 +224,9 @@ func (c *Controller) initRoleBinding() {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case err != nil:
|
case err != nil:
|
||||||
panic(fmt.Errorf("Unable to parse the definition of the role binding for the pod service account definition from the operator config map: %v", err))
|
panic(fmt.Errorf("unable to parse the definition of the role binding for the pod service account definition from the operator configuration: %v", err))
|
||||||
case groupVersionKind.Kind != "RoleBinding":
|
case groupVersionKind.Kind != "RoleBinding":
|
||||||
panic(fmt.Errorf("role binding definition in the operator config map defines another type of resource: %v", groupVersionKind.Kind))
|
panic(fmt.Errorf("role binding definition in the operator configuration defines another type of resource: %v", groupVersionKind.Kind))
|
||||||
default:
|
default:
|
||||||
c.PodServiceAccountRoleBinding = obj.(*rbacv1.RoleBinding)
|
c.PodServiceAccountRoleBinding = obj.(*rbacv1.RoleBinding)
|
||||||
c.PodServiceAccountRoleBinding.Namespace = ""
|
c.PodServiceAccountRoleBinding.Namespace = ""
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ type Config struct {
|
||||||
DockerImage string `name:"docker_image" default:"registry.opensource.zalan.do/acid/spilo-cdp-12:1.6-p16"`
|
DockerImage string `name:"docker_image" default:"registry.opensource.zalan.do/acid/spilo-cdp-12:1.6-p16"`
|
||||||
Sidecars map[string]string `name:"sidecar_docker_images"`
|
Sidecars map[string]string `name:"sidecar_docker_images"`
|
||||||
// default name `operator` enables backward compatibility with the older ServiceAccountName field
|
// default name `operator` enables backward compatibility with the older ServiceAccountName field
|
||||||
PodServiceAccountName string `name:"pod_service_account_name" default:"operator"`
|
PodServiceAccountName string `name:"pod_service_account_name" default:"postgres-pod"`
|
||||||
// value of this string must be valid JSON or YAML; see initPodServiceAccount
|
// value of this string must be valid JSON or YAML; see initPodServiceAccount
|
||||||
PodServiceAccountDefinition string `name:"pod_service_account_definition" default:""`
|
PodServiceAccountDefinition string `name:"pod_service_account_definition" default:""`
|
||||||
PodServiceAccountRoleBindingDefinition string `name:"pod_service_account_role_binding_definition" default:""`
|
PodServiceAccountRoleBindingDefinition string `name:"pod_service_account_role_binding_definition" default:""`
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,5 @@ roleRef:
|
||||||
name: postgres-operator-ui
|
name: postgres-operator-ui
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
# note: the cluster role binding needs to be defined
|
|
||||||
# for every namespace the operator-ui service account lives in.
|
|
||||||
name: postgres-operator-ui
|
name: postgres-operator-ui
|
||||||
namespace: default
|
namespace: default
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue