X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fmso%2Ftemplates%2Fdb-deployment.yaml;h=801b7d40381f9c489e579d9401828baad536f5c1;hb=e04b2feb855e5ab20e28c867d2bd7f89f6b8c425;hp=820d7e223954132bebbc731098c30e888c749a6b;hpb=b9d5671aeedb634b4b06d0c49595c476cf85b4ce;p=oom.git diff --git a/kubernetes/mso/templates/db-deployment.yaml b/kubernetes/mso/templates/db-deployment.yaml index 820d7e2239..801b7d4038 100644 --- a/kubernetes/mso/templates/db-deployment.yaml +++ b/kubernetes/mso/templates/db-deployment.yaml @@ -1,25 +1,40 @@ +# 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: {{ .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 @@ -29,31 +44,65 @@ spec: 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 initialDelaySeconds: 5 periodSeconds: 10 volumes: - - name: localtime - hostPath: - path: /etc/localtime - 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 }} \ No newline at end of file +#{{ end }}