[COMMON] fix logic of post upgrade hook script to handle upgrade run without any changes to charts that could cause loss of all data.
Issue-ID: OOM-2442
Signed-off-by: Marat Salakhutdinov <marat.salakhutdinov@bell.ca>
Change-Id: Ifd3bbc0f63e95b1c8797ecd09a891195faafc8c2
diff --git a/kubernetes/common/mariadb-galera/templates/job.yaml b/kubernetes/common/mariadb-galera/templates/job.yaml
index cc71bb8..db56f3e 100644
--- a/kubernetes/common/mariadb-galera/templates/job.yaml
+++ b/kubernetes/common/mariadb-galera/templates/job.yaml
@@ -72,6 +72,8 @@
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
+ - name: REPLICA_COUNT
+ value: "{{ .Values.replicaCount }}"
command: ["/bin/bash", "-c", "--"]
args: ["/upgrade/post-upgrade-script.sh"]
volumeMounts: