[DCAEGEN2] Remove Lost+Found in PVC 60/107560/1
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Wed, 6 May 2020 15:40:20 +0000 (17:40 +0200)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Wed, 13 May 2020 14:06:45 +0000 (14:06 +0000)
When using dynamic storage, "Lost+Found" may be present. Cloudify init
script doesn't work when it's the case, so we need to remove it.

Issue-ID: OOM-1227
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Ie298c55aa997a441dde0bd45c452f41eb77ad495
(cherry picked from commit cfb7ff9315a0863c699acb018bfa947add0a1f25)

kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/deployment.yaml
kubernetes/dcaegen2/values.yaml

index 9bee051..8a03e90 100644 (file)
@@ -65,6 +65,19 @@ spec:
         volumeMounts:
             - mountPath: /opt/app/osaaf
               name: tls-info
+      {{- if .Values.persistence.enabled }}
+      - name: remove-lost-found
+        image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /cfy-persist
+          name: cm-persistent
+        command:
+        - /bin/sh
+        args:
+        - -c
+        - "rm -rf '/cfy-persist/lost+found';"
+      {{- end }}
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
index 25ddfc7..aff40d4 100644 (file)
@@ -22,5 +22,7 @@ global:
   tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0
   consulLoaderRepository: nexus3.onap.org:10001
   consulLoaderImage: onap/org.onap.dcaegen2.deployments.consul-loader-container:1.0.0
+  busyboxRepository: docker.io
+  busyboxImage: library/busybox:1.30
 redis:
   replicaCount: 6