1 # Copyright © 2017 Amdocs, Bell Canada
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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 apiVersion: extensions/v1beta1
18 app: {{ include "common.name" . }}
19 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
20 release: {{ include "common.release" . }}
21 heritage: {{ .Release.Service }}
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 replicas: {{ .Values.global.aaf.hello.replicas }}
29 app: {{ include "common.name" . }}
30 release: {{ include "common.release" . }}
37 {{- if and .Values.persistence.enabled }}
38 persistentVolumeClaim:
39 claimName: {{ include "common.release" . }}-aaf-hello-pvc
44 - name: "{{ include "common.namespace" . }}-docker-registry-key"
46 - name: fix-permission
47 command: ["/bin/sh","-c","chmod -R 775 /opt/app/osaaf/local && chown -R 1000:1000 /opt/app/osaaf"]
48 image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - mountPath: "/opt/app/osaaf/local"
53 - name: {{ include "common.name" . }}-config-container
54 image: {{ .Values.global.repository }}/{{.Values.aaf_init.image}}
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 command: ["bash","-c","cd /opt/app/aaf_config && bin/agent.sh"]
57 # command: ["bash","-c","cd /opt/app/aaf_config && echo Sleeping && sleep 480"]
58 # command: ["bash","-c","chown 1000:1000 /opt/app/osaaf && cd /opt/app/aaf_config && sleep 480"]
60 - mountPath: "/opt/app/osaaf/local"
64 value: "{{ .Values.aaf_init.fqi }}"
65 - name: aaf_locate_url
66 value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}"
67 - name: aaf_locator_container
69 - name: aaf_locator_container_ns
70 value: "{{ .Release.Namespace }}"
71 # This should the APP's FQDN to be put in Locator
72 # This MUST match what is entered for AAF Certificate Artifacts
73 - name: aaf_locator_fqdn
74 value: "{{.Values.aaf_init.fqdn}}"
75 # Hello specific. Clients don't don't need this, unless Registering with AAF Locator
76 # This should be the APP's PUBLIC FQDN, if applicable
77 - name: aaf_locator_public_fqdn
78 value: "{{.Values.aaf_init.locator_public_fqdn}}"
80 value: "{{ .Values.aaf_init.cadi_latitude }}"
82 value: "{{ .Values.aaf_init.cadi_longitude }}"
83 # Note: We want to put this in Secrets or at LEAST ConfigMaps
85 value: "deployer@people.osaaf.org"
86 # Note: want to put this on Nodes, evenutally
87 - name: "DEPLOY_PASSWORD"
89 # CONTAINER Definition
91 - name: {{ include "common.name" . }}
92 command: ["bash","-c","cd /opt/app/aaf && if [ ! -d /opt/app/osaaf/etc ]; then cp -Rf etc logs /opt/app/osaaf; fi && exec bin/hello"]
93 image: {{ .Values.global.repository }}/{{.Values.service.image }}
94 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 - mountPath: "/opt/app/osaaf/local"
98 - mountPath: /etc/localtime
101 {{- if eq .Values.liveness.enabled true }}
104 port: {{ .Values.service.port }}
105 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
106 periodSeconds: {{ .Values.liveness.periodSeconds }}
110 port: {{ .Values.service.port }}
111 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
112 periodSeconds: {{ .Values.readiness.periodSeconds }}
114 {{ include "common.resources" . | indent 12 }}
115 {{- if .Values.nodeSelector }}
117 {{ toYaml .Values.nodeSelector | indent 10 }}
119 {{- if .Values.affinity }}
121 {{ toYaml .Values.affinity | indent 10 }}