X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fmso%2Ftemplates%2Fdb-deployment.yaml;h=801b7d40381f9c489e579d9401828baad536f5c1;hb=e04b2feb855e5ab20e28c867d2bd7f89f6b8c425;hp=389fb5ab75ef2f52eb84496bc5a5eb831ceb4b2a;hpb=f6a39a8d6b2d2ee44d157c71a396e4de32ccba69;p=oom.git diff --git a/kubernetes/mso/templates/db-deployment.yaml b/kubernetes/mso/templates/db-deployment.yaml index 389fb5ab75..801b7d4038 100644 --- a/kubernetes/mso/templates/db-deployment.yaml +++ b/kubernetes/mso/templates/db-deployment.yaml @@ -1,42 +1,72 @@ +# 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.disableMsoMariadb }} apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: mariadb - namespace: "{{ .Values.nsPrefix }}-mso" + name: mso-mariadb + namespace: "{{ .Values.nsPrefix }}" spec: - replicas: 1 + replicas: {{ .Values.dbReplicas }} selector: matchLabels: - app: mariadb + app: mso-mariadb template: metadata: labels: - app: mariadb - name: mariadb + app: mso-mariadb + name: mso-mariadb spec: - hostname: mariadb + hostname: mso-mariadb containers: - args: image: {{ .Values.image.mariadb }} imagePullPolicy: {{ .Values.pullPolicy }} - name: "mariadb" + name: "mso-mariadb" env: - name: MYSQL_ROOT_PASSWORD value: password - - name: MARIADB_MAJOR - value: "10.1" - - name: MARIADB_VERSION - value: "10.1.11+maria-1~jessie" volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true - mountPath: /etc/mysql/conf.d name: mso-mariadb-conf - - mountPath: /docker-entrypoint-initdb.d + - mountPath: /docker-entrypoint-initdb.d/02-load-additional-changes.sh name: mso-mariadb-docker-entrypoint-initdb + subPath: 02-load-additional-changes.sh + - mountPath: /docker-entrypoint-initdb.d/01-load-default-sql-files.sh + name: mso-mariadb-docker-entrypoint-initdb + subPath: 01-load-default-sql-files.sh + - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests + name: mso-mariadb-docker-entrypoint-automated-tests + - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default + name: mso-mariadb-docker-entrypoint-bulkload-default + - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns + name: mso-mariadb-docker-entrypoint-demo-dns + - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw + name: mso-mariadb-docker-entrypoint-demo-vfw + - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/camunda + name: mso-mariadb-docker-entrypoint-camunda + - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/main-schemas + name: mso-mariadb-docker-entrypoint-main-schemas - mountPath: /var/lib/mysql name: mso-mariadb-data ports: - containerPort: 3306 - name: mariadb + name: mso-mariadb readinessProbe: tcpSocket: port: 3306 @@ -44,13 +74,35 @@ spec: periodSeconds: 10 volumes: - name: mso-mariadb-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/conf.d + configMap: + name: mso-confd-configmap - name: mso-mariadb-docker-entrypoint-initdb + configMap: + name: mso-docker-entry-initd-configmap + - name: mso-mariadb-docker-entrypoint-automated-tests + configMap: + name: mso-automated-tests-configmap + - name: mso-mariadb-docker-entrypoint-bulkload-default + configMap: + name: mso-bulkload-default-configmap + - name: mso-mariadb-docker-entrypoint-demo-dns + configMap: + name: mso-demo-dns-configmap + - name: mso-mariadb-docker-entrypoint-demo-vfw + configMap: + name: mso-demo-vfw-configmap + - name: mso-mariadb-docker-entrypoint-camunda + configMap: + name: mso-scripts-camunda-configmap + - name: mso-mariadb-docker-entrypoint-main-schemas + configMap: + name: mso-main-schemas-configmap + - name: localtime hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/docker-entrypoint-initdb.d + path: /etc/localtime - name: mso-mariadb-data persistentVolumeClaim: claimName: mso-db imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }}