From 159dd778741c4c74201afed1beba036a39a8387b Mon Sep 17 00:00:00 2001 From: Amey Karandikar Date: Fri, 15 Mar 2024 16:53:51 -0400 Subject: [PATCH] added support for init container --- charts/accessnode/templates/_cv.tpl | 4 +--- charts/commandcenter/templates/_cv.tpl | 4 +--- charts/config/templates/_cv.tpl | 4 +--- charts/cs/templates/_cv.tpl | 4 +--- charts/mediaagent/templates/_cv.tpl | 4 +--- charts/networkgateway/templates/_cv.tpl | 4 +--- charts/webserver/templates/_cv.tpl | 4 +--- 7 files changed, 7 insertions(+), 21 deletions(-) diff --git a/charts/accessnode/templates/_cv.tpl b/charts/accessnode/templates/_cv.tpl index 6f49ec3..94e317c 100644 --- a/charts/accessnode/templates/_cv.tpl +++ b/charts/accessnode/templates/_cv.tpl @@ -166,9 +166,6 @@ Values in defaults.yaml gets the last priority {{- if eq (include "cv.utils.isMinVersion" (list . 11 40)) "true" }} {{- $initContainer = true }} {{- end }} -{{- if .Release.IsUpgrade -}} -{{- $initContainer = false }} -{{- end }} {{- $initContainer = ternary $defaults.initContainer $initContainer (hasKey $defaults "initContainer") }} {{- $initContainer = ternary .Values.initContainer $initContainer (hasKey .Values "initContainer") }} {{- $initContainer | toString }} @@ -295,5 +292,6 @@ cv.commondeploymentpecs creates pod specifications that are common to all deploy mountPath: /opt/{{include "cv.utils.getOemPath" .}}/Base64/Temp/k8ssecrets - name: cv-storage-secretssvolume mountPath: /tmp/secretcontents + subPath: k8ssecrets {{- end }} {{- end }} diff --git a/charts/commandcenter/templates/_cv.tpl b/charts/commandcenter/templates/_cv.tpl index 6f49ec3..94e317c 100644 --- a/charts/commandcenter/templates/_cv.tpl +++ b/charts/commandcenter/templates/_cv.tpl @@ -166,9 +166,6 @@ Values in defaults.yaml gets the last priority {{- if eq (include "cv.utils.isMinVersion" (list . 11 40)) "true" }} {{- $initContainer = true }} {{- end }} -{{- if .Release.IsUpgrade -}} -{{- $initContainer = false }} -{{- end }} {{- $initContainer = ternary $defaults.initContainer $initContainer (hasKey $defaults "initContainer") }} {{- $initContainer = ternary .Values.initContainer $initContainer (hasKey .Values "initContainer") }} {{- $initContainer | toString }} @@ -295,5 +292,6 @@ cv.commondeploymentpecs creates pod specifications that are common to all deploy mountPath: /opt/{{include "cv.utils.getOemPath" .}}/Base64/Temp/k8ssecrets - name: cv-storage-secretssvolume mountPath: /tmp/secretcontents + subPath: k8ssecrets {{- end }} {{- end }} diff --git a/charts/config/templates/_cv.tpl b/charts/config/templates/_cv.tpl index 6f49ec3..94e317c 100644 --- a/charts/config/templates/_cv.tpl +++ b/charts/config/templates/_cv.tpl @@ -166,9 +166,6 @@ Values in defaults.yaml gets the last priority {{- if eq (include "cv.utils.isMinVersion" (list . 11 40)) "true" }} {{- $initContainer = true }} {{- end }} -{{- if .Release.IsUpgrade -}} -{{- $initContainer = false }} -{{- end }} {{- $initContainer = ternary $defaults.initContainer $initContainer (hasKey $defaults "initContainer") }} {{- $initContainer = ternary .Values.initContainer $initContainer (hasKey .Values "initContainer") }} {{- $initContainer | toString }} @@ -295,5 +292,6 @@ cv.commondeploymentpecs creates pod specifications that are common to all deploy mountPath: /opt/{{include "cv.utils.getOemPath" .}}/Base64/Temp/k8ssecrets - name: cv-storage-secretssvolume mountPath: /tmp/secretcontents + subPath: k8ssecrets {{- end }} {{- end }} diff --git a/charts/cs/templates/_cv.tpl b/charts/cs/templates/_cv.tpl index 6f49ec3..94e317c 100644 --- a/charts/cs/templates/_cv.tpl +++ b/charts/cs/templates/_cv.tpl @@ -166,9 +166,6 @@ Values in defaults.yaml gets the last priority {{- if eq (include "cv.utils.isMinVersion" (list . 11 40)) "true" }} {{- $initContainer = true }} {{- end }} -{{- if .Release.IsUpgrade -}} -{{- $initContainer = false }} -{{- end }} {{- $initContainer = ternary $defaults.initContainer $initContainer (hasKey $defaults "initContainer") }} {{- $initContainer = ternary .Values.initContainer $initContainer (hasKey .Values "initContainer") }} {{- $initContainer | toString }} @@ -295,5 +292,6 @@ cv.commondeploymentpecs creates pod specifications that are common to all deploy mountPath: /opt/{{include "cv.utils.getOemPath" .}}/Base64/Temp/k8ssecrets - name: cv-storage-secretssvolume mountPath: /tmp/secretcontents + subPath: k8ssecrets {{- end }} {{- end }} diff --git a/charts/mediaagent/templates/_cv.tpl b/charts/mediaagent/templates/_cv.tpl index 6f49ec3..94e317c 100644 --- a/charts/mediaagent/templates/_cv.tpl +++ b/charts/mediaagent/templates/_cv.tpl @@ -166,9 +166,6 @@ Values in defaults.yaml gets the last priority {{- if eq (include "cv.utils.isMinVersion" (list . 11 40)) "true" }} {{- $initContainer = true }} {{- end }} -{{- if .Release.IsUpgrade -}} -{{- $initContainer = false }} -{{- end }} {{- $initContainer = ternary $defaults.initContainer $initContainer (hasKey $defaults "initContainer") }} {{- $initContainer = ternary .Values.initContainer $initContainer (hasKey .Values "initContainer") }} {{- $initContainer | toString }} @@ -295,5 +292,6 @@ cv.commondeploymentpecs creates pod specifications that are common to all deploy mountPath: /opt/{{include "cv.utils.getOemPath" .}}/Base64/Temp/k8ssecrets - name: cv-storage-secretssvolume mountPath: /tmp/secretcontents + subPath: k8ssecrets {{- end }} {{- end }} diff --git a/charts/networkgateway/templates/_cv.tpl b/charts/networkgateway/templates/_cv.tpl index 6f49ec3..94e317c 100644 --- a/charts/networkgateway/templates/_cv.tpl +++ b/charts/networkgateway/templates/_cv.tpl @@ -166,9 +166,6 @@ Values in defaults.yaml gets the last priority {{- if eq (include "cv.utils.isMinVersion" (list . 11 40)) "true" }} {{- $initContainer = true }} {{- end }} -{{- if .Release.IsUpgrade -}} -{{- $initContainer = false }} -{{- end }} {{- $initContainer = ternary $defaults.initContainer $initContainer (hasKey $defaults "initContainer") }} {{- $initContainer = ternary .Values.initContainer $initContainer (hasKey .Values "initContainer") }} {{- $initContainer | toString }} @@ -295,5 +292,6 @@ cv.commondeploymentpecs creates pod specifications that are common to all deploy mountPath: /opt/{{include "cv.utils.getOemPath" .}}/Base64/Temp/k8ssecrets - name: cv-storage-secretssvolume mountPath: /tmp/secretcontents + subPath: k8ssecrets {{- end }} {{- end }} diff --git a/charts/webserver/templates/_cv.tpl b/charts/webserver/templates/_cv.tpl index 6f49ec3..94e317c 100644 --- a/charts/webserver/templates/_cv.tpl +++ b/charts/webserver/templates/_cv.tpl @@ -166,9 +166,6 @@ Values in defaults.yaml gets the last priority {{- if eq (include "cv.utils.isMinVersion" (list . 11 40)) "true" }} {{- $initContainer = true }} {{- end }} -{{- if .Release.IsUpgrade -}} -{{- $initContainer = false }} -{{- end }} {{- $initContainer = ternary $defaults.initContainer $initContainer (hasKey $defaults "initContainer") }} {{- $initContainer = ternary .Values.initContainer $initContainer (hasKey .Values "initContainer") }} {{- $initContainer | toString }} @@ -295,5 +292,6 @@ cv.commondeploymentpecs creates pod specifications that are common to all deploy mountPath: /opt/{{include "cv.utils.getOemPath" .}}/Base64/Temp/k8ssecrets - name: cv-storage-secretssvolume mountPath: /tmp/secretcontents + subPath: k8ssecrets {{- end }} {{- end }}