From 9ff909446a11ec0b26a8e94077b3d3cdd183eab2 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Sun, 31 Jan 2021 16:32:18 +0500 Subject: [PATCH] Update charts to use new common variable for namesuffix --- test/nextcloud/1.1.0/templates/deployment.yaml | 4 ++-- test/nextcloud/1.1.0/templates/nuke-deployments-hook.yaml | 4 ++-- test/nextcloud/1.1.0/templates/postgres-deployment.yaml | 2 +- test/nextcloud/1.1.0/templates/postgres-service.yaml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/nextcloud/1.1.0/templates/deployment.yaml b/test/nextcloud/1.1.0/templates/deployment.yaml index 77270a55f1..61721d9b50 100644 --- a/test/nextcloud/1.1.0/templates/deployment.yaml +++ b/test/nextcloud/1.1.0/templates/deployment.yaml @@ -1,5 +1,5 @@ -{{ $postgres_values := . }} -{{ $_ := set $postgres_values "nameSuffix" "postgres" }} +{{ $postgres_values := (. | mustDeepCopy) }} +{{ $_ := set $postgres_values "common" (dict "nameSuffix" "postgres") }} apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: diff --git a/test/nextcloud/1.1.0/templates/nuke-deployments-hook.yaml b/test/nextcloud/1.1.0/templates/nuke-deployments-hook.yaml index b1e0ef1768..218ea00220 100644 --- a/test/nextcloud/1.1.0/templates/nuke-deployments-hook.yaml +++ b/test/nextcloud/1.1.0/templates/nuke-deployments-hook.yaml @@ -1,6 +1,6 @@ {{- if .Values.ixChartContext.isUpgrade -}} -{{ $values := . }} -{{ $_ := set $values "nameSuffix" "postgres" }} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} apiVersion: batch/v1 kind: Job metadata: diff --git a/test/nextcloud/1.1.0/templates/postgres-deployment.yaml b/test/nextcloud/1.1.0/templates/postgres-deployment.yaml index 0c6e480c3a..f7fa2bf549 100644 --- a/test/nextcloud/1.1.0/templates/postgres-deployment.yaml +++ b/test/nextcloud/1.1.0/templates/postgres-deployment.yaml @@ -1,5 +1,5 @@ {{ $values := . }} -{{ $_ := set $values "nameSuffix" "postgres" }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: diff --git a/test/nextcloud/1.1.0/templates/postgres-service.yaml b/test/nextcloud/1.1.0/templates/postgres-service.yaml index b09fccafde..c6603fd62b 100644 --- a/test/nextcloud/1.1.0/templates/postgres-service.yaml +++ b/test/nextcloud/1.1.0/templates/postgres-service.yaml @@ -1,6 +1,6 @@ {{ $ports := list }} {{ $ports = mustAppend $ports (dict "name" "postgres-tcp" "port" 5432 "targetPort" 5432) }} -{{ $params := . }} -{{ $_ := set $params "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} -{{ $_1 := set $params "nameSuffix" "postgres" }} -{{ include "common.classes.service" $params }} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +{{ $_1 := set $values "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} +{{ include "common.classes.service" $values }}