Commit 9ff90944 authored by Waqar Ahmed's avatar Waqar Ahmed

Update charts to use new common variable for namesuffix

parent 0ab705bc
{{ $postgres_values := . }} {{ $postgres_values := (. | mustDeepCopy) }}
{{ $_ := set $postgres_values "nameSuffix" "postgres" }} {{ $_ := set $postgres_values "common" (dict "nameSuffix" "postgres") }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment kind: Deployment
metadata: metadata:
......
{{- if .Values.ixChartContext.isUpgrade -}} {{- if .Values.ixChartContext.isUpgrade -}}
{{ $values := . }} {{ $values := (. | mustDeepCopy) }}
{{ $_ := set $values "nameSuffix" "postgres" }} {{ $_ := set $values "common" (dict "nameSuffix" "postgres") }}
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
......
{{ $values := . }} {{ $values := . }}
{{ $_ := set $values "nameSuffix" "postgres" }} {{ $_ := set $values "common" (dict "nameSuffix" "postgres") }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment kind: Deployment
metadata: metadata:
......
{{ $ports := list }} {{ $ports := list }}
{{ $ports = mustAppend $ports (dict "name" "postgres-tcp" "port" 5432 "targetPort" 5432) }} {{ $ports = mustAppend $ports (dict "name" "postgres-tcp" "port" 5432 "targetPort" 5432) }}
{{ $params := . }} {{ $values := (. | mustDeepCopy) }}
{{ $_ := set $params "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} {{ $_ := set $values "common" (dict "nameSuffix" "postgres") }}
{{ $_1 := set $params "nameSuffix" "postgres" }} {{ $_1 := set $values "commonService" (dict "type" "ClusterIP" "ports" $ports ) }}
{{ include "common.classes.service" $params }} {{ include "common.classes.service" $values }}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment