Skip to content

Commit 9634165

Browse files
committed
fix(helm): move rotationPolicy under privateKey for cert-manager compatibility (#3046)
* fix(helm): move rotationPolicy under privateKey for cert-manager compatibility * docs(helm): add reclaimPolicy Retain guidance for production database storage * fix(helm): prevent empty branding ConfigMap creation
1 parent 9a5575b commit 9634165

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

helm/sim/examples/values-azure.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
# Global configuration
55
global:
66
imageRegistry: "ghcr.io"
7-
# Use "managed-csi-premium" for Premium SSD (requires Premium storage-capable VMs like Standard_DS*)
8-
# Use "managed-csi" for Standard SSD (works with all VM types)
7+
# Use "managed-csi-premium" for Premium SSD, "managed-csi" for Standard SSD
8+
# IMPORTANT: For production, use a StorageClass with reclaimPolicy: Retain
9+
# to protect database volumes from accidental deletion.
910
storageClass: "managed-csi"
1011

1112
# Main application

helm/sim/examples/values-production.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Global configuration
55
global:
66
imageRegistry: "ghcr.io"
7+
# For production, use a StorageClass with reclaimPolicy: Retain
78
storageClass: "managed-csi-premium"
89

910
# Main application

helm/sim/templates/certificate-postgresql.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ spec:
1111
duration: {{ .Values.postgresql.tls.duration | default "87600h" }} # Default: 10 years
1212
renewBefore: {{ .Values.postgresql.tls.renewBefore | default "2160h" }} # Default: 90 days before expiry
1313
isCA: false
14-
{{- if .Values.postgresql.tls.rotationPolicy }}
15-
rotationPolicy: {{ .Values.postgresql.tls.rotationPolicy }}
16-
{{- end }}
1714
privateKey:
1815
algorithm: {{ .Values.postgresql.tls.privateKey.algorithm | default "RSA" }}
1916
size: {{ .Values.postgresql.tls.privateKey.size | default 4096 }}
17+
{{- if .Values.postgresql.tls.rotationPolicy }}
18+
rotationPolicy: {{ .Values.postgresql.tls.rotationPolicy }}
19+
{{- end }}
2020
usages:
2121
- server auth
2222
- client auth

helm/sim/templates/configmap-branding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.branding.enabled }}
1+
{{- if and .Values.branding.enabled (or .Values.branding.files .Values.branding.binaryFiles) }}
22
---
33
# Branding ConfigMap
44
# Mounts custom branding assets (logos, CSS, etc.) into the application

helm/sim/templates/deployment-app.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ spec:
110110
{{- end }}
111111
{{- include "sim.resources" .Values.app | nindent 10 }}
112112
{{- include "sim.securityContext" .Values.app | nindent 10 }}
113-
{{- if or .Values.branding.enabled .Values.extraVolumeMounts .Values.app.extraVolumeMounts }}
113+
{{- $hasBranding := and .Values.branding.enabled (or .Values.branding.files .Values.branding.binaryFiles) }}
114+
{{- if or $hasBranding .Values.extraVolumeMounts .Values.app.extraVolumeMounts }}
114115
volumeMounts:
115-
{{- if .Values.branding.enabled }}
116+
{{- if $hasBranding }}
116117
- name: branding
117118
mountPath: {{ .Values.branding.mountPath | default "/app/public/branding" }}
118119
readOnly: true
@@ -124,9 +125,10 @@ spec:
124125
{{- toYaml . | nindent 12 }}
125126
{{- end }}
126127
{{- end }}
127-
{{- if or .Values.branding.enabled .Values.extraVolumes .Values.app.extraVolumes }}
128+
{{- $hasBranding := and .Values.branding.enabled (or .Values.branding.files .Values.branding.binaryFiles) }}
129+
{{- if or $hasBranding .Values.extraVolumes .Values.app.extraVolumes }}
128130
volumes:
129-
{{- if .Values.branding.enabled }}
131+
{{- if $hasBranding }}
130132
- name: branding
131133
configMap:
132134
name: {{ include "sim.fullname" . }}-branding

0 commit comments

Comments
 (0)