1 # Copyright © 2020 AT&T USA
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.
17 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
19 selector: {{- include "common.selectors" . | nindent 4 }}
20 replicas: {{ index .Values.replicaCount }}
21 minReadySeconds: {{ index .Values.minReadySeconds }}
23 type: {{ index .Values.updateStrategy.type }}
25 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
26 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
29 labels: {{- include "common.labels" . | nindent 8 }}
31 initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
32 - name: {{ include "common.name" . }}-pass-encoder
36 {{/* bcrypt plain text and convert to OpenBSD variant using sed */}}
38 - htpasswd -bnBC 10 "" "${ACTUATOR_PASSWORD}" | tr -d ':\n' | sed 's/\$2y/\$2a/' 1>/tmp/app/encoded;
40 - name: ACTUATOR_PASSWORD
41 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "password") | indent 10 }}
42 image: {{ .Values.global.dockerHubRepository }}/{{ .Values.global.htpasswdImage }}
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 - name: {{ include "common.name" . }}
54 export ACTUATOR_PASSWORD="$(cat /tmp/app/encoded)"
55 {{- if .Values.global.aafEnabled }}
56 export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
57 export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
58 {{- if .Values.global.security.aaf.enabled }}
59 export KEYSTORE_PASSWORD="${cadi_keystore_password}"
63 image: {{ include "common.repository" . }}/{{ .Values.image }}
64 resources: {{ include "common.resources" . | nindent 12 }}
66 - name: ACTUATOR_USERNAME
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "login") | indent 10 }}
68 {{ include "so.certificates.env" . | indent 8 | trim }}
71 name: {{ include "common.fullname" . }}-configmap
72 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 ports: {{- include "common.containerPorts" . | nindent 10 }}
74 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 8 }}
80 mountPath: /app/config
82 {{ include "so.helpers.livenessProbe" .| indent 8 }}
83 volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
91 name: {{ include "common.fullname" . }}-app-configmap
93 - name: "{{ include "common.namespace" . }}-docker-registry-key"