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 }}
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 sidecar.istio.io/rewriteAppHTTPProbers: "false"
32 proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }'
37 - name: "{{ include "common.namespace" . }}-docker-registry-key"
39 - name: {{ include "common.name" . }}-db-readiness
44 {{- if .Values.global.mariadbGalera.localCluster }}
54 fieldPath: metadata.namespace
55 image: {{ include "repositoryGenerator.image.readiness" . }}
56 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
58 - name: {{ include "common.name" . }}-ejbca
59 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.ejbca.image }}
60 imagePullPolicy: {{ .Values.pullPolicy }}
68 sleep 60; /opt/primekey/scripts/ejbca-config.sh
70 - name: "{{ include "common.fullname" . }}-volume"
71 mountPath: /opt/primekey/scripts/
72 - name: "{{ include "common.fullname" . }}-profiles-volume"
73 mountPath: /opt/primekey/custom_profiles/
74 ports: {{ include "common.containerPorts" . | nindent 10 }}
77 value: ";PublicAccessAuthenticationToken:TRANSPORT_ANY;"
80 - name: DATABASE_JDBC_URL
81 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ .Values.mysqlDatabase }}
83 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "login") | indent 10 }}
84 - name: DATABASE_PASSWORD
85 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-db-secret" "key" "password") | indent 10 }}
87 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-ra-iak" "key" "password") | indent 10 }}
89 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ejbca-server-client-iak" "key" "password") | indent 10 }}
92 port: {{ .Values.liveness.port }}
93 path: {{ .Values.liveness.path }}
95 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
96 periodSeconds: {{ .Values.liveness.periodSeconds }}
99 port: {{ .Values.readiness.port }}
100 path: {{ .Values.readiness.path }}
102 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
103 periodSeconds: {{ .Values.readiness.periodSeconds }}
104 {{- if .Values.nodeSelector }}
105 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
107 {{- if .Values.affinity }}
108 affinity: {{ toYaml .Values.affinity | nindent 10 }}
110 resources: {{ include "common.resources" . | nindent 10 }}
111 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
114 name: "{{ include "common.fullname" . }}-config-script"
116 name: "{{ include "common.fullname" . }}-volume"
118 name: "{{ include "common.fullname" . }}-profiles"
120 name: "{{ include "common.fullname" . }}-profiles-volume"