kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
| 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. |
| 14 | |
| 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 18 | labels: |
| 19 | app: {{ include "common.name" . }} |
| 20 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 21 | release: {{ include "common.release" . }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 22 | heritage: {{ .Release.Service }} |
| 23 | name: {{ include "common.fullname" . }} |
| 24 | namespace: {{ include "common.namespace" . }} |
| 25 | spec: |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 26 | replicas: {{ .Values.global.aaf.service.replicas }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 31 | release: {{ include "common.release" . }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 32 | spec: |
| 33 | initContainers: |
ChrisC | ec86a53 | 2020-03-19 15:53:31 -0500 | [diff] [blame] | 34 | - name: fix-permission |
| 35 | command: |
| 36 | - /bin/sh |
| 37 | args: |
| 38 | - -c |
| 39 | - | |
| 40 | chmod -R 775 /opt/app/aaf/status |
| 41 | chown -R 1000:1000 /opt/app/aaf/status |
| 42 | chmod -R 775 /opt/app/osaaf |
| 43 | chown -R 1000:1000 /opt/app/osaaf |
| 44 | image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}" |
| 45 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 46 | volumeMounts: |
| 47 | - mountPath: /opt/app/aaf/status |
| 48 | name: aaf-status-vol |
| 49 | - mountPath: /opt/app/osaaf |
| 50 | name: aaf-config-vol |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 51 | - name: {{ include "common.name" . }}-config-container |
Instrumental | 0c7bc94 | 2019-08-06 16:36:13 -0500 | [diff] [blame] | 52 | image: {{ .Values.global.repository }}/{{.Values.global.aaf.config.image}} |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 53 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 54 | command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config nc aaf-cass.{{ .Release.Namespace }} 9042 sleep 15 remove && bin/agent.sh"] |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 55 | volumeMounts: |
| 56 | - mountPath: "/opt/app/osaaf" |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 57 | name: aaf-config-vol |
| 58 | - mountPath: "/opt/app/aaf/status" |
| 59 | name: aaf-status-vol |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 60 | env: |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 61 | - name: aaf_env |
| 62 | value: "{{ .Values.global.aaf.aaf_env }}" |
| 63 | - name: cadi_latitude |
| 64 | value: "{{ .Values.global.aaf.cadi_latitude }}" |
| 65 | - name: cadi_longitude |
| 66 | value: "{{ .Values.global.aaf.cadi_longitude }}" |
| 67 | - name: cadi_x509_issuers |
| 68 | value: "{{ .Values.global.aaf.cadi_x509_issuers }}" |
| 69 | - name: aaf_locate_url |
| 70 | value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" |
| 71 | - name: aaf_locator_container |
| 72 | value: "oom" |
| 73 | - name: aaf_release |
| 74 | value: "{{ .Values.global.aaf.aaf_release }}" |
| 75 | - name: aaf_locator_container_ns |
| 76 | value: "{{ .Release.Namespace }}" |
| 77 | - name: aaf_locator_public_fqdn |
| 78 | value: "{{.Values.global.aaf.public_fqdn}}" |
| 79 | - name: aaf_locator_name |
| 80 | value: "{{.Values.global.aaf.aaf_locator_name}}" |
| 81 | - name: aaf_locator_name_oom |
| 82 | value: "{{.Values.global.aaf.aaf_locator_name_oom}}" |
Instrumental | 0c7bc94 | 2019-08-06 16:36:13 -0500 | [diff] [blame] | 83 | - name: cm_always_ignore_ips |
| 84 | value: "true" |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 85 | - name: CASSANDRA_CLUSTER |
| 86 | value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}" |
| 87 | # - name: CASSANDRA_USER |
| 88 | # value: "" |
| 89 | # - name: CASSANDRA_PASSWORD |
| 90 | # value: "" |
| 91 | # - name: CASSANDRA_PORT |
| 92 | # value: "" |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 93 | containers: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 94 | - name: {{ include "common.name" . }} |
Instrumental | 0c7bc94 | 2019-08-06 16:36:13 -0500 | [diff] [blame] | 95 | command: ["/bin/bash","-c","cd /opt/app/aaf && bin/pod_wait.sh aaf-service aaf-cass && exec bin/service"] |
| 96 | image: {{.Values.global.repository}}/{{.Values.global.aaf.image}} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 97 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Instrumental | 0c7bc94 | 2019-08-06 16:36:13 -0500 | [diff] [blame] | 98 | env: |
| 99 | - name: cm_always_ignore_ips |
| 100 | value: "true" |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 101 | lifecycle: |
| 102 | preStop: |
| 103 | exec: |
| 104 | command: ["/bin/sh","-c","rm /opt/app/aaf/status/aaf-service* && echo $HOSTNAME >> aaf-service.hosts"] |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 105 | volumeMounts: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 106 | - mountPath: "/opt/app/osaaf" |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 107 | name: aaf-config-vol |
| 108 | - mountPath: "/opt/app/aaf/status" |
| 109 | name: aaf-status-vol |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 110 | - mountPath: /etc/localtime |
| 111 | name: localtime |
| 112 | readOnly: true |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 113 | {{- if eq .Values.liveness.enabled true }} |
| 114 | livenessProbe: |
| 115 | tcpSocket: |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 116 | port: {{ .Values.global.aaf.service.internal_port }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 117 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 118 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 119 | {{ end -}} |
| 120 | readinessProbe: |
| 121 | tcpSocket: |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 122 | port: {{ .Values.global.aaf.service.internal_port }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 123 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 124 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 125 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 126 | {{ include "common.resources" . | indent 12 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 127 | {{- if .Values.nodeSelector }} |
| 128 | nodeSelector: |
| 129 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 130 | {{- end -}} |
| 131 | {{- if .Values.affinity }} |
| 132 | affinity: |
| 133 | {{ toYaml .Values.affinity | indent 10 }} |
| 134 | {{- end }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 135 | volumes: |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 136 | - name: localtime |
| 137 | hostPath: |
| 138 | path: /etc/localtime |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 139 | - name: aaf-status-vol |
| 140 | persistentVolumeClaim: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 141 | claimName: {{ include "common.release" . }}-aaf-status |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 142 | - name: aaf-config-vol |
| 143 | persistentVolumeClaim: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 144 | claimName: {{ include "common.release" . }}-aaf-config |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 145 | imagePullSecrets: |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 146 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |