summaryrefslogtreecommitdiffstats
path: root/kubernetes/mso/templates/db-deployment.yaml
blob: a906c1c41329da7d4d1081aa6eedc7a347358fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#{{ if not .Values.disableMsoMariadb }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: mso-mariadb
  namespace: "{{ .Values.nsPrefix }}"
spec:
  replicas: {{ .Values.dbReplicas }}
  selector:
    matchLabels:
      app: mso-mariadb
  template:
    metadata:
      labels:
        app: mso-mariadb
      name: mso-mariadb
    spec:
      hostname: mso-mariadb
      containers:
      - args:
        image: {{ .Values.image.mariadb }}
        imagePullPolicy: {{ .Values.pullPolicy }}
        name: "mso-mariadb"
        env:
          - name: MYSQL_ROOT_PASSWORD
            value: password
        volumeMounts:
        - mountPath: /etc/localtime
          name: localtime
          readOnly: true
        - mountPath: /etc/mysql/conf.d
          name: mso-mariadb-conf
        - 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: mso-mariadb
        readinessProbe:
          tcpSocket:
            port: 3306
          initialDelaySeconds: 5
          periodSeconds: 10
      volumes:
        - name: mso-mariadb-conf
          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: /etc/localtime
        - name: mso-mariadb-data
          persistentVolumeClaim:
            claimName: mso-db
      imagePullSecrets:
      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}