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" . }}
53 - export ACTUATOR_PASSWORD="$(cat /tmp/app/encoded)"; ./start-app.sh
54 image: {{ include "common.repository" . }}/{{ .Values.image }}
55 resources: {{ include "common.resources" . | nindent 12 }}
57 - name: ACTUATOR_USERNAME
58 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "server-actuator-creds" "key" "login") | indent 10 }}
61 name: {{ include "common.fullname" . }}-configmap
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 ports: {{- include "common.containerPorts" . | nindent 10 }}
64 volumeMounts: {{ include "so.certificate.volume-mounts" . | nindent 8 }}
70 mountPath: /app/config
72 {{ include "helpers.livenessProbe" .| indent 8 }}
73 volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
81 name: {{ include "common.fullname" . }}-app-configmap
83 - name: "{{ include "common.namespace" . }}-docker-registry-key"