Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion sources/keycloak-config/templates/keycloak-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ spec:
- GRANT CREATE ON SCHEMA public TO keycloak
secret:
name: keycloak-cnpg-user
{{- /* An explicit value wins; otherwise a single instance gets no PDB,
since one that never permits a disruption only blocks drains. */}}
enablePDB: {{ if kindIs "invalid" .Values.cnpg.enablePDB }}{{ gt (int .Values.cnpg.instances) 1 }}{{ else }}{{ .Values.cnpg.enablePDB }}{{ end }}
imageName: ghcr.io/cloudnative-pg/postgresql:17
instances: 1
instances: {{ .Values.cnpg.instances }}
nodeMaintenanceWindow:
inProgress: false
reusePVC: true
Expand Down
10 changes: 10 additions & 0 deletions sources/keycloak-config/values.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
domain: # to be filled by cluster-forge app

cnpg:
instances: 1
# PodDisruptionBudget for the primary. Left unset, it follows instances:
# off for a single instance, on for two or more. A single-instance PDB
# protects nothing, because there is no second replica to keep serving,
# and it blocks `kubectl drain` on the node the pod happens to sit on,
# so node maintenance stalls until someone disables it by hand.
# Set true or false to override.
enablePDB: null
3 changes: 3 additions & 0 deletions sources/keycloak-old/templates/keycloak-cnpg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
- GRANT CREATE ON SCHEMA public TO {{ .Values.postgresql.username }}
secret:
name: {{ .Values.postgresql.userSecretName }}
{{- /* An explicit value wins; otherwise a single instance gets no PDB,
since one that never permits a disruption only blocks drains. */}}
enablePDB: {{ if kindIs "invalid" .Values.cnpg.enablePDB }}{{ gt (int .Values.cnpg.instances) 1 }}{{ else }}{{ .Values.cnpg.enablePDB }}{{ end }}
imageName: ghcr.io/cloudnative-pg/postgresql:17
instances: {{ .Values.cnpg.instances }}
nodeMaintenanceWindow:
Expand Down
7 changes: 7 additions & 0 deletions sources/keycloak-old/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ hostname: ""
cnpg:
enabled: true
instances: 1
# PodDisruptionBudget for the primary. Left unset, it follows instances:
# off for a single instance, on for two or more. A single-instance PDB
# protects nothing, because there is no second replica to keep serving,
# and it blocks `kubectl drain` on the node the pod happens to sit on,
# so node maintenance stalls until someone disables it by hand.
# Set true or false to override.
enablePDB: null
storage:
storageClassName: "default"

Expand Down
Loading