Skip to content

Commit 52de362

Browse files
committed
Add Dynamic RBAC Config to Deploy Container
Adds the 'dynamic_rbac' Ansible variable to the 'inventory_template', and adds the associated 'DYNAMIC_RBAC' environment variable to the Job spec in 'postgres-operator.yaml'.
1 parent 786a036 commit 52de362

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

installers/image/inventory_template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ create_rbac='$CREATE_RBAC'
3434
# ==================
3535
namespace_mode='$NAMESPACE_MODE'
3636

37+
# Dynamic RBAC
38+
# ==================
39+
# Note: this setting is only applicable if 'namespace_mode' is set to
40+
# 'readonly' or 'disabled'.
41+
#
42+
# When creating target namespaces during installation, this setting
43+
# determines what RBAC is created within the target namespace. If set to
44+
# 'true', the RBAC created in those namespaces will allow the PostgreSQL
45+
# Operator itself to create the ServiceAccounts, Roles and RoleBindings
46+
# it requires to create PG clusters. If set to 'false' (the default),
47+
# the installer will instead create the ServiceAccounts, Roles and
48+
# RoleBindings), and the PostgreSQL Operator will not be granted the
49+
# ability to create the RBAC it requires within those namespaces.
50+
# ==================
51+
dynamic_rbac='$DYNAMIC_RBAC'
52+
3753
# ===================
3854
# PGO Client Container Settings
3955
# The following settings configure the deployment of a PGO Client Container

installers/kubectl/postgres-operator.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ spec:
172172
value: "false"
173173
- name: DISABLE_FSGROUP
174174
value: "false"
175+
- name: DYNAMIC_RBAC
176+
value: "false"
175177
- name: EXPORTERPORT
176178
value: "9187"
177179
- name: METRICS

0 commit comments

Comments
 (0)