2 # Copyright © 2020 Nordix Foundation
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 }}
30 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
32 initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
34 - name: {{ include "common.name" . }}
40 export ETSI_NFVO_PASSWORD=`htpasswd -bnBC 10 "" $ETSI_NFVO_PASSWORD_INPUT | tr -d ':\n' | sed 's/\$2y/\$2a/'`
41 {{- if .Values.global.aafEnabled }}
42 export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
43 export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
44 {{- if .Values.global.security.aaf.enabled }}
45 export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
49 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
50 resources: {{ include "common.resources" . | nindent 12 }}
52 - name: ETSI_NFVO_USERNAME
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "etsi-nfvo-nslcm-creds" "key" "login") | indent 14 }}
54 - name: ETSI_NFVO_PASSWORD_INPUT
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "etsi-nfvo-nslcm-creds" "key" "password") | indent 14 }}
57 value: {{ include "common.mariadbService" . }}
59 value: {{ include "common.mariadbPort" . | quote }}
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 14 }}
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 14 }}
64 - name: DB_ADMIN_USERNAME
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 14 }}
66 - name: DB_ADMIN_PASSWORD
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 14 }}
68 {{ include "so.certificates.env" . | indent 12 | trim }}
71 name: {{ include "common.fullname" . }}-configmap
72 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
77 mountPath: /app/config
81 port: {{ index .Values.livenessProbe.port }}
82 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
83 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
84 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
85 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
86 ports: {{ include "common.containerPorts" . | nindent 12 }}
87 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
92 name: {{ include "common.fullname" . }}-app-configmap
94 - name: "{{ include "common.namespace" . }}-docker-registry-key"