blob: 385549511ca5009559893f9746a9fb46ac63f9c6 [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
Hyunsun Moon55535832020-07-22 18:55:24 -07007{{- if .Values.config.hss.deploy }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -07008{{- if .Values.config.hss.bootstrap }}
9---
10apiVersion: batch/v1
11kind: Job
12metadata:
13 name: job-hss-bootstrap
14 labels:
15{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
16spec:
17 template:
18 metadata:
19{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 8 }}
20 spec:
21 {{- if .Values.nodeSelectors.enabled }}
22 nodeSelector:
23 {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
24 {{- end }}
25 restartPolicy: OnFailure
26 serviceAccountName: hss
27 initContainers:
28 - name: job-bootstrap-dep-check
29 image: {{ .Values.images.tags.depCheck | quote }}
30 imagePullPolicy: {{ .Values.images.pullPolicy }}
31 securityContext:
32 allowPrivilegeEscalation: false
33 readOnlyRootFilesystem: false
34 runAsUser: 0
35 env:
36 - name: NAMESPACE
37 valueFrom:
38 fieldRef:
39 apiVersion: v1
40 fieldPath: metadata.namespace
41 - name: PATH
42 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
43 - name: COMMAND
44 value: "echo done"
45 - name: DEPENDENCY_JOBS
46 value: job-hss-db-sync
47 command:
48 - kubernetes-entrypoint
49 volumeMounts:
50 []
51 containers:
52 - name: hss-bootstrap
53 image: {{ .Values.images.tags.hssdb }}
54 imagePullPolicy: {{ .Values.images.pullPolicy }}
55 command: ["/opt/c3po/hss/hss-bootstrap.sh"]
56 volumeMounts:
57 - name: hss-script
58 mountPath: /opt/c3po/hss/hss-bootstrap.sh
59 subPath: hss-bootstrap.sh
60 volumes:
61 - name: hss-script
62 configMap:
63 name: hss
64 defaultMode: 493
65{{- end }}
Hyunsun Moon55535832020-07-22 18:55:24 -070066{{- end }}