diff --git a/library/common/1.0.0/templates/class/_secret.tpl b/library/common/1.0.0/templates/class/_secret.tpl index be638f8b0e..cd1a87650c 100644 --- a/library/common/1.0.0/templates/class/_secret.tpl +++ b/library/common/1.0.0/templates/class/_secret.tpl @@ -2,15 +2,15 @@ {{- $secretName := .secretName -}} {{- $data := .data -}} {{- $contentType := .contentType -}} - {{- $secretType := .secretType -}} + {{- $secretType := .secretType -}} {{/* Optional */}} {{- $secretLabels := .labels -}} {{- $secretAnnotations := .annotations -}} {{- $root := .root -}} - {{- $typeClass := "Opaque" -}} - {{- if eq $contentType "certificate" -}} + {{- $typeClass := "Opaque" -}} {{/* Default to Opaque */}} + {{- if eq $contentType "certificate" -}} {{/* Certificate content has specific type */}} {{- $typeClass = (include "ix.v1.common.capabilities.secret.certificate.type" $root) -}} - {{- else if eq $contentType "pullSecret" -}} + {{- else if eq $contentType "pullSecret" -}} {{/* imagePullSecrets content has specific type */}} {{- $typeClass = (include "ix.v1.common.capabilities.secret.imagePullSecret.type" $root) -}} {{- end -}} diff --git a/run_common_tests.sh b/run_common_tests.sh index fc436b31d9..cf907dc196 100755 --- a/run_common_tests.sh +++ b/run_common_tests.sh @@ -11,6 +11,8 @@ function cleanup { echo "🧹 Cleaning up charts..." rm -r "$common_test_path/charts" rm "$common_test_path/Chart.lock" + # Clean snapshots + rm -r "$common_test_path/**/__snapshot__" 2> /dev/null fi }