@@ -34,8 +34,8 @@ settings.
3434
3535Enables full dynamic namespace capabilities, in which the Operator can create, delete and update
3636any namespaces within a Kubernetes cluster. With ` dynamic ` mode enabled, the PostgreSQL Operator
37- can respond to namespace events in a Kubernetes cluster, such as when a namespace is created, and
38- take an appropriate action, such as adding the PostgreSQL Operator controllers for the newly
37+ can respond to namespace events in a Kubernetes cluster, such as when a namespace is created, and
38+ take an appropriate action, such as adding the PostgreSQL Operator controllers for the newly
3939created namespace.
4040
4141The following defines the namespace permissions required for the ` dynamic ` mode to be enabled:
6262
6363### ` readonly`
6464
65- In `readonly` mode, the PostgreSQL Operator is still able to listen to namespace events within a
66- Kubernetes cluster, but it can no longer modify (create, update, delete) namespaces. For example,
65+ In `readonly` mode, the PostgreSQL Operator is still able to listen to namespace events within a
66+ Kubernetes cluster, but it can no longer modify (create, update, delete) namespaces. For example,
6767if a Kubernetes administrator creates a namespace, the PostgreSQL Operator can respond and create
6868controllers for that namespace.
6969
@@ -95,30 +95,30 @@ Operator is unable to dynamically respond to namespace events in the cluster, i
9595target namespaces are deleted or new target namespaces need to be added, the PostgreSQL Operator
9696will need to be re-deployed.
9797
98- Please note that it is important to redeploy the PostgreSQL Operator following the deletion of a
98+ Please note that it is important to redeploy the PostgreSQL Operator following the deletion of a
9999target namespace to ensure it no longer attempts to listen for events in that namespace.
100100
101101The `disabled` mode is enabled the when the PostgreSQL Operator has not been assigned namespace
102102permissions.
103103
104104# # RBAC Reconciliation
105105
106- By default, the PostgreSQL Operator will attempt to reconcile RBAC resources (ServiceAccounts,
106+ By default, the PostgreSQL Operator will attempt to reconcile RBAC resources (ServiceAccounts,
107107Roles and RoleBindings) within each namespace configured for the PostgreSQL Operator installation.
108108This allows the PostgreSQL Operator to create, update and delete the various RBAC resources it
109109requires in order to properly create and manage PostgreSQL clusters within each targeted namespace
110110(this includes self-healing RBAC resources as needed if removed and/or misconfigured).
111111
112112In order for RBAC reconciliation to function properly, the PostgreSQL Operator ServiceAccount must
113- be assigned a certain set of permissions. While the PostgreSQL Operator is not concerned with
113+ be assigned a certain set of permissions. While the PostgreSQL Operator is not concerned with
114114exactly how it has been assigned the permissions required to reconcile RBAC in each target
115- namespace, the various [installation methods]({{< relref "installation" >}}) supported by the
115+ namespace, the various [installation methods]({{< relref "installation" >}}) supported by the
116116PostgreSQL Operator install a recommended set permissions based on the specific Namespace Operating
117117Mode enabled (see section [Namespace Operating Modes]({{< relref "#namespace-operating-modes" >}})
118118above for more information regarding the various Namespace Operating Modes available).
119119
120- The following section defines the recommended set of permissions that should be assigned to the
121- PostgreSQL Operator ServiceAccount in order to ensure proper RBAC reconciliation based on the
120+ The following section defines the recommended set of permissions that should be assigned to the
121+ PostgreSQL Operator ServiceAccount in order to ensure proper RBAC reconciliation based on the
122122specific Namespace Operating Mode enabled. Please note that each PostgreSQL Operator installation
123123method handles the initial configuration and setup of the permissions shown below based on the
124124Namespace Operating Mode configured during installation.
@@ -127,7 +127,7 @@ Namespace Operating Mode configured during installation.
127127
128128When using the `dynamic` Namespace Operating Mode, it is recommended that the PostgreSQL Operator
129129ServiceAccount be granted permissions to manage RBAC inside any namespace in the Kubernetes cluster
130- via a ClusterRole. This allows for a fully-hands off approach to managing RBAC within each
130+ via a ClusterRole. This allows for a fully-hands off approach to managing RBAC within each
131131targeted namespace space. In other words, as namespaces are added and removed post-installation of
132132the PostgreSQL Operator (e.g. using `pgo create namespace` or `pgo delete namespace`), the Operator
133133is able to automatically reconcile RBAC in those namespaces without the need for any external
@@ -170,8 +170,6 @@ rules:
170170 - endpoints
171171 - pods
172172 - pods/exec
173- - pods/log
174- - replicasets
175173 - secrets
176174 - services
177175 - persistentvolumeclaims
@@ -184,10 +182,19 @@ rules:
184182 - update
185183 - delete
186184 - deletecollection
185+ - apiGroups:
186+ - ''
187+ resources:
188+ - pods/log
189+ verbs:
190+ - get
191+ - list
192+ - watch
187193 - apiGroups:
188194 - apps
189195 resources:
190196 - deployments
197+ - replicasets
191198 verbs:
192199 - get
193200 - list
@@ -230,7 +237,7 @@ rules:
230237
231238# ## `readonly` & `disabled` Namespace Operating Modes
232239
233- When using the `readonly` or `disabled` Namespace Operating Modes, it is recommended that the
240+ When using the `readonly` or `disabled` Namespace Operating Modes, it is recommended that the
234241PostgreSQL Operator ServiceAccount be granted permissions to manage RBAC inside of any configured
235242namespaces using local Roles within each targeted namespace. This means that as new namespaces
236243are added and removed post-installation of the PostgreSQL Operator, an administrator must manually
0 commit comments