From 3bfd8299c7f8fcf78f3e9d57e946f72933a06723 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Tue, 21 May 2024 16:17:31 +0200 Subject: [PATCH] ozg-3938 argocd delete annotation --- src/main/helm/templates/truststore/init_truststore_job.yaml | 3 +++ src/test/helm/truststore/init_truststore_job_test.yaml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/main/helm/templates/truststore/init_truststore_job.yaml b/src/main/helm/templates/truststore/init_truststore_job.yaml index 91bd3442..6285cf7b 100644 --- a/src/main/helm/templates/truststore/init_truststore_job.yaml +++ b/src/main/helm/templates/truststore/init_truststore_job.yaml @@ -30,6 +30,9 @@ metadata: namespace: {{ include "app.namespace" . }} labels: {{- include "app.defaultLabels" . | indent 4 }} + annotations: + argocd.argoproj.io/hook: Sync + argocd.argoproj.io/hook-delete-policy: HookSucceeded spec: template: metadata: diff --git a/src/test/helm/truststore/init_truststore_job_test.yaml b/src/test/helm/truststore/init_truststore_job_test.yaml index d14bc197..1a764f60 100644 --- a/src/test/helm/truststore/init_truststore_job_test.yaml +++ b/src/test/helm/truststore/init_truststore_job_test.yaml @@ -79,6 +79,12 @@ tests: - equal: path: metadata.labels["ozgcloud-mongodb-client"] value: "true" + - equal: + path: metadata.annotations["argocd.argoproj.io/hook"] + value: Sync + - equal: + path: metadata.annotations["argocd.argoproj.io/hook-delete-policy"] + value: HookSucceeded - it: check default template metadata asserts: -- GitLab