Skip to content

bugfix: add endpoints resource to postgres-operator ClusterRole #2900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions manifests/operator-service-account-rbac-openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ rules:
- get
- patch
- update
# to create endpoints to services
- apiGroups:
- ""
resources:
- endpoints
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
# to read configuration and manage ConfigMaps used by Patroni
- apiGroups:
- ""
Expand Down Expand Up @@ -242,6 +256,40 @@ kind: ClusterRole
metadata:
name: postgres-pod
rules:
# to create endpoints to services
- apiGroups:
- ""
resources:
- endpoints
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- apiGroups: [""]
resources:
- events # Patroni may log to events
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups: ["coordination.k8s.io"]
resources:
- leases # Only if Patroni tries to use K8s Leases
verbs:
- create
- get
- list
- update
- delete
- watch
- patch
# Patroni needs to watch and manage config maps
- apiGroups:
- ""
Expand Down Expand Up @@ -274,6 +322,15 @@ rules:
- services
verbs:
- create
# to check nodes for node readiness label
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
# to grant privilege to run privileged pods (not needed by default)
#- apiGroups:
# - extensions
Expand Down