Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame^] | 1 | # Copyright © 2018 AT&T USA |
vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 14 | apiVersion: extensions/v1beta1 |
| 15 | kind: Deployment |
| 16 | metadata: |
Mandeep Khinda | a57d8dd | 2018-03-09 14:29:37 +0000 | [diff] [blame] | 17 | name: {{ include "common.fullname" . }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 18 | namespace: {{ include "common.namespace" . }} |
| 19 | labels: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame^] | 20 | app: {{ include "common.fullname" . }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 21 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 22 | release: {{ .Release.Name }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 23 | spec: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame^] | 24 | replicas: {{ index .Values.replicaCount }} |
| 25 | minReadySeconds: {{ index .Values.minReadySeconds }} |
| 26 | strategy: |
| 27 | type: {{ index .Values.updateStrategy.type }} |
| 28 | rollingUpdate: |
| 29 | maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }} |
| 30 | maxSurge: {{ index .Values.updateStrategy.maxSurge }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ include "common.name" . }} |
| 35 | release: {{ .Release.Name }} |
| 36 | spec: |
| 37 | initContainers: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame^] | 38 | - name: so-chown |
| 39 | image: alpine:3.6 |
| 40 | volumeMounts: |
| 41 | - name: logs |
| 42 | mountPath: /app/logs |
| 43 | imagePullPolicy: {{ index .Values.pullPolicy }} |
| 44 | command: ["/bin/sh", "-c", "chown -Rf 1000:1000 /app/logs"] |
| 45 | restartPolicy: Always |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 46 | containers: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame^] | 47 | - name: {{ include "common.name" . }} |
| 48 | image: {{ include "common.repository" . }}/{{ .Values.image }} |
| 49 | resources: |
| 50 | requests: |
| 51 | memory: {{ index .Values.resources.requests.memory}} |
| 52 | cpu: {{ index .Values.resources.requests.cpu}} |
| 53 | limits: |
| 54 | memory: {{ index .Values.resources.limits.memory}} |
| 55 | cpu: {{ index .Values.resources.limits.cpu}} |
| 56 | env: |
| 57 | - name: DB_HOST |
| 58 | valueFrom: |
| 59 | secretKeyRef: |
| 60 | name: {{ .Release.Name}}-so-db-secrets |
| 61 | key: mariadb.readwrite.host |
| 62 | - name: DB_PORT |
| 63 | valueFrom: |
| 64 | secretKeyRef: |
| 65 | name: {{ .Release.Name}}-so-db-secrets |
| 66 | key: mariadb.readwrite.port |
| 67 | - name: DB_USERNAME |
| 68 | valueFrom: |
| 69 | secretKeyRef: |
| 70 | name: {{ .Release.Name}}-so-db-secrets |
| 71 | key: mariadb.readwrite.rolename |
| 72 | - name: DB_PASSWORD |
| 73 | valueFrom: |
| 74 | secretKeyRef: |
| 75 | name: {{ .Release.Name}}-so-db-secrets |
| 76 | key: mariadb.readwrite.password |
| 77 | - name: DB_ADMIN_USERNAME |
| 78 | valueFrom: |
| 79 | secretKeyRef: |
| 80 | name: {{ .Release.Name}}-so-db-secrets |
| 81 | key: mariadb.admin.rolename |
| 82 | - name: DB_ADMIN_PASSWORD |
| 83 | valueFrom: |
| 84 | secretKeyRef: |
| 85 | name: {{ .Release.Name}}-so-db-secrets |
| 86 | key: mariadb.admin.password |
| 87 | - name: CADI_KEYSTORE_PASSWORD |
| 88 | valueFrom: |
| 89 | secretKeyRef: |
| 90 | name: {{ .Release.Name}}-so-ssl-pwd-secret |
| 91 | key: cadi_keystore_password |
| 92 | - name: CADI_TRUSTSTORE_PASSWORD |
| 93 | valueFrom: |
| 94 | secretKeyRef: |
| 95 | name: {{ .Release.Name}}-so-ssl-pwd-secret |
| 96 | key: cadi_truststore_password |
| 97 | - name: MSO_KEYSTORE_PASSWORD |
| 98 | valueFrom: |
| 99 | secretKeyRef: |
| 100 | name: {{ .Release.Name}}-so-ssl-client-secret |
| 101 | key: keystore_password |
| 102 | - name: MSO_TRUSTSTORE_PASSWORD |
| 103 | valueFrom: |
| 104 | secretKeyRef: |
| 105 | name: {{ .Release.Name}}-so-ssl-client-secret |
| 106 | key: truststore_password |
| 107 | envFrom: |
| 108 | - configMapRef: |
| 109 | name: {{ include "common.fullname" . }}-configmap |
| 110 | imagePullPolicy: {{ index .Values "global" "pullPolicy" }} |
| 111 | volumeMounts: |
| 112 | - name: logs |
| 113 | mountPath: /app/logs |
| 114 | - name: certs |
| 115 | mountPath: /app/certs/ |
| 116 | readOnly: true |
| 117 | - name: config |
| 118 | mountPath: /app/config |
| 119 | readOnly: true |
| 120 | livenessProbe: |
| 121 | httpGet: |
| 122 | path: {{- index .Values.livenessProbe.path|indent 2}} |
| 123 | port: {{ index .Values.containerPort }} |
| 124 | scheme: {{- index .Values.livenessProbe.scheme| indent 2}} |
| 125 | initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}} |
| 126 | periodSeconds: {{ index .Values.livenessProbe.periodSeconds}} |
| 127 | timeoutSeconds: {{ index .Values.livenessProbe.timeoutSeconds}} |
| 128 | successThreshold: {{ index .Values.livenessProbe.successThreshold}} |
| 129 | failureThreshold: {{ index .Values.livenessProbe.failureThreshold}} |
| 130 | ports: |
| 131 | - containerPort: {{ index .Values.containerPort }} |
| 132 | name: {{ .Values.service.portName }} |
| 133 | protocol: TCP |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 134 | volumes: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame^] | 135 | - name: logs |
| 136 | emptyDir: {} |
| 137 | - name: certs |
| 138 | secret: |
| 139 | secretName: {{ .Release.Name}}-so-ssl-secret |
| 140 | - name: config |
| 141 | configMap: |
| 142 | name: {{ include "common.fullname" . }}-app-configmap |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 143 | imagePullSecrets: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame^] | 144 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |