blob: 331a58c3103ad27d85f8e994e566c48a50bbeaaa [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:
23 template:
24 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
25 spec:
26 initContainers: {{ include "common.certInitializer.initContainer" (dict "dot" . "initRoot" .Values) | nindent 6 }}
27 containers:
28 - name: create tls secret
29 command:
30 - /ingress/onboard.sh
31 image: {{ include "repositoryGenerator.image.kubectl" . }}
32 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
33 volumeMounts: {{ include "common.certInitializer.volumeMount" (dict "dot" . "initRoot" .Values) | nindent 8 }}
34 - name: ingress-scripts
35 mountPath: /ingress
36 volumes: {{ include "common.certInitializer.volumes" (dict "dot" . "initRoot" .Values) | nindent 6 }}
37 - name: localtime
38 hostPath:
39 path: /etc/localtime
40 - name: ingress-scripts
41 configMap:
42 name: {{ include "common.fullname" . }}-ingress
43 defaultMode: 0777
44{{- end}}