1 {{/*# Copyright © 2020, Nokia
2 # Modifications 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.*/}}
16 {{- if .Values.global.cmpv2Enabled }}
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21 replicas: {{ .Values.replicaCount }}
22 selector: {{- include "common.selectors" . | nindent 4 }}
24 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
27 - name: "{{ include "common.namespace" . }}-docker-registry-key"
29 {{- if .Values.global.addTestingComponents }}
30 - name: cmp-servers-template-volume
32 secretName: {{ .Values.cmpServers.secret.name }}
33 - name: {{ .Values.cmpServers.volume.name }}
37 - name: {{ .Values.cmpServers.volume.name }}
39 secretName: {{ .Values.cmpServers.secret.name }}
41 - name: {{ .Values.tls.server.volume.name }}
43 secretName: {{ .Values.tls.server.secret.name }}
44 {{- if .Values.global.addTestingComponents }}
46 - name: wait-for-ejbca
57 fieldPath: metadata.namespace
58 image: {{ include "repositoryGenerator.image.readiness" . }}
59 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 - name: subsitute-envs
61 image: {{ include "repositoryGenerator.image.envsubst" . }}
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 command: ['sh', '-c', "cd /config-input && envsubst < cmpServers.json > {{ .Values.cmpServers.volume.mountPath }}/cmpServers.json"]
65 - name: cmp-servers-template-volume
66 mountPath: /config-input
68 - name: {{ .Values.cmpServers.volume.name }}
69 mountPath: {{ .Values.cmpServers.volume.mountPath }}
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-client-iak" "key" "password") | indent 14 }}
75 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmp-config-client-rv" "key" "password") | indent 14 }}
77 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-ra-iak" "key" "password") | indent 14 }}
79 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmp-config-ra-rv" "key" "password") | indent 14 }}
82 - name: {{ include "common.name" . }}
83 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
84 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 ports: {{ include "common.containerPorts" . | nindent 10 }}
88 value: "{{ .Values.envs.httpsPort }}"
90 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.jksName }}"
91 - name: KEYSTORE_P12_PATH
92 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.p12Name }}"
93 - name: TRUSTSTORE_PATH
94 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.jksName }}"
96 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.crtName }}"
97 - name: KEYSTORE_PASSWORD
98 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
99 - name: TRUSTSTORE_PASSWORD
100 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
106 - {{ .Values.liveness.command }}
107 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
108 periodSeconds: {{ .Values.liveness.periodSeconds }}
114 - {{ .Values.readiness.command }}
115 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
116 periodSeconds: {{ .Values.readiness.periodSeconds }}
118 - name: {{ .Values.cmpServers.volume.name }}
119 mountPath: {{ .Values.cmpServers.volume.mountPath }}
121 - name: {{ .Values.tls.server.volume.name }}
122 mountPath: {{ .Values.tls.server.volume.mountPath }}
124 resources: {{ include "common.resources" . | nindent 12 }}