From 24eb39de28d9b0bef83cc5fa3a01621ccc79a117 Mon Sep 17 00:00:00 2001 From: Robert Hoppe Date: Fri, 4 Jul 2025 15:43:23 +0200 Subject: [PATCH 1/2] Ensure with pre-install hook the Secret is not overwritten --- charts/s1-agent/templates/common/secrets.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/s1-agent/templates/common/secrets.yaml b/charts/s1-agent/templates/common/secrets.yaml index 75000e1..51a71b3 100644 --- a/charts/s1-agent/templates/common/secrets.yaml +++ b/charts/s1-agent/templates/common/secrets.yaml @@ -21,6 +21,8 @@ kind: Secret metadata: name: {{ include "helper.secret.name" . }} labels: {{- include "sentinelone.helper.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": pre-install type: kubernetes.io/tls data: {{- include "helper.certificates" . | nindent 2 }} {{- end }} From 589f6c874507290f5ff6cae547d07e7b34a053fe Mon Sep 17 00:00:00 2001 From: Robert Hoppe Date: Fri, 11 Jul 2025 12:51:55 +0200 Subject: [PATCH 2/2] This change allows proper upgrade too on existing --- charts/s1-agent/templates/common/secrets.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/s1-agent/templates/common/secrets.yaml b/charts/s1-agent/templates/common/secrets.yaml index 51a71b3..bfa0fe1 100644 --- a/charts/s1-agent/templates/common/secrets.yaml +++ b/charts/s1-agent/templates/common/secrets.yaml @@ -23,6 +23,7 @@ metadata: labels: {{- include "sentinelone.helper.labels" . | nindent 4 }} annotations: "helm.sh/hook": pre-install + "helm.sh/hook-delete-policy": "before-hook-creation" type: kubernetes.io/tls data: {{- include "helper.certificates" . | nindent 2 }} {{- end }}