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 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 - name: {{ include "common.name" . }}-db-readiness
34 {{- if .Values.global.mariadbGalera.localCluster }}
44 fieldPath: metadata.namespace
45 image: {{ include "repositoryGenerator.image.readiness" . }}
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 - name: {{ include "common.name" . }}-ejbca
49 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.ejbca.image }}
50 imagePullPolicy: {{ .Values.pullPolicy }}
54 command: ["/bin/sh", "-c", "/opt/primekey/scripts/ejbca-config.sh"]
56 - name: "{{ include "common.fullname" . }}-volume"
57 mountPath: /opt/primekey/scripts/
58 - name: "{{ include "common.fullname" . }}-profiles-volume"
59 mountPath: /opt/primekey/custom_profiles/
60 ports: {{ include "common.containerPorts" . | nindent 10 }}
63 value: ";PublicAccessAuthenticationToken:TRANSPORT_ANY;"
66 - name: DATABASE_JDBC_URL
67 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ .Values.mysqlDatabase }}
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "login") | indent 10 }}
70 - name: DATABASE_PASSWORD
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "password") | indent 10 }}
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-ra-iak" "key" "password") | indent 10 }}
75 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-client-iak" "key" "password") | indent 10 }}
78 port: {{ .Values.liveness.port }}
79 path: {{ .Values.liveness.path }}
81 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
82 periodSeconds: {{ .Values.liveness.periodSeconds }}
85 port: {{ .Values.readiness.port }}
86 path: {{ .Values.readiness.path }}
88 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
89 periodSeconds: {{ .Values.readiness.periodSeconds }}
90 {{- if .Values.nodeSelector }}
91 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
93 {{- if .Values.affinity }}
94 affinity: {{ toYaml .Values.affinity | nindent 10 }}
96 resources: {{ include "common.resources" . | nindent 10 }}
99 name: "{{ include "common.fullname" . }}-config-script"
101 name: "{{ include "common.fullname" . }}-volume"
103 name: "{{ include "common.fullname" . }}-profiles"
105 name: "{{ include "common.fullname" . }}-profiles-volume"