blob: 3feee66b982019b225f0081a1220f79c5745466e [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2019-present Open Networking Foundation
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07004# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquillo223db002020-06-05 10:28:22 -07005*/}}
6
7{{- if .Values.config.hss.bootstrap }}
8---
9apiVersion: batch/v1
10kind: Job
11metadata:
12 name: job-hss-bootstrap
13 labels:
14{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
15spec:
16 template:
17 metadata:
18{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 8 }}
19 spec:
20 {{- if .Values.nodeSelectors.enabled }}
21 nodeSelector:
22 {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
23 {{- end }}
24 restartPolicy: OnFailure
25 serviceAccountName: hss
26 initContainers:
27 - name: job-bootstrap-dep-check
28 image: {{ .Values.images.tags.depCheck | quote }}
29 imagePullPolicy: {{ .Values.images.pullPolicy }}
30 securityContext:
31 allowPrivilegeEscalation: false
32 readOnlyRootFilesystem: false
33 runAsUser: 0
34 env:
35 - name: NAMESPACE
36 valueFrom:
37 fieldRef:
38 apiVersion: v1
39 fieldPath: metadata.namespace
40 - name: PATH
41 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
42 - name: COMMAND
43 value: "echo done"
44 - name: DEPENDENCY_JOBS
45 value: job-hss-db-sync
46 command:
47 - kubernetes-entrypoint
48 volumeMounts:
49 []
50 containers:
51 - name: hss-bootstrap
52 image: {{ .Values.images.tags.hssdb }}
53 imagePullPolicy: {{ .Values.images.pullPolicy }}
54 command: ["/opt/c3po/hss/hss-bootstrap.sh"]
55 volumeMounts:
56 - name: hss-script
57 mountPath: /opt/c3po/hss/hss-bootstrap.sh
58 subPath: hss-bootstrap.sh
59 volumes:
60 - name: hss-script
61 configMap:
62 name: hss
63 defaultMode: 493
64{{- end }}