1 # Copyright © 2020 Nordix Foundation
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 }}
28 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
30 initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
32 - name: {{ include "common.name" . }}
38 export ETSI_NFVO_PASSWORD=`htpasswd -bnBC 10 "" $ETSI_NFVO_PASSWORD_INPUT | tr -d ':\n' | sed 's/\$2y/\$2a/'`
39 {{- if .Values.global.aafEnabled }}
40 export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
41 export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
42 {{- if .Values.global.security.aaf.enabled }}
43 export KEYSTORE_PASSWORD="${cadi_keystore_password}"
47 image: {{ include "common.repository" . }}/{{ .Values.image }}
48 resources: {{ include "common.resources" . | nindent 12 }}
50 - name: ETSI_NFVO_USERNAME
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "etsi-nfvo-nslcm-creds" "key" "login") | indent 14 }}
52 - name: ETSI_NFVO_PASSWORD_INPUT
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "etsi-nfvo-nslcm-creds" "key" "password") | indent 14 }}
57 name: {{ include "common.release" . }}-so-db-secrets
58 key: mariadb.readwrite.host
62 name: {{ include "common.release" . }}-so-db-secrets
63 key: mariadb.readwrite.port
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 14 }}
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 14 }}
68 - name: DB_ADMIN_USERNAME
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 14 }}
70 - name: DB_ADMIN_PASSWORD
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 14 }}
72 {{ include "so.certificates.env" . | indent 12 | trim }}
75 name: {{ include "common.fullname" . }}-configmap
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
81 mountPath: /app/config
83 - name: {{ include "common.fullname" . }}-truststore
84 mountPath: /app/client
88 port: {{ index .Values.livenessProbe.port }}
89 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
90 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
91 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
92 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
93 ports: {{ include "common.containerPorts" . | nindent 12 }}
94 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
99 name: {{ include "common.fullname" . }}-app-configmap
100 - name: {{ include "common.fullname" . }}-truststore
102 secretName: {{ include "common.release" . }}-so-truststore-secret
104 - name: "{{ include "common.namespace" . }}-docker-registry-key"