blob: 03ac80d2192783e68296d7a6c5879d831116a32d [file] [log] [blame]
Hyunsun Mooned24cac2019-08-26 20:52:20 -05001{{/*
2Copyright 2019-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/}}
16
17{{- if .Values.config.hss.bootstrap }}
18---
19apiVersion: batch/v1
20kind: Job
21metadata:
22 name: job-hss-bootstrap
23 labels:
24{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
25spec:
26 template:
27 metadata:
28{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 8 }}
29 spec:
30 {{- if .Values.nodeSelectors.enabled }}
31 nodeSelector:
32 {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
33 {{- end }}
34 restartPolicy: OnFailure
35 serviceAccountName: hss
36 initContainers:
37 - name: job-bootstrap-dep-check
38 image: {{ .Values.images.tags.depCheck | quote }}
39 imagePullPolicy: {{ .Values.images.pullPolicy }}
40 securityContext:
41 allowPrivilegeEscalation: false
42 readOnlyRootFilesystem: false
43 runAsUser: 0
44 env:
45 - name: NAMESPACE
46 valueFrom:
47 fieldRef:
48 apiVersion: v1
49 fieldPath: metadata.namespace
50 - name: PATH
51 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
52 - name: COMMAND
53 value: "echo done"
54 - name: DEPENDENCY_JOBS
55 value: job-hss-db-sync
56 command:
57 - kubernetes-entrypoint
58 volumeMounts:
59 []
60 containers:
61 - name: hss-bootstrap
62 image: {{ .Values.images.tags.hssdb }}
63 imagePullPolicy: {{ .Values.images.pullPolicy }}
64 command: ["/opt/c3po/hss/hss-bootstrap.sh"]
65 volumeMounts:
66 - name: hss-script
67 mountPath: /opt/c3po/hss/hss-bootstrap.sh
68 subPath: hss-bootstrap.sh
69 volumes:
70 - name: hss-script
71 configMap:
72 name: hss
73 defaultMode: 493
74{{- end }}