From 9d3ee1dfe6972afbcc9e4874cc14ed0b6716faf3 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Sat, 31 Aug 2024 20:18:31 +0300 Subject: [PATCH] fix camelcase change --- library/common-test/tests/cnpg/cluster_backup_spec_test.yaml | 2 +- library/common/templates/class/cnpg/_cluster.tpl | 2 +- library/common/templates/lib/container/_env.tpl | 4 ++-- .../common/templates/lib/ingress/integrations/_homepage.tpl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/common-test/tests/cnpg/cluster_backup_spec_test.yaml b/library/common-test/tests/cnpg/cluster_backup_spec_test.yaml index dac2e401..d97e784c 100644 --- a/library/common-test/tests/cnpg/cluster_backup_spec_test.yaml +++ b/library/common-test/tests/cnpg/cluster_backup_spec_test.yaml @@ -335,7 +335,7 @@ tests: secretAccessKey: key: ACCESS_SECRET_KEY name: test-release-name-common-test-cnpg-my-pg-provider-backup-s3-creds - serverName: some-server-name-r1 + serverName: test-release-name-common-test-cnpg-my-pg wal: compression: gzip encryption: AES256 diff --git a/library/common/templates/class/cnpg/_cluster.tpl b/library/common/templates/class/cnpg/_cluster.tpl index da0cc40d..63d62854 100644 --- a/library/common/templates/class/cnpg/_cluster.tpl +++ b/library/common/templates/class/cnpg/_cluster.tpl @@ -143,7 +143,7 @@ {{- $imageName := $objectData.cluster.imageName -}} {{- if not $imageName -}} {{/* Ensure version and container tracking */}} - {{- $imageType := camelcase ($objectData.type | default "postgres") -}} + {{- $imageType := ($objectData.type | default "postgres") | camelcase | title -}} {{- if eq $imageType "Postgres" -}} {{- $imageType = "" -}} {{- end -}} diff --git a/library/common/templates/lib/container/_env.tpl b/library/common/templates/lib/container/_env.tpl index 8f676370..01233a5c 100644 --- a/library/common/templates/lib/container/_env.tpl +++ b/library/common/templates/lib/container/_env.tpl @@ -57,7 +57,7 @@ objectData: The object data to be used to render the container. {{- $data = (get $data $name) -}} {{- if not $data -}} - {{- fail (printf "Container - Expected in [env] the referenced %s [%s] to be defined" (camelcase $item) $name) -}} + {{- fail (printf "Container - Expected in [env] the referenced %s [%s] to be defined" ($item | camelcase | title) $name) -}} {{- end -}} {{- $found := false -}} @@ -68,7 +68,7 @@ objectData: The object data to be used to render the container. {{- end -}} {{- if not $found -}} - {{- fail (printf "Container - Expected in [env] the referenced key [%s] in %s [%s] to be defined" $obj.key (camelcase $item) $name) -}} + {{- fail (printf "Container - Expected in [env] the referenced key [%s] in %s [%s] to be defined" $obj.key ($item | camelcase | title) $name) -}} {{- end -}} {{- $name = (printf "%s-%s" (include "tc.v1.common.lib.chart.names.fullname" $rootCtx) $name) -}} diff --git a/library/common/templates/lib/ingress/integrations/_homepage.tpl b/library/common/templates/lib/ingress/integrations/_homepage.tpl index 9b6b57c7..ee4089c3 100644 --- a/library/common/templates/lib/ingress/integrations/_homepage.tpl +++ b/library/common/templates/lib/ingress/integrations/_homepage.tpl @@ -15,7 +15,7 @@ {{- include "tc.v1.common.lib.ingress.integration.homepage.validation" (dict "objectData" $objectData) -}} - {{- $name := $homepage.name | default ($rootCtx.Release.Name | camelcase) -}} + {{- $name := $homepage.name | default ($rootCtx.Release.Name | camelcase | title) -}} {{- $desc := $homepage.description | default $rootCtx.Chart.Description -}} {{- $icon := $homepage.icon | default $rootCtx.Chart.Icon -}} {{- $defaultType := $rootCtx.Chart.Name | lower -}}