SDNC parameterized persisted type and location
conditional subpath in case we are not using the NFS provisioner
parameterized location if we are using hostpath
Issue-ID: OOM-748
Change-Id: I982a75a91fa5e6349697867d188c3c83093e5e78
Signed-off-by: Jerome Doucerain <jerome.doucerain@bell.ca>
diff --git a/kubernetes/sdnc/templates/db-statefulset.yaml b/kubernetes/sdnc/templates/db-statefulset.yaml
index d0f141f..29d592a 100644
--- a/kubernetes/sdnc/templates/db-statefulset.yaml
+++ b/kubernetes/sdnc/templates/db-statefulset.yaml
@@ -82,7 +82,9 @@
volumeMounts:
- name: sdnc-data
mountPath: /var/lib/mysql
+#{{ if not .Values.disableNfsProvisioner }}
subPath: mysql
+#{{ end }}
- name: conf
mountPath: /etc/mysql/conf.d
containers:
@@ -99,7 +101,9 @@
volumeMounts:
- mountPath: /var/lib/mysql
name: sdnc-data
+#{{ if not .Values.disableNfsProvisioner }}
subPath: mysql
+#{{ end }}
- name: conf
mountPath: /etc/mysql/conf.d
ports:
@@ -178,7 +182,9 @@
volumeMounts:
- name: sdnc-data
mountPath: /var/lib/mysql
+#{{ if not .Values.disableNfsProvisioner }}
subPath: mysql
+#{{ end }}
- name: conf
mountPath: /etc/mysql/conf.d
resources:
@@ -197,7 +203,7 @@
#{{ if .Values.disableNfsProvisioner }}
- name: sdnc-data
hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/data
+ path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdnc/data/mysql
#{{ else }}
volumeClaimTemplates:
- metadata:
@@ -211,3 +217,4 @@
storage: 1Gi
#{{ end }}
#{{ end }}
+