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 }}
25 {{- if (include "common.onServiceMesh" . ) }}
27 {{- if eq ( .Values.global.serviceMesh.engine ) "linkerd" }}
28 linkerd.io/inject: disabled
30 {{- if eq ( .Values.global.serviceMesh.engine ) "istio" }}
31 traffic.sidecar.istio.io/excludeInboundPorts: "8080,8443"
32 traffic.sidecar.istio.io/includeInboundPorts: '*'
36 {{- include "common.imagePullSecrets" . | nindent 6 }}
38 {{- if .Values.global.addTestingComponents }}
39 - name: cmp-servers-template-volume
41 secretName: {{ .Values.cmpServers.secret.name }}
42 - name: {{ .Values.cmpServers.volume.name }}
46 - name: {{ .Values.cmpServers.volume.name }}
48 secretName: {{ .Values.cmpServers.secret.name }}
50 - name: {{ .Values.tls.server.volume.name }}
52 secretName: {{ .Values.tls.server.secret.name }}
53 {{- if .Values.global.addTestingComponents }}
55 - name: wait-for-ejbca
66 fieldPath: metadata.namespace
67 image: {{ include "repositoryGenerator.image.readiness" . }}
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
76 - name: subsitute-envs
77 image: {{ include "repositoryGenerator.image.envsubst" . }}
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
79 command: ['sh', '-c', "cd /config-input && envsubst < cmpServers.json > {{ .Values.cmpServers.volume.mountPath }}/cmpServers.json"]
81 - name: cmp-servers-template-volume
82 mountPath: /config-input
84 - name: {{ .Values.cmpServers.volume.name }}
85 mountPath: {{ .Values.cmpServers.volume.mountPath }}
89 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-client-iak" "key" "password") | indent 14 }}
91 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmp-config-client-rv" "key" "password") | indent 14 }}
93 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-ra-iak" "key" "password") | indent 14 }}
95 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmp-config-ra-rv" "key" "password") | indent 14 }}
98 - name: {{ include "common.name" . }}
99 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
100 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
101 ports: {{ include "common.containerPorts" . | nindent 10 }}
104 value: "{{ .Values.envs.httpsPort }}"
105 - name: KEYSTORE_PATH
106 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.jksName }}"
107 - name: KEYSTORE_P12_PATH
108 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.p12Name }}"
109 - name: TRUSTSTORE_PATH
110 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.jksName }}"
112 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.crtName }}"
113 - name: KEYSTORE_PASSWORD
114 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
115 - name: TRUSTSTORE_PASSWORD
116 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
122 - {{ .Values.liveness.command }}
123 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
124 periodSeconds: {{ .Values.liveness.periodSeconds }}
130 - {{ .Values.readiness.command }}
131 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
132 periodSeconds: {{ .Values.readiness.periodSeconds }}
134 - name: {{ .Values.cmpServers.volume.name }}
135 mountPath: {{ .Values.cmpServers.volume.mountPath }}
137 - name: {{ .Values.tls.server.volume.name }}
138 mountPath: {{ .Values.tls.server.volume.mountPath }}
140 resources: {{ include "common.resources" . | nindent 12 }}