License addition in all yamls
[oom.git] / kubernetes / vid / templates / vid-mariadb-deployment.yaml
index 9b585e2..4eb46c2 100644 (file)
@@ -1,11 +1,27 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#{{ if not .Values.disableVidVidMariadb }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
   labels:
     app: vid-mariadb
   name: vid-mariadb
-  namespace: "{{ .Values.nsPrefix }}-vid"
+  namespace: "{{ .Values.nsPrefix }}"
 spec:
+  replicas: {{ .Values.vidMariaDbReplicas }}
   selector:
     matchLabels:
       app: vid-mariadb
@@ -35,9 +51,11 @@ spec:
         - mountPath: /var/lib/mysql
           name: vid-mariadb-data
         - mountPath: /docker-entrypoint-initdb.d/vid-pre-init.sql
-          name: vid-pre-init
+          name: vid-lfconfig
+          subPath: vid-pre-init.sql
         - mountPath: /etc/mysql/my.cnf
-          name: my-cnf
+          name: vid-lfconfig
+          subPath: my.cnf
         ports:
         - containerPort: 3306
         readinessProbe:
@@ -52,11 +70,15 @@ spec:
         - name: vid-mariadb-data
           persistentVolumeClaim:
             claimName: vid-db
-        - name: vid-pre-init
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/vid/vid/lf_config/vid-pre-init.sql
-        - name: my-cnf
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/vid/vid/lf_config/vid-my.cnf
+        - name: vid-lfconfig
+          configMap:
+            name: vid-lfconfig-configmap
+            defaultMode: 0755
+            items:
+            - key: vid-my.cnf
+              path: my.cnf
+            - key: vid-pre-init.sql
+              path: vid-pre-init.sql
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}