From 18f2891864f2e98b03bb11e0ec949ee601a6f629 Mon Sep 17 00:00:00 2001 From: chakraborty29 Date: Sun, 18 May 2025 17:28:50 -0400 Subject: [PATCH] removed invalid patch annotation and included proper helm post-hook annotations --- templates/deployment-patch.yaml | 6 +++--- templates/migration-job-patch.yaml | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/templates/deployment-patch.yaml b/templates/deployment-patch.yaml index c73ffd1..9eed966 100644 --- a/templates/deployment-patch.yaml +++ b/templates/deployment-patch.yaml @@ -1,5 +1,5 @@ --- -{{- if hasKey .Values "dbExternal" }} +{{- $infisicalValues := index .Values "infisical-standalone" "infisical" }} apiVersion: apps/v1 kind: Deployment metadata: @@ -7,7 +7,8 @@ metadata: annotations: helm.sh/hook: post-install,post-upgrade helm.sh/hook-weight: "1" -$patch: strategic + helm.sh/resource-policy: keep + helm.sh/hook-delete-policy: before-hook-creation spec: selector: matchLabels: @@ -39,4 +40,3 @@ spec: value: {{ include "infisical-db-secure.redisConnectionString" . }} {{- end }} {{- end }} -{{- end }} diff --git a/templates/migration-job-patch.yaml b/templates/migration-job-patch.yaml index 828a875..125e38a 100644 --- a/templates/migration-job-patch.yaml +++ b/templates/migration-job-patch.yaml @@ -1,6 +1,5 @@ --- {{- $infisicalValues := index .Values "infisical-standalone" "infisical" }} -{{- if hasKey .Values "dbExternal" }} apiVersion: batch/v1 kind: Job metadata: @@ -8,7 +7,8 @@ metadata: annotations: helm.sh/hook: post-install,post-upgrade helm.sh/hook-weight: "0" -$patch: strategic + helm.sh/resource-policy: keep + helm.sh/hook-delete-policy: before-hook-creation spec: template: spec: @@ -32,4 +32,3 @@ spec: volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} -{{- end }}