blob: 84a3e87098f2266fd6891611e5cab422fc7522f1 [file] [log] [blame]
Sylvain Desbureauxda711dd2021-04-07 17:22:42 +02001{{/*
2# Copyright © 2021 Orange
3#
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
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
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.
15*/}}
16
17{{- if hasKey .Values "ingressTlsSecret" }}
18apiVersion: batch/v1
19kind: Job
20{{- $suffix := "set-tls-secret" }}
21metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "dot" . )| nindent 2 }}
22spec:
Sylvain Desbureauxc9f47132021-04-07 17:26:25 +020023 backoffLimit: 20
Sylvain Desbureauxda711dd2021-04-07 17:22:42 +020024 template:
25 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
26 spec:
27 initContainers: {{ include "common.certInitializer.initContainer" (dict "dot" . "initRoot" .Values) | nindent 6 }}
Andreas Geissler281cd4b2022-01-10 12:58:06 +000028 imagePullSecrets:
29 - name: "{{ include "common.namespace" . }}-docker-registry-key"
Sylvain Desbureauxda711dd2021-04-07 17:22:42 +020030 containers:
Sylvain Desbureauxc9f47132021-04-07 17:26:25 +020031 - name: create-tls-secret
Sylvain Desbureauxda711dd2021-04-07 17:22:42 +020032 command:
33 - /ingress/onboard.sh
34 image: {{ include "repositoryGenerator.image.kubectl" . }}
35 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
36 volumeMounts: {{ include "common.certInitializer.volumeMount" (dict "dot" . "initRoot" .Values) | nindent 8 }}
37 - name: ingress-scripts
38 mountPath: /ingress
39 volumes: {{ include "common.certInitializer.volumes" (dict "dot" . "initRoot" .Values) | nindent 6 }}
40 - name: localtime
41 hostPath:
42 path: /etc/localtime
43 - name: ingress-scripts
44 configMap:
45 name: {{ include "common.fullname" . }}-ingress
46 defaultMode: 0777
Sylvain Desbureauxc9f47132021-04-07 17:26:25 +020047 restartPolicy: Never
Sylvain Desbureauxda711dd2021-04-07 17:22:42 +020048{{- end}}