From 662675fb33dff1ce255e9a8da32cb7ca971fa12d Mon Sep 17 00:00:00 2001 From: Josip Rodin Date: Fri, 31 Jul 2026 13:33:12 +0200 Subject: [PATCH 1/9] Parametrize external-secrets.io API version to facilitate migration --- charts/cf-common/templates/common/_versions.tpl | 16 ++++++++++++++++ .../external-secrets/_external-secrets.tpl | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/charts/cf-common/templates/common/_versions.tpl b/charts/cf-common/templates/common/_versions.tpl index f221ed98..dd9e3ff4 100644 --- a/charts/cf-common/templates/common/_versions.tpl +++ b/charts/cf-common/templates/common/_versions.tpl @@ -21,3 +21,19 @@ Return the appropriate apiVersion for HPA {{- print "autoscaling/v2" -}} {{- end -}} {{- end -}} + +{{/* +Return the appropriate apiVersion for External Secrets +(created for the migration from external-secrets.io/v1beta1 to v1) +*/}} +{{- define "cf-common-0.34.0.apiVersion.externalSecrets" -}} +{{- if .Values.apiVersionOverrides -}} + {{- if .Values.apiVersionOverrides.externalSecrets -}} + {{- print .Values.apiVersionOverrides.externalSecrets -}} + {{- else -}} + {{- print "external-secrets.io/v1" -}} + {{- end -}} +{{- else -}} + {{- print "external-secrets.io/v1" -}} +{{- end -}} +{{- end -}} diff --git a/charts/cf-common/templates/external-secrets/_external-secrets.tpl b/charts/cf-common/templates/external-secrets/_external-secrets.tpl index 22006142..bb290161 100644 --- a/charts/cf-common/templates/external-secrets/_external-secrets.tpl +++ b/charts/cf-common/templates/external-secrets/_external-secrets.tpl @@ -1,7 +1,7 @@ {{- define "cf-common-0.34.0.external-secrets" }} {{- $templatedExternalSecrets := include "cf-common-0.34.0.tplrender" (dict "Values" .Values.externalSecrets "context" $) | fromYaml }} {{- range $i, $secret := .Values.externalSecrets }} -apiVersion: external-secrets.io/v1beta1 +apiVersion: {{ include "cf-common-0.34.0.apiVersion.externalSecrets" . }} kind: ExternalSecret metadata: name: {{ $secret.name }} From 1a9d5eefc91794388ed79cdc1ed7b1f508ebbb68 Mon Sep 17 00:00:00 2001 From: Josip Rodin Date: Fri, 31 Jul 2026 13:49:32 +0200 Subject: [PATCH 2/9] Bump version to 0.35 --- charts/cf-common/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cf-common/Chart.yaml b/charts/cf-common/Chart.yaml index fdb83993..3f9f8979 100644 --- a/charts/cf-common/Chart.yaml +++ b/charts/cf-common/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v0.0.0 description: Codefresh library chart name: cf-common -version: 0.34.0 +version: 0.35.0 type: library keywords: - codefresh From 793f06115484ae5096b79c2b37b386c4cb4b52ff Mon Sep 17 00:00:00 2001 From: Josip Rodin Date: Fri, 31 Jul 2026 13:50:26 +0200 Subject: [PATCH 3/9] Run scripts/update-tpl-version.sh --- .../templates/classic/_env_var_secret_ref.tpl | 82 +++++++++---------- .../cf-common/templates/classic/_helpers.tpl | 10 +-- .../templates/common/_annotations.tpl | 10 +-- charts/cf-common/templates/common/_labels.tpl | 22 ++--- charts/cf-common/templates/common/_names.tpl | 10 +-- charts/cf-common/templates/common/_tpl.tpl | 4 +- .../cf-common/templates/common/_versions.tpl | 8 +- .../templates/container/_container.tpl | 26 +++--- .../templates/container/_env_vars.tpl | 6 +- .../cf-common/templates/container/_image.tpl | 16 ++-- .../cf-common/templates/container/_ports.tpl | 4 +- .../cf-common/templates/container/_probes.tpl | 4 +- .../templates/container/_volumemounts.tpl | 4 +- .../controller/_analysis-template.tpl | 6 +- .../templates/controller/_controller.tpl | 16 ++-- .../templates/controller/_cronjob.tpl | 20 ++--- .../templates/controller/_deployment.tpl | 22 ++--- .../cf-common/templates/controller/_job.tpl | 22 ++--- .../cf-common/templates/controller/_pod.tpl | 18 ++-- .../templates/controller/_rollout.tpl | 24 +++--- .../templates/controller/_statefulset.tpl | 30 +++---- .../templates/controller/_volumes.tpl | 8 +- .../external-secrets/_external-secrets.tpl | 12 +-- .../cf-common/templates/ingress/_ingress.tpl | 34 ++++---- .../cf-common/templates/ingress/_primary.tpl | 4 +- .../templates/keda/_scaledobject.tpl | 14 ++-- .../templates/keda/_triggerauthentication.tpl | 6 +- .../cf-common/templates/persistence/_pvc.tpl | 16 ++-- .../templates/persistence/_storage.tpl | 4 +- charts/cf-common/templates/render/_all.tpl | 16 ++-- .../templates/render/_configmaps.tpl | 14 ++-- .../templates/render/_extra_resources.tpl | 6 +- charts/cf-common/templates/render/_hpa.tpl | 12 +-- charts/cf-common/templates/render/_pdb.tpl | 10 +-- .../cf-common/templates/render/_podMontor.tpl | 16 ++-- charts/cf-common/templates/render/_rbac.tpl | 30 +++---- .../cf-common/templates/render/_secrets.tpl | 14 ++-- .../templates/render/_serviceMonitor.tpl | 16 ++-- .../templates/services/_primary_port.tpl | 4 +- .../templates/services/_primary_svc.tpl | 4 +- .../templates/services/_services.tpl | 24 +++--- .../templates/signadot/_virtualservice.tpl | 16 ++-- 42 files changed, 322 insertions(+), 322 deletions(-) diff --git a/charts/cf-common/templates/classic/_env_var_secret_ref.tpl b/charts/cf-common/templates/classic/_env_var_secret_ref.tpl index e2d061af..194713ef 100644 --- a/charts/cf-common/templates/classic/_env_var_secret_ref.tpl +++ b/charts/cf-common/templates/classic/_env_var_secret_ref.tpl @@ -1,18 +1,18 @@ {{- /* MONGODB_HOST env var secret name */}} -{{- define "cf-common-0.34.0.classic.mongodb-host-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.mongodb-host-env-var-secret-name" }} {{- if or .Values.mongodbHostSecretKeyRef .Values.global.mongodbHostSecretKeyRef }} {{- printf (coalesce .Values.mongodbHostSecretKeyRef.name .Values.global.mongodbHostSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* MONGODB_HOST env var secret key */}} -{{- define "cf-common-0.34.0.classic.mongodb-host-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.mongodb-host-env-var-secret-key" }} {{- if or .Values.mongodbHostSecretKeyRef .Values.global.mongodbHostSecretKeyRef }} {{- printf (coalesce .Values.mongodbHostSecretKeyRef.key .Values.global.mongodbHostSecretKeyRef.key) }} {{- else }} @@ -23,18 +23,18 @@ MONGODB_HOST env var secret key {{- /* MONGODB_USER env var secret name */}} -{{- define "cf-common-0.34.0.classic.mongodb-user-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.mongodb-user-env-var-secret-name" }} {{- if or .Values.mongodbUserSecretKeyRef .Values.global.mongodbUserSecretKeyRef }} {{- printf (coalesce .Values.mongodbUserSecretKeyRef.name .Values.global.mongodbUserSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* MONGODB_USER env var secret key */}} -{{- define "cf-common-0.34.0.classic.mongodb-user-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.mongodb-user-env-var-secret-key" }} {{- if or .Values.mongodbUserSecretKeyRef .Values.global.mongodbUserSecretKeyRef }} {{- printf (coalesce .Values.mongodbUserSecretKeyRef.key .Values.global.mongodbUserSecretKeyRef.key) }} {{- else }} @@ -45,18 +45,18 @@ MONGODB_USER env var secret key {{- /* MONGODB_PASSWORD env var secret name */}} -{{- define "cf-common-0.34.0.classic.mongodb-password-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.mongodb-password-env-var-secret-name" }} {{- if or .Values.mongodbPasswordSecretKeyRef .Values.global.mongodbPasswordSecretKeyRef }} {{- printf (coalesce .Values.mongodbPasswordSecretKeyRef.name .Values.global.mongodbPasswordSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* MONGODB_PASSWORD env var secret key */}} -{{- define "cf-common-0.34.0.classic.mongodb-password-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.mongodb-password-env-var-secret-key" }} {{- if or .Values.mongodbPasswordSecretKeyRef .Values.global.mongodbPasswordSecretKeyRef }} {{- printf (coalesce .Values.mongodbPasswordSecretKeyRef.key .Values.global.mongodbPasswordSecretKeyRef.key) }} {{- else }} @@ -67,7 +67,7 @@ MONGODB_PASSWORD env var secret key {{- /* MONGO_URI env var value */}} -{{- define "cf-common-0.34.0.classic.mongo-uri-env-var-value" }} +{{- define "cf-common-0.35.0.classic.mongo-uri-env-var-value" }} {{- /* Check for legacy global.mongoURI */}} @@ -84,7 +84,7 @@ New secret implementation {{- /* MONGO_URI_ARCHIVE env var value */}} -{{- define "cf-common-0.34.0.classic.mongo-uri-archive-env-var-value" }} +{{- define "cf-common-0.35.0.classic.mongo-uri-archive-env-var-value" }} {{- /* Check for legacy global.mongoURIArchive or global.mongoURI */}} @@ -102,18 +102,18 @@ New secret implementation {{- /* REDIS_URL env var secret name */}} -{{- define "cf-common-0.34.0.classic.redis-url-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.redis-url-env-var-secret-name" }} {{- if or .Values.redisUrlSecretKeyRef .Values.global.redisUrlSecretKeyRef }} {{- printf (coalesce .Values.redisUrlSecretKeyRef.name .Values.global.redisUrlSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* REDIS_URL env var secret key */}} -{{- define "cf-common-0.34.0.classic.redis-url-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.redis-url-env-var-secret-key" }} {{- if or .Values.redisUrlSecretKeyRef .Values.global.redisUrlSecretKeyRef }} {{- printf (coalesce .Values.redisUrlSecretKeyRef.key .Values.global.redisUrlSecretKeyRef.key) }} {{- else }} @@ -124,18 +124,18 @@ REDIS_URL env var secret key {{- /* REDIS_PASSWORD env var secret name */}} -{{- define "cf-common-0.34.0.classic.redis-password-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.redis-password-env-var-secret-name" }} {{- if or .Values.redisPasswordSecretKeyRef .Values.global.redisPasswordSecretKeyRef }} {{- printf (coalesce .Values.redisPasswordSecretKeyRef.name .Values.global.redisPasswordSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* REDIS_PASSWORD env var secret key */}} -{{- define "cf-common-0.34.0.classic.redis-password-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.redis-password-env-var-secret-key" }} {{- if or .Values.redisPasswordSecretKeyRef .Values.global.redisPasswordSecretKeyRef }} {{- printf (coalesce .Values.redisPasswordSecretKeyRef.key .Values.global.redisPasswordSecretKeyRef.key) }} {{- else }} @@ -146,18 +146,18 @@ REDIS_PASSWORD env var secret key {{- /* POSTGRES_HOSTNAME env var secret name */}} -{{- define "cf-common-0.34.0.classic.postgres-hostname-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.postgres-hostname-env-var-secret-name" }} {{- if or .Values.postgresHostnameSecretKeyRef .Values.global.postgresHostnameSecretKeyRef }} {{- printf (coalesce .Values.postgresHostnameSecretKeyRef.name .Values.global.postgresHostnameSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* POSTGRES_HOSTNAME env var secret key */}} -{{- define "cf-common-0.34.0.classic.postgres-hostname-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.postgres-hostname-env-var-secret-key" }} {{- if or .Values.postgresHostnameSecretKeyRef .Values.global.postgresHostnameSecretKeyRef }} {{- printf (coalesce .Values.postgresHostnameSecretKeyRef.key .Values.global.postgresHostnameSecretKeyRef.key) }} {{- else }} @@ -168,18 +168,18 @@ POSTGRES_HOSTNAME env var secret key {{- /* POSTGRES_PASSWORD env var secret name */}} -{{- define "cf-common-0.34.0.classic.postgres-password-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.postgres-password-env-var-secret-name" }} {{- if or .Values.postgresPasswordSecretKeyRef .Values.global.postgresPasswordSecretKeyRef }} {{- printf (coalesce .Values.postgresPasswordSecretKeyRef.name .Values.global.postgresPasswordSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* POSTGRES_PASSWORD env var secret key */}} -{{- define "cf-common-0.34.0.classic.postgres-password-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.postgres-password-env-var-secret-key" }} {{- if or .Values.postgresPasswordSecretKeyRef .Values.global.postgresPasswordSecretKeyRef }} {{- printf (coalesce .Values.postgresPasswordSecretKeyRef.key .Values.global.postgresPasswordSecretKeyRef.key) }} {{- else }} @@ -190,18 +190,18 @@ POSTGRES_PASSWORD env var secret key {{- /* POSTGRES_USER env var secret name */}} -{{- define "cf-common-0.34.0.classic.postgres-user-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.postgres-user-env-var-secret-name" }} {{- if or .Values.postgresUserSecretKeyRef .Values.global.postgresUserSecretKeyRef }} {{- printf (coalesce .Values.postgresUserSecretKeyRef.name .Values.global.postgresUserSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* POSTGRES_USER env var secret key */}} -{{- define "cf-common-0.34.0.classic.postgres-user-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.postgres-user-env-var-secret-key" }} {{- if or .Values.postgresUserSecretKeyRef .Values.global.postgresUserSecretKeyRef }} {{- printf (coalesce .Values.postgresUserSecretKeyRef.key .Values.global.postgresUserSecretKeyRef.key) }} {{- else }} @@ -212,18 +212,18 @@ POSTGRES_USER env var secret key {{- /* RABBITMQ_HOSTNAME env var secret name */}} -{{- define "cf-common-0.34.0.classic.rabbitmq-hostname-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.rabbitmq-hostname-env-var-secret-name" }} {{- if or .Values.rabbitmqHostnameSecretKeyRef .Values.global.rabbitmqHostnameSecretKeyRef }} {{- printf (coalesce .Values.rabbitmqHostnameSecretKeyRef.name .Values.global.rabbitmqHostnameSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* RABBITMQ_HOSTNAME env var secret key */}} -{{- define "cf-common-0.34.0.classic.rabbitmq-hostname-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.rabbitmq-hostname-env-var-secret-key" }} {{- if or .Values.rabbitmqHostnameSecretKeyRef .Values.global.rabbitmqHostnameSecretKeyRef }} {{- printf (coalesce .Values.rabbitmqHostnameSecretKeyRef.key .Values.global.rabbitmqHostnameSecretKeyRef.key) }} {{- else }} @@ -234,18 +234,18 @@ RABBITMQ_HOSTNAME env var secret key {{- /* RABBITMQ_PASSWORD env var secret name */}} -{{- define "cf-common-0.34.0.classic.rabbitmq-password-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.rabbitmq-password-env-var-secret-name" }} {{- if or .Values.rabbitmqPasswordSecretKeyRef .Values.global.rabbitmqPasswordSecretKeyRef }} {{- printf (coalesce .Values.rabbitmqPasswordSecretKeyRef.name .Values.global.rabbitmqPasswordSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* RABBITMQ_PASSWORD env var secret key */}} -{{- define "cf-common-0.34.0.classic.rabbitmq-password-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.rabbitmq-password-env-var-secret-key" }} {{- if or .Values.rabbitmqPasswordSecretKeyRef .Values.global.rabbitmqPasswordSecretKeyRef }} {{- printf (coalesce .Values.rabbitmqPasswordSecretKeyRef.key .Values.global.rabbitmqPasswordSecretKeyRef.key) }} {{- else }} @@ -256,18 +256,18 @@ RABBITMQ_PASSWORD env var secret key {{- /* RABBITMQ_USERNAME env var secret name */}} -{{- define "cf-common-0.34.0.classic.rabbitmq-username-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.rabbitmq-username-env-var-secret-name" }} {{- if or .Values.rabbitmqUsernameSecretKeyRef .Values.global.rabbitmqUsernameSecretKeyRef }} {{- printf (coalesce .Values.rabbitmqUsernameSecretKeyRef.name .Values.global.rabbitmqUsernameSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* RABBITMQ_USERNAME env var secret key */}} -{{- define "cf-common-0.34.0.classic.rabbitmq-username-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.rabbitmq-username-env-var-secret-key" }} {{- if or .Values.rabbitmqUsernameSecretKeyRef .Values.global.rabbitmqUsernameSecretKeyRef }} {{- printf (coalesce .Values.rabbitmqUsernameSecretKeyRef.key .Values.global.rabbitmqUsernameSecretKeyRef.key) }} {{- else }} @@ -278,18 +278,18 @@ RABBITMQ_USERNAME env var secret key {{- /* FIREBASE_SECRET env var secret name */}} -{{- define "cf-common-0.34.0.classic.firebase-secret-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.firebase-secret-env-var-secret-name" }} {{- if or .Values.firebaseSecretSecretKeyRef .Values.global.firebaseSecretSecretKeyRef }} {{- printf (coalesce .Values.firebaseSecretSecretKeyRef.name .Values.global.firebaseSecretSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* FIREBASE_SECRET env var secret key */}} -{{- define "cf-common-0.34.0.classic.firebase-secret-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.firebase-secret-env-var-secret-key" }} {{- if or .Values.firebaseSecretSecretKeyRef .Values.global.firebaseSecretSecretKeyRef }} {{- printf (coalesce .Values.firebaseSecretSecretKeyRef.key .Values.global.firebaseSecretSecretKeyRef.key) }} {{- else }} @@ -300,18 +300,18 @@ FIREBASE_SECRET env var secret key {{- /* FIREBASE_URL env var secret name */}} -{{- define "cf-common-0.34.0.classic.firebase-url-env-var-secret-name" }} +{{- define "cf-common-0.35.0.classic.firebase-url-env-var-secret-name" }} {{- if or .Values.firebaseUrlSecretKeyRef .Values.global.firebaseUrlSecretKeyRef }} {{- printf (coalesce .Values.firebaseUrlSecretKeyRef.name .Values.global.firebaseUrlSecretKeyRef.name) }} {{- else }} -{{- printf "%s-%s" (include "cf-common-0.34.0.names.fullname" .) "secret" }} +{{- printf "%s-%s" (include "cf-common-0.35.0.names.fullname" .) "secret" }} {{- end }} {{- end }} {{- /* FIREBASE_URL env var secret key */}} -{{- define "cf-common-0.34.0.classic.firebase-url-env-var-secret-key" }} +{{- define "cf-common-0.35.0.classic.firebase-url-env-var-secret-key" }} {{- if or .Values.firebaseUrlSecretKeyRef .Values.global.firebaseUrlSecretKeyRef }} {{- printf (coalesce .Values.firebaseUrlSecretKeyRef.key .Values.global.firebaseUrlSecretKeyRef.key) }} {{- else }} diff --git a/charts/cf-common/templates/classic/_helpers.tpl b/charts/cf-common/templates/classic/_helpers.tpl index 3bab2d44..1965b651 100644 --- a/charts/cf-common/templates/classic/_helpers.tpl +++ b/charts/cf-common/templates/classic/_helpers.tpl @@ -2,10 +2,10 @@ Calculate RabbitMQ URI (for On-Prem) Must me called from chart root context. Usage: -{{ include "cf-common-0.34.0.classic.calculateRabbitMqUri" . }} +{{ include "cf-common-0.35.0.classic.calculateRabbitMqUri" . }} */}} -{{- define "cf-common-0.34.0.classic.calculateRabbitMqUri" }} +{{- define "cf-common-0.35.0.classic.calculateRabbitMqUri" }} {{- $rabbitmqProtocol := .Values.global.rabbitmqProtocol | default "amqp" -}} {{- $rabbitmqUsername := .Values.global.rabbitmqUsername -}} @@ -23,9 +23,9 @@ coalesce here for backward compatibility {{/* Calculate Mongo Uri (for On-Prem) Usage: -{{ include "cf.common-0.34.0.classic.calculateMongoUri" (dict "dbName" $.Values.global.pipelineManagerService "mongoURI" $.Values.global.mongoURI) }} +{{ include "cf.common-0.35.0.classic.calculateMongoUri" (dict "dbName" $.Values.global.pipelineManagerService "mongoURI" $.Values.global.mongoURI) }} */}} -{{- define "cf-common-0.34.0.classic.calculateMongoUri" -}} +{{- define "cf-common-0.35.0.classic.calculateMongoUri" -}} {{- if contains "?" .mongoURI -}} {{- $mongoURI := (splitList "?" .mongoURI) -}} {{- printf "%s%s?%s" (first $mongoURI) .dbName (last $mongoURI) }} @@ -39,7 +39,7 @@ Usage: {{/* Calculate Consul host Uri (for On-Prem) */}} -{{- define "cf-common-0.34.0.classic.calculateConsulUri" }} +{{- define "cf-common-0.35.0.classic.calculateConsulUri" }} {{- if .Values.global.consulHost }} {{- printf "http://%s:%v" .Values.global.consulHost .Values.global.consulHttpPort -}} {{- else }} diff --git a/charts/cf-common/templates/common/_annotations.tpl b/charts/cf-common/templates/common/_annotations.tpl index 3bd0f687..5fcc3d96 100644 --- a/charts/cf-common/templates/common/_annotations.tpl +++ b/charts/cf-common/templates/common/_annotations.tpl @@ -2,19 +2,19 @@ Render checksum annotation Must be called from chart root context. Usage: -annotations: {{ include "cf-common-0.34.0.annotations.podAnnotations" . | nindent }} +annotations: {{ include "cf-common-0.35.0.annotations.podAnnotations" . | nindent }} */}} -{{- define "cf-common-0.34.0.annotations.podAnnotations" -}} +{{- define "cf-common-0.35.0.annotations.podAnnotations" -}} {{- if .Values.podAnnotations -}} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 0 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 0 }} {{- end -}} {{- $configMapFound := dict -}} {{- range $configMapIndex, $configMapItem := .Values.configMaps -}} {{- if $configMapItem.enabled -}} - {{- $_ := set $configMapFound $configMapIndex ( include "cf-common-0.34.0.tplrender" (dict "Values" $configMapItem.data "context" $) | sha256sum) -}} + {{- $_ := set $configMapFound $configMapIndex ( include "cf-common-0.35.0.tplrender" (dict "Values" $configMapItem.data "context" $) | sha256sum) -}} {{- end -}} {{- if $configMapFound -}} @@ -27,7 +27,7 @@ annotations: {{ include "cf-common-0.34.0.annotations.podAnnotations" . | ninden {{- range $secretIndex, $secretItem := .Values.secrets -}} {{- if $secretItem.enabled -}} - {{- $_ := set $secretFound $secretIndex ( include "cf-common-0.34.0.tplrender" (dict "Values" $secretItem.stringData "context" $) | sha256sum) -}} + {{- $_ := set $secretFound $secretIndex ( include "cf-common-0.35.0.tplrender" (dict "Values" $secretItem.stringData "context" $) | sha256sum) -}} {{- end -}} {{- if $secretFound -}} diff --git a/charts/cf-common/templates/common/_labels.tpl b/charts/cf-common/templates/common/_labels.tpl index 5b256c15..135a7f6c 100644 --- a/charts/cf-common/templates/common/_labels.tpl +++ b/charts/cf-common/templates/common/_labels.tpl @@ -1,24 +1,24 @@ {{/* Kubernetes standard labels */}} -{{- define "cf-common-0.34.0.labels.standard" -}} -app.kubernetes.io/name: {{ include "cf-common-0.34.0.names.name" . }} -helm.sh/chart: {{ include "cf-common-0.34.0.names.chart" . }} +{{- define "cf-common-0.35.0.labels.standard" -}} +app.kubernetes.io/name: {{ include "cf-common-0.35.0.names.name" . }} +helm.sh/chart: {{ include "cf-common-0.35.0.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- if .Values.fullnameOverride }} -app.kubernetes.io/component: {{ include "cf-common-0.34.0.names.fullname" . }} +app.kubernetes.io/component: {{ include "cf-common-0.35.0.names.fullname" . }} {{- end }} {{- end -}} {{/* Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector */}} -{{- define "cf-common-0.34.0.labels.matchLabels" -}} -app.kubernetes.io/name: {{ include "cf-common-0.34.0.names.name" . }} +{{- define "cf-common-0.35.0.labels.matchLabels" -}} +app.kubernetes.io/name: {{ include "cf-common-0.35.0.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- if .Values.fullnameOverride }} -app.kubernetes.io/component: {{ include "cf-common-0.34.0.names.fullname" . }} +app.kubernetes.io/component: {{ include "cf-common-0.35.0.names.fullname" . }} {{- end }} {{- end -}} @@ -26,9 +26,9 @@ app.kubernetes.io/component: {{ include "cf-common-0.34.0.names.fullname" . }} {{/* Extra labels Usage: -{{ include "cf-common-0.34.0.labels.extraLabels" ( dict "Values" .Values.path.to.the.labels "context" $) }} +{{ include "cf-common-0.35.0.labels.extraLabels" ( dict "Values" .Values.path.to.the.labels "context" $) }} */}} -{{- define "cf-common-0.34.0.labels.extraLabels" -}} +{{- define "cf-common-0.35.0.labels.extraLabels" -}} {{- if not (kindIs "map" .Values) -}} {{- fail "ERROR: labels block must be a map" -}} {{- end -}} @@ -40,9 +40,9 @@ Usage: {{/* Annotations Usage: -{{ include "cf-common-0.34.0.annotations" ( dict "Values" .Values.path.to.the.annotations "context" $) }} +{{ include "cf-common-0.35.0.annotations" ( dict "Values" .Values.path.to.the.annotations "context" $) }} */}} -{{- define "cf-common-0.34.0.annotations" -}} +{{- define "cf-common-0.35.0.annotations" -}} {{- if not (kindIs "map" .Values) -}} {{- fail "ERROR: annotations block must be a map" -}} {{- end -}} diff --git a/charts/cf-common/templates/common/_names.tpl b/charts/cf-common/templates/common/_names.tpl index c6776063..7a688cf8 100644 --- a/charts/cf-common/templates/common/_names.tpl +++ b/charts/cf-common/templates/common/_names.tpl @@ -1,14 +1,14 @@ {{/* Expand the name of the chart. */}} -{{- define "cf-common-0.34.0.names.name" -}} +{{- define "cf-common-0.35.0.names.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Create chart name and version as used by the chart label. */}} -{{- define "cf-common-0.34.0.names.chart" -}} +{{- define "cf-common-0.35.0.names.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" | trimSuffix "." -}} {{- end -}} @@ -17,7 +17,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "cf-common-0.34.0.names.fullname" -}} +{{- define "cf-common-0.35.0.names.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -33,10 +33,10 @@ If release name contains chart name it will be used as a full name. {{/* ServiceAccount Name */}} -{{- define "cf-common-0.34.0.names.serviceAccountName" -}} +{{- define "cf-common-0.35.0.names.serviceAccountName" -}} {{- if .Values.serviceAccount -}} {{- if .Values.serviceAccount.enabled -}} - {{- .Values.serviceAccount.nameOverride | default (include "cf-common-0.34.0.names.fullname" .) -}} + {{- .Values.serviceAccount.nameOverride | default (include "cf-common-0.35.0.names.fullname" .) -}} {{- else -}} {{- print "default" -}} {{- end -}} diff --git a/charts/cf-common/templates/common/_tpl.tpl b/charts/cf-common/templates/common/_tpl.tpl index 016d38b0..b5d65475 100644 --- a/charts/cf-common/templates/common/_tpl.tpl +++ b/charts/cf-common/templates/common/_tpl.tpl @@ -1,9 +1,9 @@ {{/* Renders a value that contains template. Usage: -{{ include "cf-common-0.34.0.tplrender" ( dict "Values" .Values.path.to.the.Value "context" $) }} +{{ include "cf-common-0.35.0.tplrender" ( dict "Values" .Values.path.to.the.Value "context" $) }} */}} -{{- define "cf-common-0.34.0.tplrender" -}} +{{- define "cf-common-0.35.0.tplrender" -}} {{- $tpl := .Values -}} {{- if not (typeIs "string" $tpl) -}} {{- $tpl = toYaml $tpl -}} diff --git a/charts/cf-common/templates/common/_versions.tpl b/charts/cf-common/templates/common/_versions.tpl index dd9e3ff4..af9b65be 100644 --- a/charts/cf-common/templates/common/_versions.tpl +++ b/charts/cf-common/templates/common/_versions.tpl @@ -1,21 +1,21 @@ {{/* Return the target Kubernetes version */}} -{{- define "cf-common-0.34.0.kubeVersion" -}} +{{- define "cf-common-0.35.0.kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} {{- end -}} {{/* Return the appropriate apiVersion for HPA */}} -{{- define "cf-common-0.34.0.apiVersion.autoscaling" -}} +{{- define "cf-common-0.35.0.apiVersion.autoscaling" -}} {{- if .Values.apiVersionOverrides -}} {{- if .Values.apiVersionOverrides.autoscaling -}} {{- print .Values.apiVersionOverrides.autoscaling -}} {{- else -}} {{- print "autoscaling/v2" -}} {{- end -}} -{{- else if semverCompare "<1.23-0" (include "cf-common-0.34.0.kubeVersion" . ) -}} +{{- else if semverCompare "<1.23-0" (include "cf-common-0.35.0.kubeVersion" . ) -}} {{- print "autoscaling/v2beta2" -}} {{- else -}} {{- print "autoscaling/v2" -}} @@ -26,7 +26,7 @@ Return the appropriate apiVersion for HPA Return the appropriate apiVersion for External Secrets (created for the migration from external-secrets.io/v1beta1 to v1) */}} -{{- define "cf-common-0.34.0.apiVersion.externalSecrets" -}} +{{- define "cf-common-0.35.0.apiVersion.externalSecrets" -}} {{- if .Values.apiVersionOverrides -}} {{- if .Values.apiVersionOverrides.externalSecrets -}} {{- print .Values.apiVersionOverrides.externalSecrets -}} diff --git a/charts/cf-common/templates/container/_container.tpl b/charts/cf-common/templates/container/_container.tpl index 50e5d870..c62126e2 100644 --- a/charts/cf-common/templates/container/_container.tpl +++ b/charts/cf-common/templates/container/_container.tpl @@ -2,27 +2,27 @@ Renders main container in pod template. Called from pod template. Usage: -{{ include "cf-common-0.34.0.container" (dict "Values" .Values.container "context" $) }} +{{ include "cf-common-0.35.0.container" (dict "Values" .Values.container "context" $) }} */}} -{{- define "cf-common-0.34.0.container" -}} +{{- define "cf-common-0.35.0.container" -}} {{/* Restoring root $ context */}} {{- $ := .context -}} -{{- $containerName := include "cf-common-0.34.0.names.fullname" $ -}} +{{- $containerName := include "cf-common-0.35.0.names.fullname" $ -}} {{- if and (hasKey .Values "nameOverride") .Values.nameOverride }} -{{- $containerName = include "cf-common-0.34.0.tplrender" (dict "Values" .Values.nameOverride "context" $) -}} +{{- $containerName = include "cf-common-0.35.0.tplrender" (dict "Values" .Values.nameOverride "context" $) -}} {{- end }} - name: {{ $containerName }} - image: {{ (include "cf-common-0.34.0.tplrender" (dict "Values" (include "cf-common-0.34.0.image.name" (dict "image" .Values.image "context" $)) "context" $)) }} + image: {{ (include "cf-common-0.35.0.tplrender" (dict "Values" (include "cf-common-0.35.0.image.name" (dict "image" .Values.image "context" $)) "context" $)) }} imagePullPolicy: {{ .Values.image.pullPolicy | default "Always" }} {{- with .Values.command }} {{- if not (kindIs "slice" .) }} {{- fail "ERROR: container.command block must be a list!" }} {{- end }} - command: {{- include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $) | nindent 2 }} + command: {{- include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $) | nindent 2 }} {{- end }} {{- with .Values.args }} @@ -52,7 +52,7 @@ Usage: {{- if not (kindIs "slice" .) }} {{ fail "ERROR: container.envFrom block must be a list!"}} {{- end }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $) | trim | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $) | trim | nindent 4 }} {{- end }} {{- range $secretIndex, $secretItem := $.Values.secrets }} {{- if ne $secretItem.envFrom false }} @@ -61,7 +61,7 @@ Usage: {{- if $secretItem.nameOverride }} {{- $secretName = $secretItem.nameOverride }} {{- else }} - {{- $secretName = printf "%s-%s" (include "cf-common-0.34.0.names.fullname" $) $secretIndex }} + {{- $secretName = printf "%s-%s" (include "cf-common-0.35.0.names.fullname" $) $secretIndex }} {{- end }} - secretRef: name: {{ $secretName }} @@ -82,15 +82,15 @@ For backward compatibility (.Values.env takes precedence over .Values.container. {{- $mergedEnv = merge $mergedEnv $.Values.global.env }} {{- end }} env: - {{- include "cf-common-0.34.0.env-vars" (dict "Values" $mergedEnv "context" $) | trim | nindent 2 }} + {{- include "cf-common-0.35.0.env-vars" (dict "Values" $mergedEnv "context" $) | trim | nindent 2 }} {{- if .Values.extraEnv }} - {{- include "cf-common-0.34.0.env-vars" (dict "Values" .Values.extraEnv "context" $) | trim | nindent 2 }} + {{- include "cf-common-0.35.0.env-vars" (dict "Values" .Values.extraEnv "context" $) | trim | nindent 2 }} {{- end }} {{- end }} - {{- include "cf-common-0.34.0.ports" $ | trim | nindent 2 }} + {{- include "cf-common-0.35.0.ports" $ | trim | nindent 2 }} {{- /* For backward compatibility (.Values.volumeMounts takes precedence over .Values.container.volumeMounts) @@ -99,10 +99,10 @@ For backward compatibility (.Values.volumeMounts takes precedence over .Values.c {{- if $.Values.volumeMounts }} {{- $mergedVolumeMounts = mergeOverwrite $mergedVolumeMounts $.Values.volumeMounts }} {{- end }} - volumeMounts: {{ include "cf-common-0.34.0.volumeMounts" (dict "Values" $mergedVolumeMounts "context" $) | trim | nindent 2 }} + volumeMounts: {{ include "cf-common-0.35.0.volumeMounts" (dict "Values" $mergedVolumeMounts "context" $) | trim | nindent 2 }} {{- with .Values.probes }} - {{- include "cf-common-0.34.0.probes" . | trim | nindent 2 }} + {{- include "cf-common-0.35.0.probes" . | trim | nindent 2 }} {{- end }} {{- with .Values.resources }} diff --git a/charts/cf-common/templates/container/_env_vars.tpl b/charts/cf-common/templates/container/_env_vars.tpl index be769ee0..1c06c275 100644 --- a/charts/cf-common/templates/container/_env_vars.tpl +++ b/charts/cf-common/templates/container/_env_vars.tpl @@ -2,9 +2,9 @@ Renders env vars in container template. Called from container template. Usage: -env: {{ include "cf-common-0.34.0.env-vars" (dict "Values" .Values.container.env "context" $) | nindent }} +env: {{ include "cf-common-0.35.0.env-vars" (dict "Values" .Values.container.env "context" $) | nindent }} */}} -{{- define "cf-common-0.34.0.env-vars"}} +{{- define "cf-common-0.35.0.env-vars"}} {{- $ := .context }} {{- if .Values }} {{- if not (kindIs "map" .Values) }} @@ -12,7 +12,7 @@ env: {{ include "cf-common-0.34.0.env-vars" (dict "Values" .Values.container.env {{- end }} {{- end }} {{- $env := .Values }} - {{- $templatedEnv := include "cf-common-0.34.0.tplrender" (dict "Values" $env "context" $) | fromYaml }} + {{- $templatedEnv := include "cf-common-0.35.0.tplrender" (dict "Values" $env "context" $) | fromYaml }} {{- range $name, $val := $templatedEnv }} {{- if or (kindIs "string" $val) (kindIs "bool" $val) (kindIs "int" $val) (kindIs "float64" $val) }} - name: {{ $name }} diff --git a/charts/cf-common/templates/container/_image.tpl b/charts/cf-common/templates/container/_image.tpl index 6297e2ba..f8294d91 100644 --- a/charts/cf-common/templates/container/_image.tpl +++ b/charts/cf-common/templates/container/_image.tpl @@ -2,9 +2,9 @@ Prints full image name. Called from container template. Usage: -{{ include "cf-common-0.34.0.image.name" (dict "image" .Values.container.image "context" $) }} +{{ include "cf-common-0.35.0.image.name" (dict "image" .Values.container.image "context" $) }} */}} -{{- define "cf-common-0.34.0.image.name" -}} +{{- define "cf-common-0.35.0.image.name" -}} {{/* Restoring root $ context */}} {{- $ := .context -}} @@ -68,9 +68,9 @@ For backward compatibility (onprem with private docker registry) Prints full image name. Must be called from chart root context. Usage: -{{ include "cf-common-0.34.0.image.pullSecrets" . }} +{{ include "cf-common-0.35.0.image.pullSecrets" . }} */}} -{{- define "cf-common-0.34.0.image.pullSecrets" -}} +{{- define "cf-common-0.35.0.image.pullSecrets" -}} {{- $pullSecrets := list }} {{- if .Values.global.imagePullSecrets }} @@ -81,10 +81,10 @@ Usage: {{- range $index, $pullSecret := .Values.global.imagePullSecrets -}} {{- if and (kindIs "map" $pullSecret ) }} {{- if and $pullSecret.name }} - {{- $pullSecrets = append $pullSecrets (include "cf-common-0.34.0.tplrender" (dict "Values" $pullSecret.name "context" $)) -}} + {{- $pullSecrets = append $pullSecrets (include "cf-common-0.35.0.tplrender" (dict "Values" $pullSecret.name "context" $)) -}} {{- end }} {{- else }} - {{- $pullSecrets = append $pullSecrets (include "cf-common-0.34.0.tplrender" (dict "Values" $pullSecret "context" $)) -}} + {{- $pullSecrets = append $pullSecrets (include "cf-common-0.35.0.tplrender" (dict "Values" $pullSecret "context" $)) -}} {{- end }} {{- end -}} {{- end -}} @@ -97,10 +97,10 @@ Usage: {{- range $index, $pullSecret := .Values.imagePullSecrets -}} {{- if and (kindIs "map" $pullSecret ) }} {{- if and $pullSecret.name }} - {{- $pullSecrets = append $pullSecrets (include "cf-common-0.34.0.tplrender" (dict "Values" $pullSecret.name "context" $)) -}} + {{- $pullSecrets = append $pullSecrets (include "cf-common-0.35.0.tplrender" (dict "Values" $pullSecret.name "context" $)) -}} {{- end }} {{- else }} - {{- $pullSecrets = append $pullSecrets (include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $)) -}} + {{- $pullSecrets = append $pullSecrets (include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $)) -}} {{- end }} {{- end -}} {{- end -}} diff --git a/charts/cf-common/templates/container/_ports.tpl b/charts/cf-common/templates/container/_ports.tpl index 2c4665c1..6878ae5d 100644 --- a/charts/cf-common/templates/container/_ports.tpl +++ b/charts/cf-common/templates/container/_ports.tpl @@ -2,10 +2,10 @@ Renders ports map in container. Ports are obtained from .Values.service Called from container template. Usage: -ports: {{- include "cf-common-0.34.0.ports" $ | nindent }} +ports: {{- include "cf-common-0.35.0.ports" $ | nindent }} */}} -{{- define "cf-common-0.34.0.ports" -}} +{{- define "cf-common-0.35.0.ports" -}} {{- $ports := list -}} {{- range $serviceName, $serviceItem := .Values.service }} diff --git a/charts/cf-common/templates/container/_probes.tpl b/charts/cf-common/templates/container/_probes.tpl index f7c8b48d..d6f35f11 100644 --- a/charts/cf-common/templates/container/_probes.tpl +++ b/charts/cf-common/templates/container/_probes.tpl @@ -2,9 +2,9 @@ Renders probes map in container. Called from container template. Usage: -probes: {{ include "cf-common-0.34.0.probes" .Values.container.probes | nindent 2 }} +probes: {{ include "cf-common-0.35.0.probes" .Values.container.probes | nindent 2 }} */}} -{{- define "cf-common-0.34.0.probes" -}} +{{- define "cf-common-0.35.0.probes" -}} {{- range $probeName, $probeItem := . }} diff --git a/charts/cf-common/templates/container/_volumemounts.tpl b/charts/cf-common/templates/container/_volumemounts.tpl index ef3c10ab..ea25a0b3 100644 --- a/charts/cf-common/templates/container/_volumemounts.tpl +++ b/charts/cf-common/templates/container/_volumemounts.tpl @@ -2,10 +2,10 @@ Renders volumeMounts list in container. Called from container template. Usage: -volumeMounts: {{- include "cf-common-0.34.0.volumeMounts" (dict "Values" .Values.container.volumeMounts "context" $) | nindent 2 }} +volumeMounts: {{- include "cf-common-0.35.0.volumeMounts" (dict "Values" .Values.container.volumeMounts "context" $) | nindent 2 }} */}} -{{- define "cf-common-0.34.0.volumeMounts" -}} +{{- define "cf-common-0.35.0.volumeMounts" -}} {{/* Restoring root $ context */}} {{- $ := .context -}} diff --git a/charts/cf-common/templates/controller/_analysis-template.tpl b/charts/cf-common/templates/controller/_analysis-template.tpl index c37cf366..ed3ab36e 100644 --- a/charts/cf-common/templates/controller/_analysis-template.tpl +++ b/charts/cf-common/templates/controller/_analysis-template.tpl @@ -1,6 +1,6 @@ -{{- define "cf-common-0.34.0.controller.analysis-template" -}} +{{- define "cf-common-0.35.0.controller.analysis-template" -}} -{{- $fullName:= include "cf-common-0.34.0.names.fullname" . }} +{{- $fullName:= include "cf-common-0.35.0.names.fullname" . }} --- apiVersion: argoproj.io/v1alpha1 @@ -9,7 +9,7 @@ metadata: name: error-rate-{{ $fullName }} spec: {{- with .Values.controller.rollout.analysisTemplate }} - args: {{- include "cf-common-0.34.0.tplrender" (dict "Values" .args "context" $) | nindent 4 }} + args: {{- include "cf-common-0.35.0.tplrender" (dict "Values" .args "context" $) | nindent 4 }} metrics: {{- .metrics | toYaml | nindent 4 }} {{- end }} diff --git a/charts/cf-common/templates/controller/_controller.tpl b/charts/cf-common/templates/controller/_controller.tpl index 0cde762e..2d2e6257 100644 --- a/charts/cf-common/templates/controller/_controller.tpl +++ b/charts/cf-common/templates/controller/_controller.tpl @@ -2,10 +2,10 @@ Renders contoller object. Must be called from chart root context. Usage: -{{- include "cf-common-0.34.0.controller" . -}} +{{- include "cf-common-0.35.0.controller" . -}} */}} -{{- define "cf-common-0.34.0.controller" -}} +{{- define "cf-common-0.35.0.controller" -}} {{- if .Values.controller.enabled -}} @@ -20,22 +20,22 @@ Usage: {{- $_ := set .Values "controller" (deepCopy $mergedControllerValues) -}} {{- if eq .Values.controller.type "rollout" }} - {{ include "cf-common-0.34.0.controller.rollout" . | nindent 0 }} + {{ include "cf-common-0.35.0.controller.rollout" . | nindent 0 }} {{- if .Values.controller.rollout }} {{- if .Values.controller.rollout.analysisTemplate }} {{- if .Values.controller.rollout.analysisTemplate.enabled }} - {{ include "cf-common-0.34.0.controller.analysis-template" . | nindent 0 }} + {{ include "cf-common-0.35.0.controller.analysis-template" . | nindent 0 }} {{- end }} {{- end }} {{- end }} {{- else if eq .Values.controller.type "deployment" }} - {{ include "cf-common-0.34.0.controller.deployment" . | nindent 0 }} + {{ include "cf-common-0.35.0.controller.deployment" . | nindent 0 }} {{- else if eq .Values.controller.type "statefulset" }} - {{ include "cf-common-0.34.0.controller.statefulset" . | nindent 0 }} + {{ include "cf-common-0.35.0.controller.statefulset" . | nindent 0 }} {{- else if eq .Values.controller.type "job" }} - {{ include "cf-common-0.34.0.controller.job" . | nindent 0 }} + {{ include "cf-common-0.35.0.controller.job" . | nindent 0 }} {{- else if eq .Values.controller.type "cronjob" }} - {{ include "cf-common-0.34.0.controller.cronjob" . | nindent 0 }} + {{ include "cf-common-0.35.0.controller.cronjob" . | nindent 0 }} {{- else }} {{ fail (printf "ERROR: %s is invalid controller type!" .Values.controller.type) }} {{- end }} diff --git a/charts/cf-common/templates/controller/_cronjob.tpl b/charts/cf-common/templates/controller/_cronjob.tpl index 793eb6d0..64057b18 100644 --- a/charts/cf-common/templates/controller/_cronjob.tpl +++ b/charts/cf-common/templates/controller/_cronjob.tpl @@ -2,23 +2,23 @@ Renders cronjob template. Must be called from chart root context. Usage: -{{ include "cf-common-0.34.0.controller.cronjob" . }} +{{ include "cf-common-0.35.0.controller.cronjob" . }} */}} -{{- define "cf-common-0.34.0.controller.cronjob" -}} +{{- define "cf-common-0.35.0.controller.cronjob" -}} --- apiVersion: batch/v1 kind: CronJob metadata: - name: {{ include "cf-common-0.34.0.names.fullname" . }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} {{- if .Values.controller.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} {{- end }} {{- if .Values.controller.annotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} {{- end }} spec: concurrencyPolicy: {{ .Values.controller.cronjob.concurrencyPolicy }} @@ -45,15 +45,15 @@ spec: {{- end }} template: metadata: - labels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 12 }} + labels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 12 }} {{- if .Values.podLabels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 12 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 12 }} {{- end }} - {{- with include "cf-common-0.34.0.annotations.podAnnotations" . }} + {{- with include "cf-common-0.35.0.annotations.podAnnotations" . }} annotations: {{- . | nindent 12 }} {{- end }} - spec: {{- include "cf-common-0.34.0.controller.pod" . | trim | nindent 10 -}} + spec: {{- include "cf-common-0.35.0.controller.pod" . | trim | nindent 10 -}} {{- with .Values.controller.cronjob.ttlSecondsAfterFinished }} ttlSecondsAfterFinished: {{ . }} {{- end }} diff --git a/charts/cf-common/templates/controller/_deployment.tpl b/charts/cf-common/templates/controller/_deployment.tpl index 1754ed00..c0ac740e 100644 --- a/charts/cf-common/templates/controller/_deployment.tpl +++ b/charts/cf-common/templates/controller/_deployment.tpl @@ -2,10 +2,10 @@ Renders deployment template Must be called from chart root context. Usage: -{{ include "cf-common-0.34.0.controller.deployment" . }} +{{ include "cf-common-0.35.0.controller.deployment" . }} */}} -{{- define "cf-common-0.34.0.controller.deployment" -}} +{{- define "cf-common-0.35.0.controller.deployment" -}} {{- $controllerValues := deepCopy .Values.controller -}} {{- $deploymentValues := dict -}} @@ -21,7 +21,7 @@ Usage: {{- fail (printf "ERROR: %s is invalid Deployment strategy!" $strategy) -}} {{- end -}} -{{- $deploymentName := include "cf-common-0.34.0.names.fullname" . -}} +{{- $deploymentName := include "cf-common-0.35.0.names.fullname" . -}} {{- if and (hasKey .Values.controller "nameOverride") .Values.controller.nameOverride -}} {{- $deploymentName = printf "%v-%v" $deploymentName .Values.controller.nameOverride -}} {{- end -}} @@ -31,13 +31,13 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ $deploymentName }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} {{- if .Values.controller.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} {{- end }} {{- if .Values.controller.annotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} {{- end }} spec: revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit | int | default 5 }} @@ -45,7 +45,7 @@ spec: replicas: {{ coalesce .Values.controller.replicas .Values.replicaCount | int | default 1 }} {{- end }} selector: - matchLabels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 6 }} + matchLabels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 6 }} strategy: type: {{ $strategy }} {{- with .Values.controller.rollingUpdate }} @@ -61,13 +61,13 @@ spec: {{- end }} template: metadata: - labels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 8 }} + labels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 8 }} {{- if .Values.podLabels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} {{- end }} {{- if .Values.podAnnotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 8 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 8 }} {{- end }} - spec: {{- include "cf-common-0.34.0.controller.pod" . | trim | nindent 6 -}} + spec: {{- include "cf-common-0.35.0.controller.pod" . | trim | nindent 6 -}} {{- end -}} diff --git a/charts/cf-common/templates/controller/_job.tpl b/charts/cf-common/templates/controller/_job.tpl index 68ac8790..253b5269 100644 --- a/charts/cf-common/templates/controller/_job.tpl +++ b/charts/cf-common/templates/controller/_job.tpl @@ -2,23 +2,23 @@ Renders job template. Must be called from chart root context. Usage: -{{ include "cf-common-0.34.0.controller.job" . }} +{{ include "cf-common-0.35.0.controller.job" . }} */}} -{{- define "cf-common-0.34.0.controller.job" -}} +{{- define "cf-common-0.35.0.controller.job" -}} --- apiVersion: batch/v1 kind: Job metadata: - name: {{ include "cf-common-0.34.0.names.fullname" . }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} {{- if .Values.controller.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} {{- end }} {{- if .Values.controller.annotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.controller.job.suspend }} @@ -40,22 +40,22 @@ spec: manualSelector: {{ .Values.controller.job.manualSelector }} {{- if .Values.controller.job.selector }} selector: - matchLabels: {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.job.selector "context" $) | nindent 6 }} + matchLabels: {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.job.selector "context" $) | nindent 6 }} {{- else }} {{ fail (printf "ERROR: manualSelector is enabled! Specify `.job.selector` labels!") }} {{- end }} {{- end }} template: metadata: - labels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 8 }} + labels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 8 }} {{- if .Values.podLabels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} {{- end }} - {{- with include "cf-common-0.34.0.annotations.podAnnotations" . }} + {{- with include "cf-common-0.35.0.annotations.podAnnotations" . }} annotations: {{- . | nindent 8 }} {{- end }} - spec: {{- include "cf-common-0.34.0.controller.pod" . | trim | nindent 6 -}} + spec: {{- include "cf-common-0.35.0.controller.pod" . | trim | nindent 6 -}} {{- with .Values.controller.job.ttlSecondsAfterFinished }} ttlSecondsAfterFinished: {{ . }} {{- end }} diff --git a/charts/cf-common/templates/controller/_pod.tpl b/charts/cf-common/templates/controller/_pod.tpl index fb65b0ce..7e4fe75f 100644 --- a/charts/cf-common/templates/controller/_pod.tpl +++ b/charts/cf-common/templates/controller/_pod.tpl @@ -2,13 +2,13 @@ Renders pod spec. Called from contoller template. Usage: -{{ include "cf-common-0.34.0.controller.pod" . }} +{{ include "cf-common-0.35.0.controller.pod" . }} */}} -{{- define "cf-common-0.34.0.controller.pod" -}} +{{- define "cf-common-0.35.0.controller.pod" -}} -{{- include "cf-common-0.34.0.image.pullSecrets" . }} +{{- include "cf-common-0.35.0.image.pullSecrets" . }} -serviceAccountName: {{ include "cf-common-0.34.0.names.serviceAccountName" . }} +serviceAccountName: {{ include "cf-common-0.35.0.names.serviceAccountName" . }} automountServiceAccountToken: {{ .Values.automountServiceAccountToken | default true }} @@ -58,22 +58,22 @@ initContainers: {{- range $initContainerIndex, $initContainerItem := .Values.initContainers }} {{- if $initContainerItem.enabled }} {{- $_ := set $initContainerItem "nameOverride" $initContainerIndex }} - {{- include "cf-common-0.34.0.container" (dict "Values" $initContainerItem "context" $) | trim | nindent 0 }} + {{- include "cf-common-0.35.0.container" (dict "Values" $initContainerItem "context" $) | trim | nindent 0 }} {{- end }} {{- end }} {{- end }} {{- with .Values.container }} -containers: {{ include "cf-common-0.34.0.container" (dict "Values" . "context" $) | trim | nindent 0 }} +containers: {{ include "cf-common-0.35.0.container" (dict "Values" . "context" $) | trim | nindent 0 }} {{- end }} {{- with .Values.additionalContainers }} {{ toYaml . | nindent 0 }} {{- end }} -volumes: {{ include "cf-common-0.34.0.volumes" (dict "Values" .Values.volumes "context" $) | trim | nindent 0 }} +volumes: {{ include "cf-common-0.35.0.volumes" (dict "Values" .Values.volumes "context" $) | trim | nindent 0 }} {{- with .Values.extraVolumes }} -{{ include "cf-common-0.34.0.volumes" (dict "Values" . "context" $) | trim }} +{{ include "cf-common-0.35.0.volumes" (dict "Values" . "context" $) | trim }} {{- end }} {{- with .Values.hostAliases }} @@ -108,7 +108,7 @@ affinity: {{ toYaml . | nindent 2 }} {{- end }} {{- with .Values.topologySpreadConstraints }} -topologySpreadConstraints: {{- include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $) | nindent 2 }} +topologySpreadConstraints: {{- include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $) | nindent 2 }} {{- end }} {{- with .Values.controller.restartPolicy }} diff --git a/charts/cf-common/templates/controller/_rollout.tpl b/charts/cf-common/templates/controller/_rollout.tpl index c1eb8d4a..ab5a827f 100644 --- a/charts/cf-common/templates/controller/_rollout.tpl +++ b/charts/cf-common/templates/controller/_rollout.tpl @@ -2,11 +2,11 @@ Renders rollout template. Must be called from chart root context. Usage: -{{ include "cf-common-0.34.0.controller.rollout" . }} +{{ include "cf-common-0.35.0.controller.rollout" . }} */}} -{{- define "cf-common-0.34.0.controller.rollout" -}} +{{- define "cf-common-0.35.0.controller.rollout" -}} -{{- $fullName:= include "cf-common-0.34.0.names.fullname" . }} +{{- $fullName:= include "cf-common-0.35.0.names.fullname" . }} {{- $controllerValues := deepCopy .Values.controller -}} {{- $rolloutValues := dict -}} @@ -22,7 +22,7 @@ Usage: {{- fail (printf "ERROR: %s is invalid Rollout strategy!" $strategy) -}} {{- end -}} -{{- $rolloutName := include "cf-common-0.34.0.names.fullname" . -}} +{{- $rolloutName := include "cf-common-0.35.0.names.fullname" . -}} {{- if and (hasKey .Values.controller "nameOverride") .Values.controller.nameOverride -}} {{- $rolloutName = printf "%v-%v" $rolloutName .Values.controller.nameOverride -}} {{- end -}} @@ -32,13 +32,13 @@ apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: {{ $rolloutName }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} {{- if .Values.controller.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} {{- end }} {{- if .Values.controller.annotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} {{- end }} spec: revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit | int | default 5 }} @@ -46,7 +46,7 @@ spec: replicas: {{ coalesce .Values.controller.replicas .Values.replicaCount | int | default 1 }} {{- end }} selector: - matchLabels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 6 }} + matchLabels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 6 }} {{- with .Values.controller.rollout }} analysis: {{ .analysis | toYaml | nindent 4 }} {{- end }} @@ -75,13 +75,13 @@ spec: {{- end }} template: metadata: - labels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 8 }} + labels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 8 }} {{- if .Values.podLabels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} {{- end }} {{- if .Values.podAnnotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 8 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 8 }} {{- end }} - spec: {{- include "cf-common-0.34.0.controller.pod" . | trim | nindent 6 -}} + spec: {{- include "cf-common-0.35.0.controller.pod" . | trim | nindent 6 -}} {{- end -}} diff --git a/charts/cf-common/templates/controller/_statefulset.tpl b/charts/cf-common/templates/controller/_statefulset.tpl index de4af96c..f175b64b 100644 --- a/charts/cf-common/templates/controller/_statefulset.tpl +++ b/charts/cf-common/templates/controller/_statefulset.tpl @@ -2,10 +2,10 @@ Renders statefulset template Must be called from chart root context. Usage: -{{ include "cf-common-0.34.0.controller.statefulset" . }} +{{ include "cf-common-0.35.0.controller.statefulset" . }} */}} -{{- define "cf-common-0.34.0.controller.statefulset" -}} +{{- define "cf-common-0.35.0.controller.statefulset" -}} {{/*Merge .Values.controller with .Values.controller.statefulset*/}} {{- $controllerValues := deepCopy .Values.controller -}} @@ -27,7 +27,7 @@ Usage: {{- fail (printf "ERROR: %s is invalid Stateful Set podManagementPolicy!" $podManagementPolicy) -}} {{- end -}} -{{- $stsName := include "cf-common-0.34.0.names.fullname" . -}} +{{- $stsName := include "cf-common-0.35.0.names.fullname" . -}} {{- if and (hasKey .Values.controller "nameOverride") .Values.controller.nameOverride -}} {{- $stsName = printf "%v-%v" $stsName .Values.controller.nameOverride -}} {{- end -}} @@ -37,21 +37,21 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ $stsName }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} {{- if .Values.controller.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.labels "context" $) | nindent 4 }} {{- end }} {{- if .Values.controller.annotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.controller.annotations "context" $) | nindent 4 }} {{- end }} spec: revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit | int | default 5 }} replicas: {{ coalesce .Values.controller.replicas .Values.replicaCount | int | default 1 }} podManagementPolicy: {{ default "OrderedReady" .Values.controller.podManagementPolicy }} selector: - matchLabels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 6 }} - serviceName: {{ include "cf-common-0.34.0.names.fullname" . }} + matchLabels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 6 }} + serviceName: {{ include "cf-common-0.35.0.names.fullname" . }} updateStrategy: type: {{ $strategy }} {{- with .Values.controller.rollingUpdate }} @@ -62,25 +62,25 @@ spec: {{- end }} template: metadata: - labels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 8 }} + labels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 8 }} {{- if .Values.podLabels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podLabels "context" $) | nindent 8 }} {{- end }} {{- if .Values.podAnnotations }} annotations: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 8 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" .Values.podAnnotations "context" $) | nindent 8 }} {{- end }} - spec: {{- include "cf-common-0.34.0.controller.pod" . | trim | nindent 6 }} + spec: {{- include "cf-common-0.35.0.controller.pod" . | trim | nindent 6 }} volumeClaimTemplates: {{- range $claimIndex, $claimItem := .Values.volumeClaimTemplates }} {{- if not (eq $claimItem.enabled false ) }} - metadata: name: {{ $claimIndex }} {{- with ($claimItem.labels | default dict) }} - labels: {{- include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $) | nindent 10 }} + labels: {{- include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $) | nindent 10 }} {{- end }} {{- with ($claimItem.annotations | default dict) }} - annotations: {{- include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $) | nindent 10 }} + annotations: {{- include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $) | nindent 10 }} {{- end }} spec: {{- $claimSize := required (printf "size is required for PVC %v" $claimItem.name) $claimItem.size }} @@ -89,7 +89,7 @@ spec: resources: requests: storage: {{ $claimSize | quote }} - {{ include "cf-common-0.34.0.storageclass" ( dict "persistence" $claimItem "context" $) }} + {{ include "cf-common-0.35.0.storageclass" ( dict "persistence" $claimItem "context" $) }} {{- end }} {{- end }} {{- end -}} diff --git a/charts/cf-common/templates/controller/_volumes.tpl b/charts/cf-common/templates/controller/_volumes.tpl index 547bf21e..dc085471 100644 --- a/charts/cf-common/templates/controller/_volumes.tpl +++ b/charts/cf-common/templates/controller/_volumes.tpl @@ -2,10 +2,10 @@ Renders volumes in controller template. Called from pod template. Usage: -volumes: {{ include "cf-common-0.34.0.volumes" (dict "Values" .Values.volumes "context" $) | nindent }} +volumes: {{ include "cf-common-0.35.0.volumes" (dict "Values" .Values.volumes "context" $) | nindent }} */}} -{{- define "cf-common-0.34.0.volumes" -}} +{{- define "cf-common-0.35.0.volumes" -}} {{/* Restoring root $ context */}} {{- $ := .context -}} @@ -26,10 +26,10 @@ volumes: {{ include "cf-common-0.34.0.volumes" (dict "Values" .Values.volumes "c {{- if $volumeItem.enabled }} - name: {{ $volumeIndex }} - {{- $volumeName := printf "%s-%s" (include "cf-common-0.34.0.names.fullname" $) $volumeIndex -}} + {{- $volumeName := printf "%s-%s" (include "cf-common-0.35.0.names.fullname" $) $volumeIndex -}} {{- if and (or (hasKey $volumeItem "existingName") (hasKey $volumeItem "nameOverride")) (or $volumeItem.existingName $volumeItem.nameOverride) }} - {{- $volumeName = include "cf-common-0.34.0.tplrender" (dict "Values" (coalesce $volumeItem.nameOverride $volumeItem.existingName) "context" $) -}} + {{- $volumeName = include "cf-common-0.35.0.tplrender" (dict "Values" (coalesce $volumeItem.nameOverride $volumeItem.existingName) "context" $) -}} {{- end }} {{- if eq $volumeItem.type "configMap" }} diff --git a/charts/cf-common/templates/external-secrets/_external-secrets.tpl b/charts/cf-common/templates/external-secrets/_external-secrets.tpl index bb290161..f4e5d41b 100644 --- a/charts/cf-common/templates/external-secrets/_external-secrets.tpl +++ b/charts/cf-common/templates/external-secrets/_external-secrets.tpl @@ -1,7 +1,7 @@ -{{- define "cf-common-0.34.0.external-secrets" }} - {{- $templatedExternalSecrets := include "cf-common-0.34.0.tplrender" (dict "Values" .Values.externalSecrets "context" $) | fromYaml }} +{{- define "cf-common-0.35.0.external-secrets" }} + {{- $templatedExternalSecrets := include "cf-common-0.35.0.tplrender" (dict "Values" .Values.externalSecrets "context" $) | fromYaml }} {{- range $i, $secret := .Values.externalSecrets }} -apiVersion: {{ include "cf-common-0.34.0.apiVersion.externalSecrets" . }} +apiVersion: {{ include "cf-common-0.35.0.apiVersion.externalSecrets" . }} kind: ExternalSecret metadata: name: {{ $secret.name }} @@ -32,9 +32,9 @@ spec: - secretKey: {{ $key.name }} remoteRef: {{- if hasKey $key "remoteSecretName"}} - key: {{ printf "%s" (include "cf-common-0.34.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) }} + key: {{ printf "%s" (include "cf-common-0.35.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) }} {{- else }} - key: {{ printf "%s" (include "cf-common-0.34.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) }} + key: {{ printf "%s" (include "cf-common-0.35.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) }} {{- end }} property: {{ $key.remoteKey }} {{- with $key.decodingStrategy }} @@ -48,7 +48,7 @@ spec: dataFrom: {{- range $i, $key := $secret.keysFrom }} - extract: - key: {{ printf "%s" (include "cf-common-0.34.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) | default (printf "%s" (include "cf-common-0.34.0.tplrender" (dict "Values" $secret.remoteSecretName "context" $))) }} + key: {{ printf "%s" (include "cf-common-0.35.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) | default (printf "%s" (include "cf-common-0.35.0.tplrender" (dict "Values" $secret.remoteSecretName "context" $))) }} {{- with $key.decodingStrategy }} decodingStrategy: {{ . }} {{- end }} diff --git a/charts/cf-common/templates/ingress/_ingress.tpl b/charts/cf-common/templates/ingress/_ingress.tpl index 8e6d55e7..cea12ed6 100644 --- a/charts/cf-common/templates/ingress/_ingress.tpl +++ b/charts/cf-common/templates/ingress/_ingress.tpl @@ -1,9 +1,9 @@ {{/* Iterates over Ingress objects and calls render template. Must be called from chart root context. -{{- include "cf-common-0.34.0.ingress" . -}} +{{- include "cf-common-0.35.0.ingress" . -}} */}} -{{- define "cf-common-0.34.0.ingress" -}} +{{- define "cf-common-0.35.0.ingress" -}} {{- $primary := "" -}} {{- range $name, $ingress := .Values.ingress -}} {{- if and (hasKey $ingress "primary") $ingress.primary $ingress.enabled -}} @@ -26,7 +26,7 @@ Must be called from chart root context. {{- $_ := set $ingressValues "name" $name -}} {{- $_ := set $ "ObjectValues" (dict "ingress" $ingressValues) -}} - {{- include "cf-common-0.34.0.ingress.render" $ | nindent 0 -}} + {{- include "cf-common-0.35.0.ingress.render" $ | nindent 0 -}} {{- end -}} {{- end -}} {{- end -}} @@ -35,8 +35,8 @@ Must be called from chart root context. Renders Ingress objects. Called from the template above. */}} -{{- define "cf-common-0.34.0.ingress.render" -}} - {{- $fullName := include "cf-common-0.34.0.names.fullname" . -}} +{{- define "cf-common-0.35.0.ingress.render" -}} + {{- $fullName := include "cf-common-0.35.0.names.fullname" . -}} {{- $ingressName := $fullName -}} {{- $ingressItem := .Values.ingress -}} @@ -53,24 +53,24 @@ Called from the template above. {{- $defaultServiceName := $fullName -}} {{- $defaultServicePort := dict -}} {{- if .Values.service -}} - {{- $primaryService := get .Values.service (include "cf-common-0.34.0.service.primary" (dict "values" .Values.service)) -}} - {{- $defaultServicePort = get $primaryService.ports (include "cf-common-0.34.0.service.primaryPort" (dict "values" $primaryService)) -}} + {{- $primaryService := get .Values.service (include "cf-common-0.35.0.service.primary" (dict "values" .Values.service)) -}} + {{- $defaultServicePort = get $primaryService.ports (include "cf-common-0.35.0.service.primaryPort" (dict "values" $primaryService)) -}} {{- end -}} --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $ingressName }} - labels: {{ include "cf-common-0.34.0.labels.standard" $ | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" $ | nindent 4 }} {{- if $ingressItem.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $ingressItem.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $ingressItem.labels "context" $) | nindent 4 }} {{- end }} {{- if $ingressItem.annotations }} - annotations: {{- include "cf-common-0.34.0.tplrender" (dict "Values" $ingressItem.annotations "context" $) | nindent 4 }} + annotations: {{- include "cf-common-0.35.0.tplrender" (dict "Values" $ingressItem.annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if $ingressItem.ingressClassName }} - ingressClassName: {{ include "cf-common-0.34.0.tplrender" (dict "Values" $ingressItem.ingressClassName "context" $) }} + ingressClassName: {{ include "cf-common-0.35.0.tplrender" (dict "Values" $ingressItem.ingressClassName "context" $) }} {{- end }} {{- if $ingressItem.tls }} tls: @@ -80,10 +80,10 @@ spec: {{- range $ingressItem.tls }} - hosts: {{- range .hosts }} - - {{ include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $) | quote }} + - {{ include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $) | quote }} {{- end }} {{- if .secretName }} - secretName: {{ include "cf-common-0.34.0.tplrender" (dict "Values" .secretName "context" $) | quote}} + secretName: {{ include "cf-common-0.35.0.tplrender" (dict "Values" .secretName "context" $) | quote}} {{- end }} {{- end }} {{- end }} @@ -92,7 +92,7 @@ spec: {{- fail (printf "ERROR: ingress.%s.hosts must be a list!" $ingressItem.name) }} {{- end }} {{- range $ingressItem.hosts }} - - host: {{ include "cf-common-0.34.0.tplrender" (dict "Values" .host "context" $) | quote }} + - host: {{ include "cf-common-0.35.0.tplrender" (dict "Values" .host "context" $) | quote }} http: paths: {{- if not (kindIs "slice" .paths) }} @@ -105,13 +105,13 @@ spec: {{- $service = default $service .service.name -}} {{- $port = default $port .service.port -}} {{- end }} - - path: {{ include "cf-common-0.34.0.tplrender" (dict "Values" .path "context" $) | quote }} + - path: {{ include "cf-common-0.35.0.tplrender" (dict "Values" .path "context" $) | quote }} pathType: {{ default "ImplementationSpecific" .pathType }} backend: service: - name: {{ include "cf-common-0.34.0.tplrender" (dict "Values" $service "context" $) }} + name: {{ include "cf-common-0.35.0.tplrender" (dict "Values" $service "context" $) }} port: - number: {{ include "cf-common-0.34.0.tplrender" (dict "Values" $port "context" $) }} + number: {{ include "cf-common-0.35.0.tplrender" (dict "Values" $port "context" $) }} {{- end }} {{- end }} {{- end -}} diff --git a/charts/cf-common/templates/ingress/_primary.tpl b/charts/cf-common/templates/ingress/_primary.tpl index 83735827..63b52213 100644 --- a/charts/cf-common/templates/ingress/_primary.tpl +++ b/charts/cf-common/templates/ingress/_primary.tpl @@ -2,9 +2,9 @@ Return the name of the primary ingress object. Called from ingress template. Usage: -{{ include "cf-common-0.34.0.ingress.primary" (dict "values" .Values.ingress ) }} +{{ include "cf-common-0.35.0.ingress.primary" (dict "values" .Values.ingress ) }} */}} -{{- define "cf-common-0.34.0.ingress.primary" -}} +{{- define "cf-common-0.35.0.ingress.primary" -}} {{- $result := "" -}} {{- range $name, $ingress := .values -}} {{- if and (hasKey $ingress "primary") $ingress.primary $ingress.enabled -}} diff --git a/charts/cf-common/templates/keda/_scaledobject.tpl b/charts/cf-common/templates/keda/_scaledobject.tpl index 6ccf1525..5a00d5d1 100644 --- a/charts/cf-common/templates/keda/_scaledobject.tpl +++ b/charts/cf-common/templates/keda/_scaledobject.tpl @@ -1,24 +1,24 @@ -{{- define "cf-common-0.34.0.keda.scaled-object" }} +{{- define "cf-common-0.35.0.keda.scaled-object" }} {{- if .Values.keda.enabled }} {{- if and .Values.hpa.enabled }} {{- fail "ERROR: Both KEDA ScaledObject and HPA are enabled. Disable HPA or Keda ScaledObject!" }} {{- end }} -{{- $controllerName := include "cf-common-0.34.0.names.fullname" . -}} +{{- $controllerName := include "cf-common-0.35.0.names.fullname" . -}} {{- if and (hasKey .Values.controller "nameOverride") .Values.controller.nameOverride -}} {{- $controllerName = printf "%v-%v" $controllerName .Values.controller.nameOverride -}} {{- end -}} -{{- $containerName := include "cf-common-0.34.0.names.fullname" . -}} +{{- $containerName := include "cf-common-0.35.0.names.fullname" . -}} {{- if and (hasKey .Values.container "nameOverride") .Values.container.nameOverride }} - {{- $containerName = include "cf-common-0.34.0.tplrender" (dict "Values" .Values.container.nameOverride "context" .) -}} + {{- $containerName = include "cf-common-0.35.0.tplrender" (dict "Values" .Values.container.nameOverride "context" .) -}} {{- end }} apiVersion: keda.sh/v1alpha1 kind: ScaledObject metadata: - name: {{ include "cf-common-0.34.0.names.fullname" . }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} annotations: {{- with .Values.keda.spec.annotations }} {{- toYaml . | nindent 4 }} @@ -65,7 +65,7 @@ spec: {{- end }} {{- if and $.Values.keda.auth.enabled }} authenticationRef: - name: {{ include "cf-common-0.34.0.names.fullname" $ }} + name: {{ include "cf-common-0.35.0.names.fullname" $ }} {{- end }} {{ end }} {{- end }} diff --git a/charts/cf-common/templates/keda/_triggerauthentication.tpl b/charts/cf-common/templates/keda/_triggerauthentication.tpl index c2e8e05b..cffe9320 100644 --- a/charts/cf-common/templates/keda/_triggerauthentication.tpl +++ b/charts/cf-common/templates/keda/_triggerauthentication.tpl @@ -1,10 +1,10 @@ -{{- define "cf-common-0.34.0.keda.trigger-authentication" }} +{{- define "cf-common-0.35.0.keda.trigger-authentication" }} {{- if and .Values.keda.auth.enabled .Values.keda.enabled }} apiVersion: keda.sh/v1alpha1 kind: TriggerAuthentication metadata: - name: {{ include "cf-common-0.34.0.names.fullname" . }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} spec: secretTargetRef: {{ toYaml .Values.keda.auth.secretTargetRef | nindent 4 }} {{- end }} diff --git a/charts/cf-common/templates/persistence/_pvc.tpl b/charts/cf-common/templates/persistence/_pvc.tpl index 8e88e271..b12bf58a 100644 --- a/charts/cf-common/templates/persistence/_pvc.tpl +++ b/charts/cf-common/templates/persistence/_pvc.tpl @@ -2,33 +2,33 @@ Renders PersistentVolumeClaim objects. Must be called from chart root context. Usage: -{{- include "cf-common-0.34.0.pvc" . -}} +{{- include "cf-common-0.35.0.pvc" . -}} */}} -{{- define "cf-common-0.34.0.pvc" -}} +{{- define "cf-common-0.35.0.pvc" -}} {{- range $pvcIndex, $pvcItem := .Values.persistence }} {{- if and (not $pvcItem.existingClaim) (eq (default "pvc" $pvcItem.type) "pvc") $pvcItem.enabled }} -{{- $pvcName := printf "%s-%s" (include "cf-common-0.34.0.names.fullname" $) $pvcIndex }} +{{- $pvcName := printf "%s-%s" (include "cf-common-0.35.0.names.fullname" $) $pvcIndex }} {{- if and (hasKey $pvcItem "nameOverride") $pvcItem.nameOverride }} -{{- $pvcName = include "cf-common-0.34.0.tplrender" (dict "Values" $pvcItem.nameOverride "context" $) }} +{{- $pvcName = include "cf-common-0.35.0.tplrender" (dict "Values" $pvcItem.nameOverride "context" $) }} {{- end }} --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ $pvcName }} - labels: {{ include "cf-common-0.34.0.labels.standard" $ | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" $ | nindent 4 }} {{- if $pvcItem.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $pvcItem.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $pvcItem.labels "context" $) | nindent 4 }} {{- end }} annotations: {{- if $pvcItem.retain }} "helm.sh/resource-policy": keep {{- end }} {{- if $pvcItem.annotations }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $pvcItem.annotations "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $pvcItem.annotations "context" $) | nindent 4 }} {{- end }} spec: {{- $pvcSize := required (printf "size is required for PVC %v" $pvcName) $pvcItem.size }} @@ -37,7 +37,7 @@ spec: resources: requests: storage: {{ $pvcSize | quote }} - {{ include "cf-common-0.34.0.storageclass" ( dict "persistence" $pvcItem "context" $) }} + {{ include "cf-common-0.35.0.storageclass" ( dict "persistence" $pvcItem "context" $) }} {{- if $pvcItem.volumeName }} volumeName: {{ $pvcItem.volumeName | quote }} {{- end }} diff --git a/charts/cf-common/templates/persistence/_storage.tpl b/charts/cf-common/templates/persistence/_storage.tpl index f0caa8b4..49537936 100644 --- a/charts/cf-common/templates/persistence/_storage.tpl +++ b/charts/cf-common/templates/persistence/_storage.tpl @@ -1,9 +1,9 @@ {{/* Return the proper Storage Class. Called from pvc template. Root $ context must be passed. -{{ include "cf-common-0.34.0.storageclass" ( dict "persistence" .Values.persistence.data "context" $) }} +{{ include "cf-common-0.35.0.storageclass" ( dict "persistence" .Values.persistence.data "context" $) }} */}} -{{- define "cf-common-0.34.0.storageclass" -}} +{{- define "cf-common-0.35.0.storageclass" -}} {{/* Restoring root $ context */}} {{- $ := .context -}} diff --git a/charts/cf-common/templates/render/_all.tpl b/charts/cf-common/templates/render/_all.tpl index 35a05294..ca6d6bcb 100644 --- a/charts/cf-common/templates/render/_all.tpl +++ b/charts/cf-common/templates/render/_all.tpl @@ -2,14 +2,14 @@ Render all underlying templates */}} -{{- define "cf-common-0.34.0.all" -}} +{{- define "cf-common-0.35.0.all" -}} -{{- include "cf-common-0.34.0.controller" . -}} -{{- include "cf-common-0.34.0.service" . -}} -{{- include "cf-common-0.34.0.configmaps" . -}} -{{- include "cf-common-0.34.0.secrets" . -}} -{{- include "cf-common-0.34.0.serviceaccount" . -}} -{{- include "cf-common-0.34.0.rbac" . -}} -{{- include "cf-common-0.34.0.pvc" . -}} +{{- include "cf-common-0.35.0.controller" . -}} +{{- include "cf-common-0.35.0.service" . -}} +{{- include "cf-common-0.35.0.configmaps" . -}} +{{- include "cf-common-0.35.0.secrets" . -}} +{{- include "cf-common-0.35.0.serviceaccount" . -}} +{{- include "cf-common-0.35.0.rbac" . -}} +{{- include "cf-common-0.35.0.pvc" . -}} {{- end -}} diff --git a/charts/cf-common/templates/render/_configmaps.tpl b/charts/cf-common/templates/render/_configmaps.tpl index 5c99d0c8..53117c4b 100644 --- a/charts/cf-common/templates/render/_configmaps.tpl +++ b/charts/cf-common/templates/render/_configmaps.tpl @@ -1,31 +1,31 @@ {{/* Renders ConfigMaps templates. Must be called from chart root context. -{{- include "cf-common-0.34.0.configmaps" . -}} +{{- include "cf-common-0.35.0.configmaps" . -}} */}} -{{- define "cf-common-0.34.0.configmaps" -}} +{{- define "cf-common-0.35.0.configmaps" -}} {{- range $configMapIndex, $configMapItem := .Values.configMaps }} {{- if $configMapItem.enabled }} -{{ $configMapName := printf "%s-%s" (include "cf-common-0.34.0.names.fullname" $) $configMapIndex }} +{{ $configMapName := printf "%s-%s" (include "cf-common-0.35.0.names.fullname" $) $configMapIndex }} --- kind: ConfigMap apiVersion: v1 metadata: name: {{ $configMapName }} - labels: {{ include "cf-common-0.34.0.labels.standard" $ | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" $ | nindent 4 }} {{- if $configMapItem.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $configMapItem.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $configMapItem.labels "context" $) | nindent 4 }} {{- end }} {{- if $configMapItem.annotations }} - annotations: {{- include "cf-common-0.34.0.tplrender" (dict "Values" $configMapItem.annotations "context" $) | nindent 4 }} + annotations: {{- include "cf-common-0.35.0.tplrender" (dict "Values" $configMapItem.annotations "context" $) | nindent 4 }} {{- end }} {{- if not ( or (kindIs "map" $configMapItem.data) (kindIs "string" $configMapItem.data)) }} {{- fail (printf "ERROR: configMaps.%s.data must be a map or multiline string!" $configMapIndex) }} {{- end }} -data: {{ include "cf-common-0.34.0.tplrender" (dict "Values" $configMapItem.data "context" $) | nindent 2 }} +data: {{ include "cf-common-0.35.0.tplrender" (dict "Values" $configMapItem.data "context" $) | nindent 2 }} {{- end }} {{- end }} diff --git a/charts/cf-common/templates/render/_extra_resources.tpl b/charts/cf-common/templates/render/_extra_resources.tpl index daba3c7b..c1e96e8a 100644 --- a/charts/cf-common/templates/render/_extra_resources.tpl +++ b/charts/cf-common/templates/render/_extra_resources.tpl @@ -2,16 +2,16 @@ Renders Extra objects defined at .Values.extraResources Must be called from chart root context. Usage: -{{- include "cf-common-0.34.0.extraResources" . -}} +{{- include "cf-common-0.35.0.extraResources" . -}} */}} -{{- define "cf-common-0.34.0.extraResources" -}} +{{- define "cf-common-0.35.0.extraResources" -}} {{/* Restoring root $ context */}} {{- $ := .context -}} {{- range .Values.extraResources }} -{{ include "cf-common-0.34.0.tplrender" (dict "Values" . "context" $) }} +{{ include "cf-common-0.35.0.tplrender" (dict "Values" . "context" $) }} {{- end }} {{- end -}} diff --git a/charts/cf-common/templates/render/_hpa.tpl b/charts/cf-common/templates/render/_hpa.tpl index 31f3293f..39b17677 100644 --- a/charts/cf-common/templates/render/_hpa.tpl +++ b/charts/cf-common/templates/render/_hpa.tpl @@ -2,10 +2,10 @@ Renders HorizontalPodAutoscaler template. Must be called from chart root context. Usage: -{{- include "cf-common-0.34.0.hpa" . -}} +{{- include "cf-common-0.35.0.hpa" . -}} */}} -{{- define "cf-common-0.34.0.hpa" -}} +{{- define "cf-common-0.35.0.hpa" -}} {{- if .Values.hpa.enabled -}} @@ -19,11 +19,11 @@ Usage: {{- $mergedControllerValues := mergeOverwrite $globalControllerValues $defaultControllerValues -}} {{- $_ := set .Values "controller" (deepCopy $mergedControllerValues) -}} -apiVersion: {{ include "cf-common-0.34.0.apiVersion.autoscaling" . }} +apiVersion: {{ include "cf-common-0.35.0.apiVersion.autoscaling" . }} kind: HorizontalPodAutoscaler metadata: - name: {{ include "cf-common-0.34.0.names.fullname" . }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} spec: scaleTargetRef: {{- if eq .Values.controller.type "deployment" }} @@ -33,7 +33,7 @@ spec: apiVersion: argoproj.io/v1alpha1 kind: Rollout {{- end }} - name: {{ include "cf-common-0.34.0.names.fullname" . }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} minReplicas: {{ required "hpa.minReplicas is required!" .Values.hpa.minReplicas | int }} maxReplicas: {{ required "hpa.maxReplicas is required!" .Values.hpa.maxReplicas | int }} metrics: diff --git a/charts/cf-common/templates/render/_pdb.tpl b/charts/cf-common/templates/render/_pdb.tpl index 03fb75da..e497256e 100644 --- a/charts/cf-common/templates/render/_pdb.tpl +++ b/charts/cf-common/templates/render/_pdb.tpl @@ -1,18 +1,18 @@ {{/* Renders PodDisruptionBudget object. Must be called from chart root context. -{{- include "cf-common-0.34.0.pdb" . -}} +{{- include "cf-common-0.35.0.pdb" . -}} */}} -{{- define "cf-common-0.34.0.pdb" -}} +{{- define "cf-common-0.35.0.pdb" -}} {{- if .Values.pdb.enabled -}} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: - name: {{ include "cf-common-0.34.0.names.fullname" . }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} spec: {{- if or .Values.pdb.minAvailable .Values.pdb.maxUnavailable }} {{- with .Values.pdb.minAvailable }} @@ -25,7 +25,7 @@ spec: {{- fail (printf "ERROR: pdb.minAvailable or pdb.maxUnavailable is required!" ) }} {{- end }} selector: - matchLabels: {{ include "cf-common-0.34.0.labels.matchLabels" . | nindent 6 }} + matchLabels: {{ include "cf-common-0.35.0.labels.matchLabels" . | nindent 6 }} {{- end -}} diff --git a/charts/cf-common/templates/render/_podMontor.tpl b/charts/cf-common/templates/render/_podMontor.tpl index cb1ebdbe..00f85632 100644 --- a/charts/cf-common/templates/render/_podMontor.tpl +++ b/charts/cf-common/templates/render/_podMontor.tpl @@ -2,11 +2,11 @@ Renders Service Monitor objects. */}} -{{- define "cf-common-0.34.0.podMonitor" -}} +{{- define "cf-common-0.35.0.podMonitor" -}} {{- range $podMonitorIndex, $podMonitorItem := .Values.podMonitor -}} -{{- $podMonitorName := include "cf-common-0.34.0.names.fullname" $ -}} +{{- $podMonitorName := include "cf-common-0.35.0.names.fullname" $ -}} {{- if and (hasKey $podMonitorItem "nameOverride") $podMonitorItem.nameOverride -}} {{- $podMonitorName = printf "%v-%v" $podMonitorName $podMonitorItem.nameOverride -}} {{- end -}} @@ -20,24 +20,24 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: {{ $podMonitorName }} - labels: {{ include "cf-common-0.34.0.labels.standard" $ | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" $ | nindent 4 }} {{- if $podMonitorItem.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $podMonitorItem.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $podMonitorItem.labels "context" $) | nindent 4 }} {{- end }} {{- if $podMonitorItem.annotations }} - annotations: {{- include "cf-common-0.34.0.tplrender" (dict "Values" $podMonitorItem.annotations "context" $) | nindent 4 }} + annotations: {{- include "cf-common-0.35.0.tplrender" (dict "Values" $podMonitorItem.annotations "context" $) | nindent 4 }} {{- end }} spec: selector: {{- if $podMonitorItem.selector }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $podMonitorItem.selector "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $podMonitorItem.selector "context" $) | nindent 4 }} {{- else }} matchLabels: - {{- include "cf-common-0.34.0.labels.matchLabels" $ | nindent 6 }} + {{- include "cf-common-0.35.0.labels.matchLabels" $ | nindent 6 }} {{- end }} {{- if $podMonitorItem.namespaceSelector }} namespaceSelector: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $podMonitorItem.namespaceSelector "context" $) | nindent 6 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $podMonitorItem.namespaceSelector "context" $) | nindent 6 }} {{- else }} namespaceSelector: matchNames: diff --git a/charts/cf-common/templates/render/_rbac.tpl b/charts/cf-common/templates/render/_rbac.tpl index 1fb3bb80..2bcaab50 100644 --- a/charts/cf-common/templates/render/_rbac.tpl +++ b/charts/cf-common/templates/render/_rbac.tpl @@ -2,23 +2,23 @@ Renders ServiceAccount/Role/RoleBinding objects. Must be called from chart root context. Usage: -{{- include "cf-common-0.34.0.rbac" . -}} +{{- include "cf-common-0.35.0.rbac" . -}} */}} -{{- define "cf-common-0.34.0.rbac" -}} +{{- define "cf-common-0.35.0.rbac" -}} {{- if .Values.serviceAccount.enabled }} --- apiVersion: v1 kind: ServiceAccount metadata: - name: {{ default ( include "cf-common-0.34.0.names.fullname" $) .Values.serviceAccount.nameOverride }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ default ( include "cf-common-0.35.0.names.fullname" $) .Values.serviceAccount.nameOverride }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} {{- if .Values.serviceAccount.annotations }} - annotations: {{ include "cf-common-0.34.0.tplrender" (dict "Values" .Values.serviceAccount.annotations "context" $) | nindent 4 }} + annotations: {{ include "cf-common-0.35.0.tplrender" (dict "Values" .Values.serviceAccount.annotations "context" $) | nindent 4 }} {{- end }} secrets: - - name: {{ include "cf-common-0.34.0.names.fullname" $ }}-sa-token + - name: {{ include "cf-common-0.35.0.names.fullname" $ }}-sa-token {{- end }} @@ -27,22 +27,22 @@ secrets: apiVersion: rbac.authorization.k8s.io/v1 kind: {{ .Values.rbac.namespaced | ternary "Role" "ClusterRole" }} metadata: - name: {{ include "cf-common-0.34.0.names.fullname" $ }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} -rules: {{ include "cf-common-0.34.0.tplrender" (dict "Values" .Values.rbac.rules "context" $) | nindent 2 }} + name: {{ include "cf-common-0.35.0.names.fullname" $ }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} +rules: {{ include "cf-common-0.35.0.tplrender" (dict "Values" .Values.rbac.rules "context" $) | nindent 2 }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: {{ .Values.rbac.namespaced | ternary "RoleBinding" "ClusterRoleBinding" }} metadata: - name: {{ include "cf-common-0.34.0.names.fullname" $ }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" $ }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} roleRef: kind: {{ .Values.rbac.namespaced | ternary "Role" "ClusterRole" }} - name: {{ include "cf-common-0.34.0.names.fullname" $ }} + name: {{ include "cf-common-0.35.0.names.fullname" $ }} apiGroup: rbac.authorization.k8s.io subjects: - kind: ServiceAccount - name: {{ default ( include "cf-common-0.34.0.names.fullname" $) .Values.serviceAccount.nameOverride }} + name: {{ default ( include "cf-common-0.35.0.names.fullname" $) .Values.serviceAccount.nameOverride }} namespace: {{ .Release.Namespace }} {{- end }} @@ -54,9 +54,9 @@ apiVersion: v1 kind: Secret type: kubernetes.io/service-account-token metadata: - name: {{ include "cf-common-0.34.0.names.fullname" $ }}-sa-token + name: {{ include "cf-common-0.35.0.names.fullname" $ }}-sa-token annotations: - kubernetes.io/service-account.name: {{ default ( include "cf-common-0.34.0.names.fullname" $) .Values.serviceAccount.nameOverride }} + kubernetes.io/service-account.name: {{ default ( include "cf-common-0.35.0.names.fullname" $) .Values.serviceAccount.nameOverride }} {{- end }} {{- end }} {{- end }} diff --git a/charts/cf-common/templates/render/_secrets.tpl b/charts/cf-common/templates/render/_secrets.tpl index a274cb13..b57a1cb3 100644 --- a/charts/cf-common/templates/render/_secrets.tpl +++ b/charts/cf-common/templates/render/_secrets.tpl @@ -1,9 +1,9 @@ {{/* Renders Secrets objects. Must be called from chart root context. -{{- include "cf-common-0.34.0.secrets" . -}} +{{- include "cf-common-0.35.0.secrets" . -}} */}} -{{- define "cf-common-0.34.0.secrets" -}} +{{- define "cf-common-0.35.0.secrets" -}} {{- range $secretIndex, $secretItem := .Values.secrets }} @@ -12,19 +12,19 @@ Must be called from chart root context. {{- if $secretItem.nameOverride }} {{- $secretName = $secretItem.nameOverride }} {{- else }} - {{- $secretName = printf "%s-%s" (include "cf-common-0.34.0.names.fullname" $) $secretIndex }} + {{- $secretName = printf "%s-%s" (include "cf-common-0.35.0.names.fullname" $) $secretIndex }} {{- end }} --- apiVersion: v1 kind: Secret metadata: name: {{ $secretName }} - labels: {{ include "cf-common-0.34.0.labels.standard" $ | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" $ | nindent 4 }} {{- if $secretItem.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $secretItem.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $secretItem.labels "context" $) | nindent 4 }} {{- end }} {{- if $secretItem.annotations }} - annotations: {{- include "cf-common-0.34.0.tplrender" (dict "Values" $secretItem.annotations "context" $) | nindent 4 }} + annotations: {{- include "cf-common-0.35.0.tplrender" (dict "Values" $secretItem.annotations "context" $) | nindent 4 }} {{- end }} {{- with $secretItem.type }} type: {{ . }} @@ -33,7 +33,7 @@ type: {{ . }} {{- if not ( or (kindIs "map" $secretItem.stringData) (kindIs "string" $secretItem.stringData) ) }} {{- fail (printf "ERROR: secrets.%s.stringData must be a map or multiline string!" $secretIndex) }} {{- end }} -stringData: {{ include "cf-common-0.34.0.tplrender" (dict "Values" $secretItem.stringData "context" $) | nindent 2 }} +stringData: {{ include "cf-common-0.35.0.tplrender" (dict "Values" $secretItem.stringData "context" $) | nindent 2 }} {{- else if $secretItem.data }} {{- if not (kindIs "map" $secretItem.data ) }} {{- fail (printf "ERROR: secrets.%s.data must be a map" $secretIndex) }} diff --git a/charts/cf-common/templates/render/_serviceMonitor.tpl b/charts/cf-common/templates/render/_serviceMonitor.tpl index e6767a21..ded9d066 100644 --- a/charts/cf-common/templates/render/_serviceMonitor.tpl +++ b/charts/cf-common/templates/render/_serviceMonitor.tpl @@ -2,11 +2,11 @@ Renders Service Monitor objects. */}} -{{- define "cf-common-0.34.0.serviceMonitor" -}} +{{- define "cf-common-0.35.0.serviceMonitor" -}} {{- range $serviceMonitorIndex, $serviceMonitorItem := .Values.serviceMonitor -}} -{{- $serviceMonitorName := include "cf-common-0.34.0.names.fullname" $ -}} +{{- $serviceMonitorName := include "cf-common-0.35.0.names.fullname" $ -}} {{- if and (hasKey $serviceMonitorItem "nameOverride") $serviceMonitorItem.nameOverride -}} {{- $serviceMonitorName = printf "%v-%v" $serviceMonitorName $serviceMonitorItem.nameOverride -}} {{- end -}} @@ -20,24 +20,24 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ $serviceMonitorName }} - labels: {{ include "cf-common-0.34.0.labels.standard" $ | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" $ | nindent 4 }} {{- if $serviceMonitorItem.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $serviceMonitorItem.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $serviceMonitorItem.labels "context" $) | nindent 4 }} {{- end }} {{- if $serviceMonitorItem.annotations }} - annotations: {{- include "cf-common-0.34.0.tplrender" (dict "Values" $serviceMonitorItem.annotations "context" $) | nindent 4 }} + annotations: {{- include "cf-common-0.35.0.tplrender" (dict "Values" $serviceMonitorItem.annotations "context" $) | nindent 4 }} {{- end }} spec: selector: {{- if $serviceMonitorItem.selector }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $serviceMonitorItem.selector "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $serviceMonitorItem.selector "context" $) | nindent 4 }} {{- else }} matchLabels: - {{- include "cf-common-0.34.0.labels.matchLabels" $ | nindent 6 }} + {{- include "cf-common-0.35.0.labels.matchLabels" $ | nindent 6 }} {{- end }} {{- if $serviceMonitorItem.namespaceSelector }} namespaceSelector: - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $serviceMonitorItem.namespaceSelector "context" $) | nindent 6 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $serviceMonitorItem.namespaceSelector "context" $) | nindent 6 }} {{- else }} namespaceSelector: matchNames: diff --git a/charts/cf-common/templates/services/_primary_port.tpl b/charts/cf-common/templates/services/_primary_port.tpl index 5ec9dfff..40807e65 100644 --- a/charts/cf-common/templates/services/_primary_port.tpl +++ b/charts/cf-common/templates/services/_primary_port.tpl @@ -2,9 +2,9 @@ Return the primary port for a given Service object. Called from ingress template. Usage: -{{ include "cf-common-0.34.0.service.primaryPort" (dict "values" .Values.service.main ) }} +{{ include "cf-common-0.35.0.service.primaryPort" (dict "values" .Values.service.main ) }} */}} -{{- define "cf-common-0.34.0.service.primaryPort" -}} +{{- define "cf-common-0.35.0.service.primaryPort" -}} {{- $result := "" -}} {{- range $name, $port := .values.ports -}} {{- if and (hasKey $port "primary") $port.primary -}} diff --git a/charts/cf-common/templates/services/_primary_svc.tpl b/charts/cf-common/templates/services/_primary_svc.tpl index 569b6e5e..7e117397 100644 --- a/charts/cf-common/templates/services/_primary_svc.tpl +++ b/charts/cf-common/templates/services/_primary_svc.tpl @@ -2,9 +2,9 @@ Return the primary service object. Called from ingress template. Usage: -{{ include "cf-common-0.34.0.service.primary" (dict "values" .Values.service) }} +{{ include "cf-common-0.35.0.service.primary" (dict "values" .Values.service) }} */}} -{{- define "cf-common-0.34.0.service.primary" -}} +{{- define "cf-common-0.35.0.service.primary" -}} {{- $result := "" -}} {{- range $name, $service := .values -}} diff --git a/charts/cf-common/templates/services/_services.tpl b/charts/cf-common/templates/services/_services.tpl index 8dc97f95..53385c8e 100644 --- a/charts/cf-common/templates/services/_services.tpl +++ b/charts/cf-common/templates/services/_services.tpl @@ -2,16 +2,16 @@ Renders Services objects. Must be called from chart root context. Usage: -{{- include "cf-common-0.34.0.service" . -}} +{{- include "cf-common-0.35.0.service" . -}} */}} -{{- define "cf-common-0.34.0.service" }} +{{- define "cf-common-0.35.0.service" }} {{- if not (kindIs "map" .Values.service) }} {{- fail "ERROR: service block must be a map!" }} {{- end }} -{{- $primary := include "cf-common-0.34.0.service.primary" (dict "values" .Values.service) -}} +{{- $primary := include "cf-common-0.35.0.service.primary" (dict "values" .Values.service) -}} {{- range $serviceIndex, $serviceItem := .Values.service }} @@ -23,9 +23,9 @@ Usage: {{- end -}} {{- if eq $serviceIndex $primary }} - {{- $serviceName = include "cf-common-0.34.0.names.fullname" $ -}} + {{- $serviceName = include "cf-common-0.35.0.names.fullname" $ -}} {{- else }} - {{- $serviceName = printf "%s-%s" (include "cf-common-0.34.0.names.fullname" $) $serviceIndex -}} + {{- $serviceName = printf "%s-%s" (include "cf-common-0.35.0.names.fullname" $) $serviceIndex -}} {{- end }} {{- if $serviceItem.enabled }} @@ -34,12 +34,12 @@ apiVersion: v1 kind: Service metadata: name: {{ $serviceName }} - labels: {{ include "cf-common-0.34.0.labels.standard" $ | nindent 4 }} + labels: {{ include "cf-common-0.35.0.labels.standard" $ | nindent 4 }} {{- if $serviceItem.labels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $serviceItem.labels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $serviceItem.labels "context" $) | nindent 4 }} {{- end }} {{- if $serviceItem.annotations }} - annotations: {{- include "cf-common-0.34.0.tplrender" (dict "Values" $serviceItem.annotations "context" $) | nindent 4 }} + annotations: {{- include "cf-common-0.35.0.tplrender" (dict "Values" $serviceItem.annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ $serviceType }} @@ -87,13 +87,13 @@ spec: nodePort: {{ $portItem.nodePort }} {{- end }} {{- end }} - selector: {{ include "cf-common-0.34.0.labels.matchLabels" $ | nindent 4 }} + selector: {{ include "cf-common-0.35.0.labels.matchLabels" $ | nindent 4 }} {{- if $serviceItem.extraSelectorLabels }} - {{- include "cf-common-0.34.0.tplrender" (dict "Values" $serviceItem.extraSelectorLabels "context" $) | nindent 4 }} + {{- include "cf-common-0.35.0.tplrender" (dict "Values" $serviceItem.extraSelectorLabels "context" $) | nindent 4 }} {{- end }} - {{- if (semverCompare ">=1.34-0" (include "cf-common-0.34.0.kubeVersion" $ )) }} + {{- if (semverCompare ">=1.34-0" (include "cf-common-0.35.0.kubeVersion" $ )) }} trafficDistribution: {{ coalesce $serviceItem.trafficDistribution "PreferSameZone" }} - {{- else if (semverCompare ">=1.31-0" (include "cf-common-0.34.0.kubeVersion" $ )) }} + {{- else if (semverCompare ">=1.31-0" (include "cf-common-0.35.0.kubeVersion" $ )) }} trafficDistribution: {{ coalesce $serviceItem.trafficDistribution "PreferClose" }} {{- end -}} {{- end }} diff --git a/charts/cf-common/templates/signadot/_virtualservice.tpl b/charts/cf-common/templates/signadot/_virtualservice.tpl index 8f8aec3d..caaa1326 100644 --- a/charts/cf-common/templates/signadot/_virtualservice.tpl +++ b/charts/cf-common/templates/signadot/_virtualservice.tpl @@ -1,27 +1,27 @@ -{{- define "cf-common-0.34.0.signadot.virtualservice" }} +{{- define "cf-common-0.35.0.signadot.virtualservice" }} {{- if .Values.signadot.enabled }} -{{- $controllerName := include "cf-common-0.34.0.names.fullname" . -}} +{{- $controllerName := include "cf-common-0.35.0.names.fullname" . -}} {{- if and (hasKey .Values.controller "nameOverride") .Values.controller.nameOverride -}} {{- $controllerName = printf "%v-%v" $controllerName .Values.controller.nameOverride -}} {{- end -}} -{{- $containerName := include "cf-common-0.34.0.names.fullname" . -}} +{{- $containerName := include "cf-common-0.35.0.names.fullname" . -}} {{- if and (hasKey .Values.container "nameOverride") .Values.container.nameOverride }} - {{- $containerName = include "cf-common-0.34.0.tplrender" (dict "Values" .Values.container.nameOverride "context" .) -}} + {{- $containerName = include "cf-common-0.35.0.tplrender" (dict "Values" .Values.container.nameOverride "context" .) -}} {{- end }} apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: - name: {{ include "cf-common-0.34.0.names.fullname" . }} - labels: {{ include "cf-common-0.34.0.labels.standard" . | nindent 4 }} + name: {{ include "cf-common-0.35.0.names.fullname" . }} + labels: {{ include "cf-common-0.35.0.labels.standard" . | nindent 4 }} spec: hosts: - - {{ printf "%s.%s.svc.%s" (include "cf-common-0.34.0.names.fullname" .) .Release.Namespace .Values.global.clusterDomain }} + - {{ printf "%s.%s.svc.%s" (include "cf-common-0.35.0.names.fullname" .) .Release.Namespace .Values.global.clusterDomain }} http: - route: - destination: - host: {{ include "cf-common-0.34.0.names.fullname" . }} + host: {{ include "cf-common-0.35.0.names.fullname" . }} port: number: {{ .Values.signadot.virtualservice.port | default "80" }} {{- end }} From 67a7ab52785cccf4c8f38c67e8227d46c5a54f74 Mon Sep 17 00:00:00 2001 From: Josip Rodin Date: Mon, 17 Aug 2026 10:33:19 +0200 Subject: [PATCH 4/9] scripts/helm-docs.sh --- charts/cf-common/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cf-common/README.md b/charts/cf-common/README.md index 866c7251..bfc68244 100644 --- a/charts/cf-common/README.md +++ b/charts/cf-common/README.md @@ -2,7 +2,7 @@ Codefresh library chart -![Version: 0.34.0](https://img.shields.io/badge/Version-0.34.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: v0.0.0](https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square) +![Version: 0.35.0](https://img.shields.io/badge/Version-0.35.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: v0.0.0](https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square) ## Installing the Chart @@ -18,7 +18,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g. # Chart.yaml dependencies: - name: cf-common - version: 0.34.0 + version: 0.35.0 repository: https://chartmuseum.codefresh.io/cf-common ``` From a55ee8fb7c5ae2c5e52e32a2ce12da46f661b737 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 18 Aug 2026 13:08:46 +0400 Subject: [PATCH 5/9] add tests --- .../tests/external-secrets/error_test.yaml | 25 +++ .../tests/external-secrets/metadata_test.yaml | 36 ++++ .../tests/external-secrets/spec_test.yaml | 163 ++++++++++++++++++ 3 files changed, 224 insertions(+) create mode 100644 charts/cf-common-test/tests/external-secrets/error_test.yaml create mode 100644 charts/cf-common-test/tests/external-secrets/metadata_test.yaml create mode 100644 charts/cf-common-test/tests/external-secrets/spec_test.yaml diff --git a/charts/cf-common-test/tests/external-secrets/error_test.yaml b/charts/cf-common-test/tests/external-secrets/error_test.yaml new file mode 100644 index 00000000..a6fcd2b4 --- /dev/null +++ b/charts/cf-common-test/tests/external-secrets/error_test.yaml @@ -0,0 +1,25 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: external secrets error handlers +templates: + - templates/external-secrets.yaml +tests: + - it: Test with no external secrets + set: + externalSecrets: [] + asserts: + - hasDocuments: + count: 0 + + - it: Test external secret with no keys or keysFrom + set: + externalSecrets: + - name: test-es + asserts: + - hasDocuments: + count: 1 + - equal: + path: spec.data + value: [] + - equal: + path: spec.dataFrom + value: [] diff --git a/charts/cf-common-test/tests/external-secrets/metadata_test.yaml b/charts/cf-common-test/tests/external-secrets/metadata_test.yaml new file mode 100644 index 00000000..f1cc2e11 --- /dev/null +++ b/charts/cf-common-test/tests/external-secrets/metadata_test.yaml @@ -0,0 +1,36 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: external secrets metadata +templates: + - templates/external-secrets.yaml +tests: + - it: Test default external secret metadata + set: + externalSecrets: + - name: test-es + keys: [] + asserts: + - hasDocuments: + count: 1 + - notExists: + path: metadata.labels + - notExists: + path: metadata.annotations + + - it: Test custom external secret metadata + set: + externalSecrets: + - name: test-es + labels: + foo: bar + annotations: + alice: bob + keys: [] + asserts: + - equal: + path: metadata.labels + value: + foo: bar + - equal: + path: metadata.annotations + value: + alice: bob \ No newline at end of file diff --git a/charts/cf-common-test/tests/external-secrets/spec_test.yaml b/charts/cf-common-test/tests/external-secrets/spec_test.yaml new file mode 100644 index 00000000..2c9dd61f --- /dev/null +++ b/charts/cf-common-test/tests/external-secrets/spec_test.yaml @@ -0,0 +1,163 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: external secrets spec +templates: + - templates/external-secrets.yaml +tests: + - it: Test default external secret spec + set: + externalSecrets: + - name: test-es + keys: + - name: KEY1 + remoteSecretName: my-secret + remoteKey: password + asserts: + - hasDocuments: + count: 1 + - isKind: + of: ExternalSecret + - isAPIVersion: + of: external-secrets.io/v2 + - equal: + path: metadata.name + value: test-es + - equal: + path: spec.refreshInterval + value: 1m + - equal: + path: spec.secretStoreRef + value: + name: asm + kind: ClusterSecretStore + - equal: + path: spec.target + value: + name: test-es + creationPolicy: Owner + deletionPolicy: Retain + - equal: + path: spec.data + value: + - secretKey: KEY1 + remoteRef: + key: my-secret + property: password + - equal: + path: spec.dataFrom + value: [] + + - it: Test custom secretStoreRef + set: + externalSecrets: + - name: test-es + secretStoreRef: + name: my-store + kind: SecretStore + keys: [] + asserts: + - equal: + path: spec.secretStoreRef + value: + name: my-store + kind: SecretStore + + - it: Test custom refreshInterval and target policies + set: + externalSecrets: + - name: test-es + refreshInterval: 5m + creationPolicy: Merge + deletionPolicy: Delete + keys: [] + asserts: + - equal: + path: spec.refreshInterval + value: 5m + - equal: + path: spec.target + value: + name: test-es + creationPolicy: Merge + deletionPolicy: Delete + + - it: Test keys with remoteKey and decodingStrategy + set: + externalSecrets: + - name: test-es + keys: + - name: KEY1 + remoteSecretName: my-secret + remoteKey: password + decodingStrategy: Base64 + asserts: + - equal: + path: spec.data + value: + - secretKey: KEY1 + remoteRef: + key: my-secret + property: password + decodingStrategy: Base64 + + - it: Test keysFrom with decodingStrategy + set: + externalSecrets: + - name: test-es + keysFrom: + - remoteSecretName: my-secret + decodingStrategy: Base64 + asserts: + - equal: + path: spec.data + value: [] + - equal: + path: spec.dataFrom + value: + - extract: + key: my-secret + decodingStrategy: Base64 + + - it: Test remoteSecretName TPL rendering + set: + global: + stage: staging + externalSecrets: + - name: test-es + keys: + - name: KEY1 + remoteSecretName: "{{ .Values.global.stage }}/my-secret" + remoteKey: password + asserts: + - equal: + path: spec.data[0].remoteRef.key + value: staging/my-secret + + - it: Test apiVersion override + set: + apiVersionOverrides: + externalSecrets: external-secrets.io/v1beta1 + externalSecrets: + - name: test-es + keys: [] + asserts: + - isAPIVersion: + of: external-secrets.io/v1beta1 + + - it: Test with more than one external secret + set: + externalSecrets: + - name: es-one + keys: [] + - name: es-two + keys: [] + asserts: + - hasDocuments: + count: 2 + - equal: + path: metadata.name + value: es-one + documentIndex: 0 + - equal: + path: metadata.name + value: es-two + documentIndex: 1 From f69b8a222453c8a3fcd261e31759624ff5376296 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 18 Aug 2026 13:13:37 +0400 Subject: [PATCH 6/9] add tests --- .../cf-common-test/tests/external-secrets/spec_test.yaml | 2 -- charts/cf-common-test/values.yaml | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/cf-common-test/tests/external-secrets/spec_test.yaml b/charts/cf-common-test/tests/external-secrets/spec_test.yaml index 2c9dd61f..1f81e906 100644 --- a/charts/cf-common-test/tests/external-secrets/spec_test.yaml +++ b/charts/cf-common-test/tests/external-secrets/spec_test.yaml @@ -16,8 +16,6 @@ tests: count: 1 - isKind: of: ExternalSecret - - isAPIVersion: - of: external-secrets.io/v2 - equal: path: metadata.name value: test-es diff --git a/charts/cf-common-test/values.yaml b/charts/cf-common-test/values.yaml index d419ad3e..4b0005b6 100644 --- a/charts/cf-common-test/values.yaml +++ b/charts/cf-common-test/values.yaml @@ -37,7 +37,12 @@ additionalContainers: [] extraResources: [] -externalSecrets: [] +externalSecrets: + - name: test-es + keys: + - name: KEY1 + remoteSecretName: my-secret + remoteKey: password keda: spec: {} From 74344f5f07b2131f31802b9bafc1771299cb6a35 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 18 Aug 2026 13:15:20 +0400 Subject: [PATCH 7/9] add tests --- charts/cf-common-test/values.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/charts/cf-common-test/values.yaml b/charts/cf-common-test/values.yaml index 4b0005b6..d419ad3e 100644 --- a/charts/cf-common-test/values.yaml +++ b/charts/cf-common-test/values.yaml @@ -37,12 +37,7 @@ additionalContainers: [] extraResources: [] -externalSecrets: - - name: test-es - keys: - - name: KEY1 - remoteSecretName: my-secret - remoteKey: password +externalSecrets: [] keda: spec: {} From 8f0697c4f7ef0812108dad38277c7fb53fcd90d9 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 18 Aug 2026 13:17:14 +0400 Subject: [PATCH 8/9] fix scope --- .../cf-common/templates/external-secrets/_external-secrets.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cf-common/templates/external-secrets/_external-secrets.tpl b/charts/cf-common/templates/external-secrets/_external-secrets.tpl index f4e5d41b..bff31f48 100644 --- a/charts/cf-common/templates/external-secrets/_external-secrets.tpl +++ b/charts/cf-common/templates/external-secrets/_external-secrets.tpl @@ -1,7 +1,7 @@ {{- define "cf-common-0.35.0.external-secrets" }} {{- $templatedExternalSecrets := include "cf-common-0.35.0.tplrender" (dict "Values" .Values.externalSecrets "context" $) | fromYaml }} {{- range $i, $secret := .Values.externalSecrets }} -apiVersion: {{ include "cf-common-0.35.0.apiVersion.externalSecrets" . }} +apiVersion: {{ include "cf-common-0.35.0.apiVersion.externalSecrets" $ }} kind: ExternalSecret metadata: name: {{ $secret.name }} From 9cda633821112276beb04919c8e66bdc2cbfc506 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 18 Aug 2026 19:52:14 +0400 Subject: [PATCH 9/9] fallback for remoteSecretName --- .../tests/external-secrets/spec_test.yaml | 13 +++++++++++++ .../external-secrets/_external-secrets.tpl | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/charts/cf-common-test/tests/external-secrets/spec_test.yaml b/charts/cf-common-test/tests/external-secrets/spec_test.yaml index 1f81e906..8e3794ed 100644 --- a/charts/cf-common-test/tests/external-secrets/spec_test.yaml +++ b/charts/cf-common-test/tests/external-secrets/spec_test.yaml @@ -159,3 +159,16 @@ tests: path: metadata.name value: es-two documentIndex: 1 + + - it: Should fallback to remoteSecretName if keys[].remoteSecretName is not provided + set: + externalSecrets: + - name: test-es + keys: + - name: KEY1 + remoteKey: password + remoteSecretName: my-secret + asserts: + - equal: + path: spec.data[0].remoteRef.key + value: my-secret diff --git a/charts/cf-common/templates/external-secrets/_external-secrets.tpl b/charts/cf-common/templates/external-secrets/_external-secrets.tpl index bff31f48..2faa6c56 100644 --- a/charts/cf-common/templates/external-secrets/_external-secrets.tpl +++ b/charts/cf-common/templates/external-secrets/_external-secrets.tpl @@ -34,7 +34,7 @@ spec: {{- if hasKey $key "remoteSecretName"}} key: {{ printf "%s" (include "cf-common-0.35.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) }} {{- else }} - key: {{ printf "%s" (include "cf-common-0.35.0.tplrender" (dict "Values" $key.remoteSecretName "context" $)) }} + key: {{ printf "%s" (include "cf-common-0.35.0.tplrender" (dict "Values" $secret.remoteSecretName "context" $)) }} {{- end }} property: {{ $key.remoteKey }} {{- with $key.decodingStrategy }}