Skip to content

Commit 5590460

Browse files
address findings from code review
1 parent 195329f commit 5590460

7 files changed

Lines changed: 17 additions & 1 deletion

File tree

charts/cryptomator-hub/templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Ingress is disabled. Configure ingress manually to the services above.
4646

4747
{{ if .Values.hub.metrics.enabled }}
4848
{{ printf "%s📈 Telemetry%s" $cSection $cReset }}
49-
- Exporting OTLP/gRPC to `{{ .Values.hub.metrics.endpoint }}` (metrics, traces, logs).
49+
- Exporting to `{{ .Values.hub.metrics.endpoint }}` (metrics, traces, logs).
5050
{{ end }}
5151

5252
{{ if not .Values.keycloak.enabled }}

charts/cryptomator-hub/templates/hub-metrics-secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ metadata:
77
namespace: {{ .Release.Namespace }}
88
labels:
99
{{- include "cryptomator-hub.labels" . | nindent 4 }}
10+
{{- if .Values.secrets.keepOnUninstall }}
1011
annotations:
1112
helm.sh/resource-policy: keep
13+
{{- end }}
1214
type: kubernetes.io/basic-auth
1315
stringData:
1416
username: {{ .Values.hub.metrics.otlp.username | quote }}

charts/cryptomator-hub/templates/hub-secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ metadata:
66
namespace: {{ .Release.Namespace }}
77
labels:
88
{{- include "cryptomator-hub.labels" . | nindent 4 }}
9+
{{- if .Values.secrets.keepOnUninstall }}
910
annotations:
1011
helm.sh/resource-policy: keep
12+
{{- end }}
1113
type: Opaque
1214
stringData:
1315
hub_system_client_secret: {{ include "cryptomator-hub.resolvedSystemClientSecret" . | quote }}

charts/cryptomator-hub/templates/keycloak-secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ metadata:
55
namespace: {{ .Release.Namespace }}
66
labels:
77
{{- include "cryptomator-hub.labels" . | nindent 4 }}
8+
{{- if .Values.secrets.keepOnUninstall }}
89
annotations:
910
helm.sh/resource-policy: keep
11+
{{- end }}
1012
type: Opaque
1113
stringData:
1214
{{- if .Values.keycloak.enabled }}

charts/cryptomator-hub/templates/postgres-secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ metadata:
66
namespace: {{ .Release.Namespace }}
77
labels:
88
{{- include "cryptomator-hub.labels" . | nindent 4 }}
9+
{{- if .Values.secrets.keepOnUninstall }}
910
annotations:
1011
helm.sh/resource-policy: keep
12+
{{- end }}
1113
type: Opaque
1214
stringData:
1315
pg_admin_password: {{ include "cryptomator-hub.resolvedPostgresAdminPassword" . | quote }}

charts/cryptomator-hub/values-dev.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
global:
22
host: ""
33

4+
secrets:
5+
keepOnUninstall: true
6+
47
hub:
58
database:
69
password: top-secret

charts/cryptomator-hub/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ urls:
1010
notes:
1111
useColor: true
1212

13+
secrets:
14+
# When true, all chart-managed Secrets are annotated `helm.sh/resource-policy: keep` so they survive `helm uninstall`.
15+
# Convenient for development (passwords stay stable across reinstalls) but a security risk in production
16+
keepOnUninstall: false
17+
1318
ingress:
1419
# supported: nginx, traefik, contour
1520
controller: ""

0 commit comments

Comments
 (0)