From ef7b00a6bf88e9795a4700b1c4f6e54042cfe479 Mon Sep 17 00:00:00 2001 From: guipal Date: Thu, 9 Jan 2025 12:08:29 +0100 Subject: [PATCH] Conditional generation of secret --- charts/templates/secret.yaml | 4 +++- charts/values.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/templates/secret.yaml b/charts/templates/secret.yaml index 25b590b..c6d7573 100644 --- a/charts/templates/secret.yaml +++ b/charts/templates/secret.yaml @@ -1,3 +1,4 @@ +{{ if .Values.defectDojoApiCredentials.createSecret }} apiVersion: v1 kind: Secret metadata: @@ -9,4 +10,5 @@ stringData: | quote }} url: {{ required "defectDojoApiCredentials.url is required" .Values.defectDojoApiCredentials.url | quote }} -type: Opaque \ No newline at end of file +type: Opaque +{{ end }} \ No newline at end of file diff --git a/charts/values.yaml b/charts/values.yaml index de31645..a91bcd1 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -1,4 +1,5 @@ defectDojoApiCredentials: + createSecret: true apiKey: "YOUR_DEFECTDOJO_API_KEY" url: "YOUR_DEFECTDOJO_URL" kubernetesClusterDomain: cluster.local