2 # Copyright © 2020 Huawei Technologies Co., Ltd.
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.
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21 selector: {{- include "common.selectors" . | nindent 4 }}
22 replicas: {{ index .Values.replicaCount }}
23 minReadySeconds: {{ index .Values.minReadySeconds }}
25 type: {{ index .Values.updateStrategy.type }}
27 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
28 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
31 labels: {{- include "common.labels" . | nindent 8 }}
33 initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
34 - name: {{ include "common.name" . }}-encrypter
40 java Crypto "${AAI_USERNAME}:${AAI_PASSWORD}" "${MSO_KEY}" > /output/.aai_creds
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-aai-creds" "key" "login") | indent 14 }}
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-aai-creds" "key" "password") | indent 14 }}
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cnf-adapter-mso-key" "key" "password") | indent 14 }}
48 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.global.soCryptoImage }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 - name: {{ include "common.name" . }}-readiness
58 - {{ include "common.release" . }}-so-mariadb-config-job
64 fieldPath: metadata.namespace
65 image: {{ include "repositoryGenerator.image.readiness" . }}
66 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 - name: {{ include "common.name" . }}
69 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
75 export AAF_BASE64=$(echo -n "${AAF_USERNAME}:${AAF_PASSWORD}" | base64)
76 export AAF_AUTH=$(echo "Basic ${AAF_BASE64}")
77 export AAI_AUTH=$(cat /input/.aai_creds)
78 {{- if .Values.global.aafEnabled }}
79 export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
80 export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
81 {{- if .Values.global.security.aaf.enabled }}
82 export KEYSTORE_PASSWORD="${cadi_keystore_password}"
86 resources: {{ include "common.resources" . | nindent 12 }}
87 ports: {{- include "common.containerPorts" . | nindent 12 }}
90 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-aaf-creds" "key" "login") | indent 14 }}
92 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-aaf-creds" "key" "password") | indent 14 }}
93 - name: ACTUATOR_USERNAME
94 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "login") | indent 14 }}
95 - name: ACTUATOR_PASSWORD
96 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "password") | indent 14 }}
97 {{ include "so.certificates.env" . | indent 12 | trim }}
100 name: {{ include "common.fullname" . }}-env
101 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
102 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
106 mountPath: /app/config
113 path: {{ index .Values.livenessProbe.path}}
114 port: {{ index .Values.containerPort }}
115 scheme: {{ index .Values.livenessProbe.scheme}}
116 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
117 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
118 timeoutSeconds: {{ index .Values.livenessProbe.timeoutSeconds}}
119 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
120 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
121 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
126 name: {{ include "common.fullname" . }}
131 - name: "{{ include "common.namespace" . }}-docker-registry-key"