[DMaaP DR] Enable persistence for Claims 12/103412/1
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 10 Mar 2020 07:45:42 +0000 (08:45 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 10 Mar 2020 08:00:41 +0000 (09:00 +0100)
Currently, persistence was not enabled, preventing creation of relevant
PV/PVC for DMaaP DR.
Setting this persistence as it should be the normal behavior

Issue-ID: OOM-2332
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Ic36c0956d40333529d6325af38e33a9bc6838946

kubernetes/dmaap/components/dmaap-dr-node/templates/pv-aaf.yaml
kubernetes/dmaap/components/dmaap-dr-node/templates/pv-event.yaml
kubernetes/dmaap/components/dmaap-dr-node/templates/pv-spool.yaml
kubernetes/dmaap/components/dmaap-dr-node/values.yaml
kubernetes/dmaap/components/dmaap-dr-prov/values.yaml

index 4742773..4c30f58 100644 (file)
@@ -22,7 +22,7 @@
 {{- if .Values.global.aafEnabled }}
 {{- $global := . }}
 {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
-{{- if eq "True" (include "common.needPV" .) -}}
+{{- if (include "common.needPV" .) -}}
 {{- range $i := until (int $global.Values.replicaCount)}}
 ---
 kind: PersistentVolume
@@ -33,7 +33,7 @@ metadata:
   labels:
     app: {{ include "common.name" $global }}
     chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}"
-    release: "{{ include "common.release" . }}"
+    release: "{{ include "common.release" $global }}"
     heritage: "{{ $global.Release.Service }}"
     name: {{ include "common.fullname" $global }}-aaf-props
 spec:
@@ -44,7 +44,7 @@ spec:
   storageClassName: "{{ include "common.fullname" $global }}-data-aaf-props"
   persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }}
   hostPath:
-    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ $global.Values.persistence.aafCredsMountSubPath }}-{{$i}}
+    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" $global }}/{{ $global.Values.persistence.aafCredsMountSubPath }}-{{$i}}
 {{if ne $i (int $global.Values.replicaCount) }}
 ---
 {{- end -}}
index c1d8c8f..3f2d39e 100644 (file)
@@ -31,7 +31,7 @@ metadata:
   labels:
     app: {{ include "common.fullname" $global }}
     chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}"
-    release: "{{ include "common.release" . }}"
+    release: "{{ include "common.release" $global }}"
     heritage: "{{ $global.Release.Service }}"
     name: {{ include "common.fullname" $global }}-event-logs
 spec:
@@ -42,7 +42,7 @@ spec:
   persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }}
   storageClassName: "{{ include "common.fullname" $global }}-data-event-logs"
   hostPath:
-    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ $global.Values.persistence.eventLogsMountSubPath }}-{{$i}}
+    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" $global }}/{{ $global.Values.persistence.eventLogsMountSubPath }}-{{$i}}
 {{if ne $i (int $global.Values.replicaCount) }}
 ---
 {{- end -}}
index 280e034..094e92a 100644 (file)
@@ -20,7 +20,7 @@
 
 {{- $global := . }}
 {{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) }}
-{{- if eq "True" (include "common.needPV" .) -}}
+{{- if (include "common.needPV" .) -}}
 {{- range $i := until (int $global.Values.replicaCount)}}
 kind: PersistentVolume
 apiVersion: v1
@@ -30,7 +30,7 @@ metadata:
   labels:
     app: {{ include "common.fullname" $global }}
     chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}"
-    release: "{{ include "common.release" . }}"
+    release: "{{ include "common.release" $global }}"
     heritage: "{{ $global.Release.Service }}"
     name: {{ include "common.fullname" $global }}-spool-data
 spec:
@@ -41,7 +41,7 @@ spec:
   persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }}
   storageClassName: "{{ include "common.fullname" $global }}-data"
   hostPath:
-    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ $global.Values.persistence.spoolMountSubPath }}-{{$i}}
+    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" $global }}/{{ $global.Values.persistence.spoolMountSubPath }}-{{$i}}
 {{if ne $i (int $global.Values.replicaCount) }}
 ---
 {{- end -}}
index 84dadaf..9478a76 100644 (file)
@@ -17,6 +17,7 @@
 #################################################################
 global:
   loggingDirectory: /var/log/onap/datarouter
+  persistence: {}
 
 #################################################################
 # Application configuration defaults.
@@ -51,6 +52,7 @@ readiness:
 
 ## Persist data to a persitent volume
 persistence:
+  enabled: true
   volumeReclaimPolicy: Retain
   accessMode: ReadWriteOnce
   mountPath: /dockerdata-nfs
index 4619069..06f68e7 100644 (file)
@@ -18,6 +18,7 @@
 global:
   nodePortPrefix: 302
   loggingDirectory: /opt/app/datartr/logs
+  persistence: {}
 
 #################################################################
 # Secrets metaconfig
@@ -63,6 +64,7 @@ readiness:
 
 ## Persist data to a persitent volume
 persistence:
+  enabled: true
   volumeReclaimPolicy: Retain
   accessMode: ReadWriteOnce
   mountPath: /dockerdata-nfs