You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use security contexts and mount configs instead of chown init containers (#223)
* Example to create postgres TLS cert without needing root in k8s
The prior example used apk to add openssl and curl, which needed root.
This makes the certs in an initContainer (alpine/openssl), then sends
to k8s in a separate container (alpine/curl), sharing state through
an emptyDir
* be less verbose with cert creation (avoid leakage to logs)
* chmod secrets in an emptyDir (avoiding need for root to chown to running user)
This relies on the fact that an emptyDir is set up with appropriate
permissions for whichever userid is running in the pod. The prior solution
required running chown/chmod by root in the init container. This obviates
the need for root, which is not permitted in many kubernetes installs
as a security precaution.
Fixes#177 and also fixes#178 (since there is no chown anymore).
* directly mount secrets
* fsGroup
* set defaulMode for secrets to 0440
This makes files user/group readable but not by others. Without
this, mode is set to 0644 (rw for user, r for group and others).
Also removes an unused emptyDir in debug replicaset
---------
Co-authored-by: Elio Bischof <[email protected]>
command: [ "/bin/bash", "-c", 'echo "You can now open a shell within this pod by running the following command:"; echo ""; echo "kubectl --namespace {{ .Release.Namespace }} exec -it ${HOSTNAME} -- bash"; echo ""; echo "Check the directories /config and /.secrets for ZITADEL config files"; echo "also check the ZITADEL_ prefixed environment variables"; echo "For zitadel commands that need the masterkey, pass the flag --masterkeyFromEnv"; echo "this pod completes automatically in a day"; echo "Make sure you set zitadel.debug.enabled to false and upgrade the release when you are done"; echo "Also, delete the debug pods replica set by running the following command:"; echo; echo "kubectl --namespace {{ .Release.Namespace }} delete replicaset {{ include "zitadel.fullname" . }}-debug"; sleep 86400' ]
40
+
command: [ "/bin/bash", "-c", 'echo "You can now open a shell within this pod by running the following command:"; echo ""; echo "kubectl --namespace {{ .Release.Namespace }} exec -it ${HOSTNAME} -- bash"; echo ""; echo "Check the /config directory and the secret mounts for ZITADEL config files"; echo "also check the ZITADEL_ prefixed environment variables"; echo "For zitadel commands that need the masterkey, pass the flag --masterkeyFromEnv"; echo "this pod completes automatically in a day"; echo "Make sure you set zitadel.debug.enabled to false and upgrade the release when you are done"; echo "Also, delete the debug pods replica set by running the following command:"; echo; echo "kubectl --namespace {{ .Release.Namespace }} delete replicaset {{ include "zitadel.fullname" . }}-debug"; sleep 86400' ]
{{- if or .Values.zitadel.secretConfig .Values.zitadel.dbSslCaCrt .Values.zitadel.dbSslCaCrtSecret .Values.zitadel.dbSslUserCrtSecret .Values.zitadel.configSecretName }}
69
-
initContainers:
70
-
- args:
71
-
- "{{ include "zitadel.joincpcommands" (dict "commands" (list
0 commit comments