update rbac manifests

This commit is contained in:
Felix Kunde 2021-01-26 17:46:02 +01:00
parent e0d47f7b49
commit 795088cabd
2 changed files with 12 additions and 56 deletions

View File

@ -227,51 +227,3 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: postgres-operator name: 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 grant privilege to run privileged pods (not needed by default)
#- apiGroups:
# - extensions
# resources:
# - podsecuritypolicies
# resourceNames:
# - privileged
# verbs:
# - use

View File

@ -10,6 +10,7 @@ kind: ClusterRole
metadata: metadata:
name: postgres-pod name: postgres-pod
rules: rules:
# Patroni needs to watch and manage endpoints
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
@ -23,6 +24,7 @@ rules:
- patch - patch
- update - update
- watch - watch
# Patroni needs to watch pods
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
@ -33,17 +35,19 @@ rules:
- patch - patch
- update - update
- watch - watch
# to let Patroni create a headless service
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
- services - services
verbs: verbs:
- create - create
- apiGroups: # to grant privilege to run privileged pods (not needed by default)
- extensions #- apiGroups:
resources: # - extensions
- podsecuritypolicies # resources:
resourceNames: # - podsecuritypolicies
- privileged # resourceNames:
verbs: # - privileged
- use # verbs:
# - use