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 replicas: {{ .Values.replicaCount }}
20 selector: {{- include "common.selectors" . | nindent 4 }}
22 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
25 - name: {{ include "common.name" . }}-db-readiness
30 {{- if .Values.global.mariadbGalera.localCluster }}
40 fieldPath: metadata.namespace
41 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
42 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 - name: {{ include "common.name" . }}-ejbca
45 image: {{ .Values.ejbca.image }}
46 imagePullPolicy: {{ .Values.pullPolicy }}
50 command: ["/bin/sh", "-c", "/opt/primekey/scripts/ejbca-config.sh"]
52 - name: "{{ include "common.fullname" . }}-volume"
53 mountPath: /opt/primekey/scripts/
54 - name: "{{ include "common.fullname" . }}-profiles-volume"
55 mountPath: /opt/primekey/custom_profiles/
56 ports: {{ include "common.containerPorts" . | nindent 10 }}
59 value: ";PublicAccessAuthenticationToken:TRANSPORT_ANY;"
60 - name: DATABASE_JDBC_URL
61 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ .Values.mysqlDatabase }}
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "login") | indent 10 }}
64 - name: DATABASE_PASSWORD
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "password") | indent 10 }}
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-ra-iak" "key" "password") | indent 10 }}
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-client-iak" "key" "password") | indent 10 }}
72 port: {{ .Values.liveness.port }}
73 path: {{ .Values.liveness.path }}
75 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
76 periodSeconds: {{ .Values.liveness.periodSeconds }}
79 port: {{ .Values.readiness.port }}
80 path: {{ .Values.readiness.path }}
82 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
83 periodSeconds: {{ .Values.readiness.periodSeconds }}
84 {{- if .Values.nodeSelector }}
85 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
87 {{- if .Values.affinity }}
88 affinity: {{ toYaml .Values.affinity | nindent 10 }}
92 name: "{{ include "common.fullname" . }}-config-script"
94 name: "{{ include "common.fullname" . }}-volume"
96 name: "{{ include "common.fullname" . }}-profiles"
98 name: "{{ include "common.fullname" . }}-profiles-volume"