Merge "[AAF] Fix PVC for sshsm"
authorBorislav Glozman <Borislav.Glozman@amdocs.com>
Sun, 26 Jan 2020 07:36:58 +0000 (07:36 +0000)
committerGerrit Code Review <gerrit@onap.org>
Sun, 26 Jan 2020 07:36:58 +0000 (07:36 +0000)
kubernetes/aai
kubernetes/common/mariadb-init/resources/config/db_init.sh
kubernetes/common/postgres/templates/pv-primary.yaml
kubernetes/common/postgres/templates/pv-replica.yaml
kubernetes/common/postgres/templates/pvc-primary.yaml
kubernetes/common/postgres/templates/pvc-replica.yaml

index c866368..69f85c4 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c8663688eb2755ca5adc4f570c7acf76b6f9a077
+Subproject commit 69f85c4ba9f621e5f5172c0dd637048fe7ef3cfd
index 8caa697..b2fdb14 100755 (executable)
@@ -17,8 +17,8 @@
 while read DB ; do
     USER_VAR="MYSQL_USER_${DB^^}"
     PASS_VAR="MYSQL_PASSWORD_${DB^^}"
-    USER=${USER_VAR}
-    PASS=${PASS_VAR}
+    USER=${!USER_VAR}
+    PASS=${!PASS_VAR}
     MYSQL_OPTS=( -h ${DB_HOST} -P ${DB_PORT} -uroot -p${MYSQL_ROOT_PASSWORD} )
 
     echo "Creating database ${DB} and user ${USER}..."
index 096f0c9..1764868 100644 (file)
@@ -14,6 +14,7 @@
 # # limitations under the License.
 */}}
 {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if include "common.needPV" . -}}
 kind: PersistentVolume
 apiVersion: v1
 metadata:
@@ -35,3 +36,4 @@ spec:
   hostPath:
     path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}/primary
 {{- end -}}
+{{- end -}}
index a98abef..b67cac0 100644 (file)
@@ -14,6 +14,7 @@
 # # limitations under the License.
 */}}
 {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if include "common.needPV" . -}}
 kind: PersistentVolume
 apiVersion: v1
 metadata:
@@ -35,3 +36,4 @@ spec:
   hostPath:
     path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}/replica
 {{- end -}}
+{{- end -}}
index 05a5088..e529da1 100644 (file)
@@ -36,5 +36,10 @@ spec:
   resources:
     requests:
       storage: {{ .Values.persistence.size }}
+{{- if include "common.needPV" . }}
+  storageClassName: "{{ include "common.fullname" . }}-primary"
+{{- else }}
+  storageClassName: {{ include "common.storageClass" . }}
+{{- end }}
   storageClassName: "{{ include "common.fullname" . }}-primary"
 {{- end -}}
index f740521..41199b6 100644 (file)
@@ -36,5 +36,9 @@ spec:
   resources:
     requests:
       storage: {{ .Values.persistence.size }}
+{{- if include "common.needPV" . }}
   storageClassName: "{{ include "common.fullname" . }}-replica"
+{{- else }}
+  storageClassName: {{ include "common.storageClass" . }}
+{{- end }}
 {{- end -}}