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.
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20 selector: {{- include "common.selectors" . | nindent 4 }}
21 replicas: {{ index .Values.replicaCount }}
22 minReadySeconds: {{ index .Values.minReadySeconds }}
24 type: {{ index .Values.updateStrategy.type }}
26 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
27 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
30 labels: {{- include "common.labels" . | nindent 8 }}
33 {{ include "so.certificate.container_importer" . | indent 6 | trim }}
34 {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
36 - name: {{ include "common.name" . }}
42 export BPEL_PASSWORD=`htpasswd -bnBC 10 "" $BPEL_PASSWORD_INPUT | tr -d ':\n' | sed 's/\$2y/\$2a/'`
43 export ACTUATOR_PASSWORD=`htpasswd -bnBC 10 "" $ACTUATOR_PASSWORD_INPUT | tr -d ':\n' | sed 's/\$2y/\$2a/'`
44 {{- if .Values.global.aafEnabled }}
45 export $(cat {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
46 {{- if .Values.global.security.aaf.enabled }}
47 export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
51 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
52 resources: {{ include "common.resources" . | nindent 12 }}
53 ports: {{- include "common.containerPorts" . | nindent 12 }}
56 value: {{ include "common.mariadbService" . }}
58 value: {{ include "common.mariadbPort" . | quote }}
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 14 }}
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 14 }}
63 - name: DB_ADMIN_USERNAME
64 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 14 }}
65 - name: DB_ADMIN_PASSWORD
66 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 14 }}
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-bpel-creds" "key" "login") | indent 14 }}
69 - name: BPEL_PASSWORD_INPUT
70 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-bpel-creds" "key" "password") | indent 14 }}
71 - name: ACTUATOR_USERNAME
72 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "login") | indent 14 }}
73 - name: ACTUATOR_PASSWORD_INPUT
74 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "password") | indent 14 }}
75 {{ include "so.certificates.env" . | nindent 12 }}
78 name: {{ include "common.fullname" . }}-env
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
84 mountPath: /app/config
88 path: {{ index .Values.livenessProbe.path}}
89 port: {{ index .Values.containerPort }}
90 scheme: {{ index .Values.livenessProbe.scheme}}
91 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
92 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
93 timeoutSeconds: {{ index .Values.livenessProbe.timeoutSeconds}}
94 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
95 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
96 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
97 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
102 name: {{ include "common.fullname" . }}
104 - name: "{{ include "common.namespace" . }}-docker-registry-key"