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 ports: {{ include "common.containerPorts" . | nindent 10 }}
57 value: ";PublicAccessAuthenticationToken:TRANSPORT_ANY;"
58 - name: DATABASE_JDBC_URL
59 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ .Values.mysqlDatabase }}
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "login") | indent 10 }}
62 - name: DATABASE_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "password") | indent 10 }}
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-ra-iak" "key" "password") | indent 10 }}
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-client-iak" "key" "password") | indent 10 }}
70 port: {{ .Values.liveness.port }}
71 path: {{ .Values.liveness.path }}
73 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
74 periodSeconds: {{ .Values.liveness.periodSeconds }}
77 port: {{ .Values.readiness.port }}
78 path: {{ .Values.readiness.path }}
80 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
81 periodSeconds: {{ .Values.readiness.periodSeconds }}
82 {{- if .Values.nodeSelector }}
83 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
85 {{- if .Values.affinity }}
86 affinity: {{ toYaml .Values.affinity | nindent 10 }}
90 name: "{{ include "common.fullname" . }}-config-script"
92 name: "{{ include "common.fullname" . }}-volume"