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 "+" "_" }} |
| 21 | release: {{ .Release.Name }} |
| 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.hello.replicas }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: {{ include "common.name" . }} |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 31 | release: {{ .Release.Name }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 32 | spec: |
| 33 | initContainers: |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 34 | - name: {{ include "common.name" . }}-config-container |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 35 | image: {{ .Values.global.repository }}/onap/aaf/aaf_agent:{{.Values.global.aaf.imageVersion}} |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 36 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 37 | volumeMounts: |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 38 | - mountPath: "/opt/app/osaaf/local" |
| 39 | name: aaf-hello-vol |
| 40 | command: ["bash","-c","/opt/app/aaf_config/bin/pod_wait.sh config nc aaf-cm.{{.Release.Namespace}} 8150 remove && cd /opt/app/osaaf/local && /opt/app/aaf_config/bin/agent.sh"] |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 41 | env: |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 42 | - name: aaf_env |
| 43 | value: "{{ .Values.global.aaf.aaf_env }}" |
| 44 | - name: cadi_latitude |
| 45 | value: "{{ .Values.global.aaf.cadi_latitude }}" |
| 46 | - name: cadi_longitude |
| 47 | value: "{{ .Values.global.aaf.cadi_longitude }}" |
| 48 | - name: aaf_locate_url |
| 49 | value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" |
| 50 | - name: aaf_locator_container |
| 51 | value: "oom" |
| 52 | - name: aaf_release |
| 53 | value: "{{ .Values.global.aaf.aaf_release }}" |
| 54 | - name: aaf_locator_container_ns |
| 55 | value: "{{ .Release.Namespace }}" |
| 56 | - name: aaf_locator_container |
| 57 | value: "oom" |
| 58 | - name: aaf_locator_container_ns |
| 59 | value: "{{ .Release.Namespace }}" |
| 60 | - name: aaf_locator_app_ns |
| 61 | value: "org.osaaf.aaf" |
| 62 | - name: "APP_FQDN" |
| 63 | value: "{{ .Values.global.aaf.hello.fqdn }}" |
| 64 | - name: "APP_FQI" |
| 65 | value: "aaf@aaf.osaaf.org" |
| 66 | - name: "DEPLOY_FQI" |
| 67 | value: "deployer@people.osaaf.org" |
| 68 | - name: "DEPLOY_PASSWORD" |
| 69 | value: "demo123456!" |
| 70 | # Hello specific. Clients don't necessarily need this |
| 71 | - name: aaf_locator_public_fqdn |
| 72 | value: "{{.Values.global.aaf.public_fqdn}}" |
| 73 | - name: aaf_locator_name |
| 74 | value: "{{.Values.global.aaf.aaf_locator_name}}" |
| 75 | - name: aaf_locator_name_oom |
| 76 | value: "{{.Values.global.aaf.aaf_locator_name_oom}}" |
| 77 | - name: aaf_locator_fqdn_oom |
| 78 | value: "%N.%CNS" |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 79 | containers: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 80 | - name: {{ include "common.name" . }} |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 81 | command: ["/bin/bash","-c","cd /opt/app/aaf && exec bin/hello"] |
| 82 | image: {{ .Values.global.repository }}/onap/aaf/aaf_hello:{{.Values.global.aaf.imageVersion}} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 83 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 84 | volumeMounts: |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 85 | - mountPath: "/opt/app/osaaf/local" |
| 86 | name: aaf-hello-vol |
| 87 | - mountPath: "/opt/app/aaf/status" |
| 88 | name: aaf-status-vol |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 89 | - mountPath: /etc/localtime |
| 90 | name: localtime |
| 91 | readOnly: true |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 92 | {{- if eq .Values.liveness.enabled true }} |
| 93 | livenessProbe: |
| 94 | tcpSocket: |
| 95 | port: {{ .Values.service.internalPort }} |
| 96 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 97 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 98 | {{ end -}} |
| 99 | readinessProbe: |
| 100 | tcpSocket: |
| 101 | port: {{ .Values.service.internalPort }} |
| 102 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 103 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 104 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 105 | {{ include "common.resources" . | indent 12 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 106 | {{- if .Values.nodeSelector }} |
| 107 | nodeSelector: |
| 108 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 109 | {{- end -}} |
| 110 | {{- if .Values.affinity }} |
| 111 | affinity: |
| 112 | {{ toYaml .Values.affinity | indent 10 }} |
| 113 | {{- end }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 114 | volumes: |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 115 | - name: localtime |
| 116 | hostPath: |
| 117 | path: /etc/localtime |
Instrumental | cc3a0bd | 2019-05-01 14:18:49 -0500 | [diff] [blame] | 118 | - name: aaf-status-vol |
| 119 | persistentVolumeClaim: |
| 120 | claimName: {{ .Release.Name }}-aaf-status-pvc |
| 121 | - name: aaf-hello-vol |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 122 | emptyDir: {} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 123 | imagePullSecrets: |
Instrumental | 378109d | 2018-10-16 20:40:41 -0500 | [diff] [blame] | 124 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |