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: onboard-identity-and-fix-permission
24 echo "*** Move files from configmap to emptyDir"
25 cp -L /config-input-identity/* /config-identity/
26 echo "*** set righ user to the different folders"
27 chown -R 1000:1000 /config-identity
28 chown -R 1000:1000 /opt/app/aaf
29 chown -R 1000:1000 /opt/app/osaaf
30 image: {{ include "repositoryGenerator.image.busybox" . }}
31 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
33 - mountPath: /opt/app/osaaf
35 - mountPath: /config-input-identity
36 name: config-init-identity
37 - mountPath: /config-identity
48 {{- define "aaf.podConfiguration" }}
49 - name: {{ include "common.name" . }}-config-container
50 image: {{ include "repositoryGenerator.repository" . }}/{{.Values.global.aaf.config.image}}
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
57 cd /opt/app/aaf_config
60 - mountPath: "/opt/app/osaaf"
64 value: "{{ .Values.global.aaf.aaf_env }}"
66 value: "{{ .Values.global.aaf.cadi_latitude }}"
67 - name: cadi_longitude
68 value: "{{ .Values.global.aaf.cadi_longitude }}"
69 - name: cadi_x509_issuers
70 value: "{{ .Values.global.aaf.cadi_x509_issuers }}"
71 - name: aaf_locate_url
72 value: "https://aaf-locate.{{ .Release.Namespace}}:8095"
73 - name: aaf_locator_container
76 value: "{{ .Values.global.aaf.aaf_release }}"
77 - name: aaf_locator_container_ns
81 fieldPath: metadata.namespace
82 - name: aaf_locator_public_fqdn
83 value: "{{.Values.global.aaf.public_fqdn}}"
84 - name: aaf_locator_name
85 value: "{{.Values.global.aaf.aaf_locator_name}}"
86 - name: aaf_locator_name_oom
87 value: "{{.Values.global.aaf.aaf_locator_name_oom}}"
88 - name: cm_always_ignore_ips
90 - name: CASSANDRA_CLUSTER
91 value: "aaf-cass.{{ .Release.Namespace }}"
101 {{- define "aaf.initContainers" -}}
103 {{ include "aaf.permissionFixer" . }}
104 {{- if .Values.sequence_order }}
105 - name: {{ include "common.name" . }}-aaf-readiness
109 {{- range $container := .Values.sequence_order }}
111 - aaf-{{ $container}}
118 fieldPath: metadata.namespace
119 image: {{ include "repositoryGenerator.image.readiness" . }}
120 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
129 {{ include "aaf.podConfiguration" . }}