fix nfs-provisioner for appc and sdnc 57/43157/7
authorJerome Doucerain <jerome.doucerain@bell.ca>
Fri, 13 Apr 2018 16:24:53 +0000 (12:24 -0400)
committerJerome Doucerain <jerome.doucerain@bell.ca>
Thu, 19 Apr 2018 14:09:55 +0000 (14:09 +0000)
change in common/mysql/templates/pvc.yaml to allow pvc use
when persistence is required
change in common/mysql/templates/storageclass.yaml to be
led by the disableNfsprovisioner variable
change in appc/values to default the disableNfsprovisioner
to false as it is in sdnc

changing the default disableNfsprovisioner to true for both appc and sdnc

changing the stateful set avoid volumeclaimtemplates.
When used in helm, the volumeclaimtemplates is causing pvc to be left
after the helm delete --purge. I guess this is due to the fact the pvc
are not directly created by the helm install by indirectly by kubernetes

Now the tests are working in both cases (nfsprovisioner disabled or not)
The only piece remaining after a helm delete is pv in released state
in case we are using nfsprovisioner. That makes sense again because this
are objects created by the provisioner and not by helm.

removed some leftover

Issue-ID: OOM-787
Change-Id: Ieb1f1c482217aeb1b89be39a437bb891a299db71
Signed-off-by: Jerome Doucerain <jerome.doucerain@bell.ca>
kubernetes/common/mysql/templates/nfs-provisoner.yaml
kubernetes/common/mysql/templates/pvc.yaml
kubernetes/common/mysql/templates/statefulset.yaml
kubernetes/common/mysql/templates/storageclass.yaml
kubernetes/onap/values.yaml
kubernetes/sdnc/values.yaml

index 3f19977..35894df 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 */}}
 
-#{{ if not .Values.disableNfsProvisioner }}
+{{ if not .Values.disableNfsProvisioner }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
@@ -75,4 +75,4 @@ spec:
         - name: export-volume
           hostPath:
             path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
-#{{ end }}
+{{ end }}
index edb370a..d1558f1 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 */}}
 
-{{- if (and (and (.Values.persistence.enabled) (not .Values.persistence.existingClaim)) ( .Values.disableNfsProvisioner)) -}}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolumeClaim
 apiVersion: v1
 metadata:
index e436988..ff73b45 100644 (file)
@@ -236,18 +236,7 @@ spec:
         hostPath:
           path: /etc/localtime
       - name: {{ include "common.fullname" . }}-data
-#{{ if not .Values.disableNfsProvisioner }}
-  volumeClaimTemplates:
-  - metadata:
-      name: {{ include "common.fullname" . }}-data
-      annotations:
-        volume.beta.kubernetes.io/storage-class: "{{ include "common.fullname" . }}-data"
-    spec:
-      accessModes: ["ReadWriteMany"]
-      resources:
-        requests:
-          storage: 1Gi
-#{{ else if .Values.persistence.enabled }}
+#{{ if .Values.persistence.enabled }}
         persistentVolumeClaim:
           claimName: {{ include "common.fullname" . }}-data
 #{{ else }}
index 398c998..3cd502e 100644 (file)
 # limitations under the License.
 */}}
 
+{{ if not .Values.disableNfsProvisioner }}
 kind: StorageClass
 apiVersion: storage.k8s.io/v1
 metadata:
   name: "{{ include "common.fullname" . }}-data"
   namespace: {{ include "common.namespace" . }}
 provisioner: {{ include "common.fullname" . }}/nfs
+{{ end }}
index 619e940..a242771 100644 (file)
@@ -99,7 +99,7 @@ sdnc:
       dmaapPort: 3904
 
   mysql:
-    disableNfsProvisioner: false
+    disableNfsProvisioner: true
     replicaCount: 1
 so:
   enabled: true
index 8de608b..6360d37 100644 (file)
@@ -80,7 +80,7 @@ mysql:
   persistence:
     mountSubPath: sdnc/data
     enabled: true
-  disableNfsProvisioner: false
+  disableNfsProvisioner: true
   replicaCount: 1
 
 dgbuilder: