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: '*'
37 - name: "{{ include "common.namespace" . }}-docker-registry-key"
39 {{- if .Values.global.addTestingComponents }}
40 - name: cmp-servers-template-volume
42 secretName: {{ .Values.cmpServers.secret.name }}
43 - name: {{ .Values.cmpServers.volume.name }}
47 - name: {{ .Values.cmpServers.volume.name }}
49 secretName: {{ .Values.cmpServers.secret.name }}
51 - name: {{ .Values.tls.server.volume.name }}
53 secretName: {{ .Values.tls.server.secret.name }}
54 {{- if .Values.global.addTestingComponents }}
56 - name: wait-for-ejbca
67 fieldPath: metadata.namespace
68 image: {{ include "repositoryGenerator.image.readiness" . }}
69 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 - name: subsitute-envs
71 image: {{ include "repositoryGenerator.image.envsubst" . }}
72 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 command: ['sh', '-c', "cd /config-input && envsubst < cmpServers.json > {{ .Values.cmpServers.volume.mountPath }}/cmpServers.json"]
75 - name: cmp-servers-template-volume
76 mountPath: /config-input
78 - name: {{ .Values.cmpServers.volume.name }}
79 mountPath: {{ .Values.cmpServers.volume.mountPath }}
83 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-client-iak" "key" "password") | indent 14 }}
85 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmp-config-client-rv" "key" "password") | indent 14 }}
87 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-ra-iak" "key" "password") | indent 14 }}
89 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmp-config-ra-rv" "key" "password") | indent 14 }}
92 - name: {{ include "common.name" . }}
93 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
94 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
95 ports: {{ include "common.containerPorts" . | nindent 10 }}
98 value: "{{ .Values.envs.httpsPort }}"
100 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.jksName }}"
101 - name: KEYSTORE_P12_PATH
102 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.p12Name }}"
103 - name: TRUSTSTORE_PATH
104 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.jksName }}"
106 value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.crtName }}"
107 - name: KEYSTORE_PASSWORD
108 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
109 - name: TRUSTSTORE_PASSWORD
110 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
116 - {{ .Values.liveness.command }}
117 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
118 periodSeconds: {{ .Values.liveness.periodSeconds }}
124 - {{ .Values.readiness.command }}
125 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
126 periodSeconds: {{ .Values.readiness.periodSeconds }}
128 - name: {{ .Values.cmpServers.volume.name }}
129 mountPath: {{ .Values.cmpServers.volume.mountPath }}
131 - name: {{ .Values.tls.server.volume.name }}
132 mountPath: {{ .Values.tls.server.volume.mountPath }}
134 resources: {{ include "common.resources" . | nindent 12 }}