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 {{ include "common.readinessCheck.waitFor" . | indent 8 | trim }}
55 - name: {{ include "common.name" . }}
56 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
62 export AAF_BASE64=$(echo -n "${AAF_USERNAME}:${AAF_PASSWORD}" | base64)
63 export AAF_AUTH=$(echo "Basic ${AAF_BASE64}")
64 export AAI_AUTH=$(cat /input/.aai_creds)
65 {{- if .Values.global.aafEnabled }}
66 export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
67 export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
68 {{- if .Values.global.security.aaf.enabled }}
69 export KEYSTORE_PASSWORD="${cadi_keystore_password}"
73 resources: {{ include "common.resources" . | nindent 12 }}
74 ports: {{- include "common.containerPorts" . | nindent 12 }}
77 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-aaf-creds" "key" "login") | indent 14 }}
79 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-aaf-creds" "key" "password") | indent 14 }}
80 - name: ACTUATOR_USERNAME
81 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "login") | indent 14 }}
82 - name: ACTUATOR_PASSWORD
83 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "password") | indent 14 }}
84 {{ include "so.certificates.env" . | indent 12 | trim }}
87 name: {{ include "common.fullname" . }}-env
88 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
89 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
93 mountPath: /app/config
100 path: {{ index .Values.livenessProbe.path}}
101 port: {{ index .Values.containerPort }}
102 scheme: {{ index .Values.livenessProbe.scheme}}
103 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
104 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
105 timeoutSeconds: {{ index .Values.livenessProbe.timeoutSeconds}}
106 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
107 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
108 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
113 name: {{ include "common.fullname" . }}
118 - name: "{{ include "common.namespace" . }}-docker-registry-key"