fix: split env config and image pull secret into separate helm releases

Bundling these Secrets in the app helm chart caused two bugs in the scheduler-k3s plugin: a chart rollback could delete Secrets that older ReplicaSets still referenced by exact timestamped name (`env-{app}.{ts}` and `ims-{app}.{ts}`), hard-crashing pods until manual intervention; and the strategic-merge `patchMergeKey` on `imagePullSecrets` let stale entries leak into the live Deployment until the list pointed at many nonexistent Secrets. Each Secret now lives in its own helm release with a stable name (`config-{app}` and `pull-secret-{app}`), installed before the app chart on every deploy. The deployment trigger also prunes any leaked `imagePullSecrets` entries from the live Deployment so the next deploy lands on a clean list, and the rename and destroy paths uninstall the new releases (and the previously-leaked TLS release on rename) under the old app name.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-04-29 12:18:03 -04:00
1 parent f06048a266
commit ef9bdc0379
18 files changed
+1086 -56

No files matched your search

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
type: kubernetes.io/dockerconfigjson
metadata:
name: pull-secret-{{ .Values.global.app_name }}
namespace: {{ .Values.global.namespace }}
labels:
app.kubernetes.io/name: pull-secret-{{ .Values.global.app_name }}
app.kubernetes.io/part-of: {{ .Values.global.app_name }}
annotations:
dokku.com/managed: "true"
data:
.dockerconfigjson: {{ .Values.global.pull_secret_base64 | quote }}