2 # Copyright © 2020 AT&T, Orange
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 {{- define "aaf.permissionFixer" -}}
18 - name: fix-permission
24 chown -R 1000:1000 /opt/app/aaf
25 chown -R 1000:1000 /opt/app/osaaf
26 image: {{ include "repositoryGenerator.image.busybox" . }}
27 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
29 - mountPath: /opt/app/osaaf
40 {{- define "aaf.podConfiguration" }}
41 - name: {{ include "common.name" . }}-config-container
42 image: {{ include "repositoryGenerator.repository" . }}/{{.Values.global.aaf.config.image}}
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 cd /opt/app/aaf_config
52 - mountPath: "/opt/app/osaaf"
56 value: "{{ .Values.global.aaf.aaf_env }}"
58 value: "{{ .Values.global.aaf.cadi_latitude }}"
59 - name: cadi_longitude
60 value: "{{ .Values.global.aaf.cadi_longitude }}"
61 - name: cadi_x509_issuers
62 value: "{{ .Values.global.aaf.cadi_x509_issuers }}"
63 - name: aaf_locate_url
64 value: "https://aaf-locate.{{ .Release.Namespace}}:8095"
65 - name: aaf_locator_container
68 value: "{{ .Values.global.aaf.aaf_release }}"
69 - name: aaf_locator_container_ns
73 fieldPath: metadata.namespace
74 - name: aaf_locator_public_fqdn
75 value: "{{.Values.global.aaf.public_fqdn}}"
76 - name: aaf_locator_name
77 value: "{{.Values.global.aaf.aaf_locator_name}}"
78 - name: aaf_locator_name_oom
79 value: "{{.Values.global.aaf.aaf_locator_name_oom}}"
80 - name: cm_always_ignore_ips
82 - name: CASSANDRA_CLUSTER
83 value: "aaf-cass.{{ .Release.Namespace }}"
93 {{- define "aaf.initContainers" -}}
95 {{ include "aaf.permissionFixer" . }}
96 {{- if .Values.sequence_order }}
97 - name: {{ include "common.name" . }}-aaf-readiness
101 {{- range $container := .Values.sequence_order }}
103 - aaf-{{ $container}}
110 fieldPath: metadata.namespace
111 image: {{ include "repositoryGenerator.image.readiness" . }}
112 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
121 {{ include "aaf.podConfiguration" . }}