adding a selector in so/mariadb/pvc

to be sure the pvc will properly be bound to the expected pv
a label has been added to the pv and a selector on matchlabels
has been added to the pvc

Issue-ID: OOM-786

Change-Id: Ic1c89efc2632623f9bf6467ebc1fd24b3cb4fb93
Signed-off-by: Jerome Doucerain <jerome.doucerain@bell.ca>
diff --git a/kubernetes/so/charts/mariadb/templates/pvc.yaml b/kubernetes/so/charts/mariadb/templates/pvc.yaml
index faff46c..b0cd3bf 100644
--- a/kubernetes/so/charts/mariadb/templates/pvc.yaml
+++ b/kubernetes/so/charts/mariadb/templates/pvc.yaml
@@ -14,6 +14,9 @@
 {{ toYaml .Values.persistence.annotations | indent 4 }}
 {{- end }}
 spec:
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}
   accessModes:
     - {{ .Values.persistence.accessMode }}
   resources: