blob: 432dadb188af31c51d0bbd50409c2e10569ff225 [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
6Default values for mcord-vepc-helm.
7This is a YAML-formatted file.
8Declare variables to be passed into your templates.
9*/}}
10
Hyunsun Moon83ff7352020-07-09 11:03:52 -070011{{- if .Values.config.hss.deploy }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070012{{ tuple "hss" . | include "omec-control-plane.service_account" }}
13---
14apiVersion: apps/v1
15kind: StatefulSet
16metadata:
17 name: hss
18 labels:
19{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
20spec:
21 replicas: 1
22 serviceName: hss-headless
23 selector:
24 matchLabels:
25{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 6 }}
26 template:
27 metadata:
28 labels:
29{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 8 }}
30 spec:
31 {{- if .Values.nodeSelectors.enabled }}
32 nodeSelector:
33 {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
34 {{- end }}
35 serviceAccountName: hss
36 initContainers:
37 - name: hss-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 {{- if .Values.config.hss.bootstrap }}
56 value: job-hss-db-sync,job-hss-bootstrap
57 {{- else }}
58 value: job-hss-db-sync
59 {{- end }}
60 command:
61 - kubernetes-entrypoint
62 volumeMounts:
63 []
64 {{- if .Values.config.coreDump.enabled }}
65{{ tuple "hss" . | include "omec-control-plane.coredump_init" | indent 6 }}
66 {{- end }}
67 containers:
68 - name: hss
69 image: {{ .Values.images.tags.hss }}
70 imagePullPolicy: {{ .Values.images.pullPolicy }}
71 {{- if .Values.config.coreDump.enabled }}
72 securityContext:
73 privileged: true
74 runAsUser: 0
75 {{- end }}
76 stdin: true
77 tty: true
78 command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"]
79 {{- if .Values.resources.enabled }}
80 resources:
81{{ toYaml .Values.resources.hss | indent 10 }}
82 {{- end }}
83 volumeMounts:
84 - name: hss-script
85 mountPath: /opt/c3po/hss/hss-run.sh
86 subPath: hss-run.sh
87 - name: hss-config
88 mountPath: /etc/hss/conf
89 {{- if .Values.config.coreDump.enabled }}
90 - name: coredump
91 mountPath: /tmp/coredump
92 {{- end }}
93 volumes:
94 - name: hss-script
95 configMap:
96 name: hss
97 defaultMode: 493
98 - name: hss-config
99 configMap:
100 name: hss
101 defaultMode: 420
102 {{- if .Values.config.coreDump.enabled }}
103 - name: host-rootfs
104 hostPath:
105 path: /
106 - name: coredump
107 hostPath:
108 path: {{ .Values.config.coreDump.path }}
109 {{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -0700110{{- end }}