1 # Copyright © 2020 Huawei Technologies Co., Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
18 selector: {{- include "common.selectors" . | nindent 4 }}
19 replicas: {{ index .Values.replicaCount }}
20 minReadySeconds: {{ index .Values.minReadySeconds }}
22 type: {{ index .Values.updateStrategy.type }}
24 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
25 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
28 labels: {{- include "common.labels" . | nindent 8 }}
30 initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
31 - name: {{ include "common.name" . }}-readiness
36 - {{ include "common.release" . }}-so-mariadb-config-job
42 fieldPath: metadata.namespace
43 image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
44 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
46 - name: {{ include "common.name" . }}
52 export BPEL_PASSWORD=`htpasswd -bnBC 10 "" $BPEL_PASSWORD_INPUT | tr -d ':\n' | sed 's/\$2y/\$2a/'`
53 export ACTUATOR_PASSWORD=`htpasswd -bnBC 10 "" $ACTUATOR_PASSWORD_INPUT | tr -d ':\n' | sed 's/\$2y/\$2a/'`
54 {{- if .Values.global.aafEnabled }}
55 export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
56 export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
57 {{- if .Values.global.security.aaf.enabled }}
58 export KEYSTORE_PASSWORD="${cadi_keystore_password}"
62 image: {{ include "common.repository" . }}/{{ .Values.image }}
63 resources: {{ include "common.resources" . | nindent 12 }}
64 ports: {{- include "common.containerPorts" . | nindent 12 }}
69 name: {{ include "common.release" . }}-so-db-secrets
70 key: mariadb.readwrite.host
74 name: {{ include "common.release" . }}-so-db-secrets
75 key: mariadb.readwrite.port
77 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 14 }}
79 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 14 }}
80 - name: DB_ADMIN_USERNAME
81 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 14 }}
82 - name: DB_ADMIN_PASSWORD
83 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 14 }}
85 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-bpel-creds" "key" "login") | indent 14 }}
86 - name: BPEL_PASSWORD_INPUT
87 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-bpel-creds" "key" "password") | indent 14 }}
88 - name: ACTUATOR_USERNAME
89 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "login") | indent 14 }}
90 - name: ACTUATOR_PASSWORD_INPUT
91 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "password") | indent 14 }}
92 {{ include "so.certificates.env" . | indent 8 | trim }}
95 name: {{ include "common.fullname" . }}-env
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
97 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
101 mountPath: /app/config
103 - name: {{ include "common.fullname" . }}-truststore
104 mountPath: /app/client
108 path: {{ index .Values.livenessProbe.path}}
109 port: {{ index .Values.containerPort }}
110 scheme: {{ index .Values.livenessProbe.scheme}}
111 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
112 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
113 timeoutSeconds: {{ index .Values.livenessProbe.timeoutSeconds}}
114 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
115 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
116 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
121 name: {{ include "common.fullname" . }}
122 - name: {{ include "common.fullname" . }}-truststore
124 secretName: {{ include "common.release" . }}-so-truststore-secret
126 - name: "{{ include "common.namespace" . }}-docker-registry-key"