Jakub Latusek | fcf6784 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
Mukul | 379e252 | 2018-09-05 12:26:02 +0000 | [diff] [blame] | 3 | # Modifications Copyright © 2018 AT&T |
vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
Jakub Latusek | fcf6784 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 16 | */}} |
vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 17 | |
Magdalena_Biernacka | 7d0dcbe | 2020-07-12 23:21:43 +0200 | [diff] [blame] | 18 | apiVersion: apps/v1 |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 19 | kind: Deployment |
| 20 | metadata: |
| 21 | name: {{ include "common.fullname" . }} |
| 22 | namespace: {{ include "common.namespace" . }} |
| 23 | labels: |
| 24 | app: {{ include "common.name" . }} |
| 25 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 26 | release: {{ include "common.release" . }} |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 27 | heritage: {{ .Release.Service }} |
| 28 | spec: |
| 29 | replicas: {{ .Values.replicaCount }} |
Magdalena_Biernacka | 7d0dcbe | 2020-07-12 23:21:43 +0200 | [diff] [blame] | 30 | selector: |
| 31 | matchLabels: |
| 32 | app: {{ include "common.name" . }} |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 33 | template: |
| 34 | metadata: |
| 35 | labels: |
| 36 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 37 | release: {{ include "common.release" . }} |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 38 | spec: |
| 39 | containers: |
| 40 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 41 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 42 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 43 | ports: |
| 44 | - containerPort: {{ .Values.service.internalPort }} |
| 45 | # disable liveness probe when breakpoints set in debugger |
| 46 | # so K8s doesn't restart unresponsive container |
| 47 | {{- if eq .Values.liveness.enabled true }} |
| 48 | livenessProbe: |
| 49 | tcpSocket: |
| 50 | port: {{ .Values.service.internalPort }} |
| 51 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 52 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 53 | {{ end -}} |
| 54 | readinessProbe: |
| 55 | tcpSocket: |
| 56 | port: {{ .Values.service.internalPort }} |
| 57 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 58 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 59 | env: |
JulienBe | 26df320 | 2020-04-10 16:50:08 +0200 | [diff] [blame] | 60 | - name: MYSQL_USER |
| 61 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }} |
| 62 | - name: MYSQL_PASSWORD |
| 63 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }} |
| 64 | - name: MYSQL_ROOT_PASSWORD |
| 65 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 12 }} |
| 66 | - name: MYSQL_DATABASE |
| 67 | value: {{ tpl .Values.db.databaseName .}} |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 68 | volumeMounts: |
Krzysztof Opasiak | 37a4e70 | 2020-05-25 22:22:33 +0200 | [diff] [blame] | 69 | - mountPath: /docker-entrypoint.sh |
| 70 | subPath: docker-entrypoint.sh |
| 71 | name: init-script |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 72 | - mountPath: /etc/localtime |
| 73 | name: localtime |
| 74 | readOnly: true |
JulienBe | 26df320 | 2020-04-10 16:50:08 +0200 | [diff] [blame] | 75 | - mountPath: /docker-entrypoint-initdb.d/ |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 76 | name: docker-entrypoint-bulkload |
| 77 | - mountPath: /etc/mysql/conf.d/conf1/ |
| 78 | name: clamp-mariadb-conf |
| 79 | - mountPath: /var/lib/mysql |
| 80 | name: clamp-mariadb-data |
| 81 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 82 | {{ include "common.resources" . | indent 12 }} |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 83 | {{- if .Values.nodeSelector }} |
| 84 | nodeSelector: |
| 85 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 86 | {{- end -}} |
| 87 | {{- if .Values.affinity }} |
| 88 | affinity: |
| 89 | {{ toYaml .Values.affinity | indent 10 }} |
| 90 | {{- end }} |
| 91 | volumes: |
| 92 | {{- if .Values.persistence.enabled }} |
| 93 | - name: clamp-mariadb-data |
| 94 | persistentVolumeClaim: |
| 95 | claimName: {{ include "common.fullname" . }} |
| 96 | {{- else }} |
| 97 | emptyDir: {} |
| 98 | {{- end }} |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 99 | - name: docker-entrypoint-bulkload |
| 100 | configMap: |
| 101 | name: clamp-entrypoint-bulkload-configmap |
| 102 | - name: clamp-mariadb-conf |
| 103 | configMap: |
| 104 | name: clamp-mariadb-conf-configmap |
| 105 | - name: localtime |
| 106 | hostPath: |
| 107 | path: /etc/localtime |
Krzysztof Opasiak | 37a4e70 | 2020-05-25 22:22:33 +0200 | [diff] [blame] | 108 | - name: init-script |
| 109 | configMap: |
| 110 | name: {{ include "common.fullname" . }} |
| 111 | defaultMode: 0755 |
vaibhav_16dec | f67e418 | 2018-03-19 05:45:47 +0000 | [diff] [blame] | 112 | imagePullSecrets: |
| 113 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |