2 # Copyright © 2020 AT&T USA
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 6 }}
34 - name: {{ include "common.name" . }}-pass-encoder
38 {{/* bcrypt plain text and convert to OpenBSD variant using sed */}}
40 - htpasswd -bnBC 10 "" "${ACTUATOR_PASSWORD}" | tr -d ':\n' | sed 's/\$2y/\$2a/' 1>/tmp/app/encoded;
42 - name: ACTUATOR_PASSWORD
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "password") | indent 10 }}
44 image: {{ include "repositoryGenerator.image.htpasswd" . }}
45 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 - name: {{ include "common.name" . }}
56 export ACTUATOR_PASSWORD="$(cat /tmp/app/encoded)"
57 {{- if .Values.global.aafEnabled }}
58 export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
59 export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
60 {{- if .Values.global.security.aaf.enabled }}
61 export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
65 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
66 resources: {{ include "common.resources" . | nindent 12 }}
68 - name: ACTUATOR_USERNAME
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "login") | indent 10 }}
70 {{ include "so.certificates.env" . | indent 8 | trim }}
73 name: {{ include "common.fullname" . }}-configmap
74 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
75 ports: {{- include "common.containerPorts" . | nindent 10 }}
76 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 8 }}
82 mountPath: /app/config
84 {{ include "so.helpers.livenessProbe" .| indent 8 }}
85 volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
93 name: {{ include "common.fullname" . }}-app-configmap
95 - name: "{{ include "common.namespace" . }}-docker-registry-key"