blob: 8b32515a211d1fa6795fda1d0b9beecf8adb590d [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
11{{ tuple "hss" . | include "omec-control-plane.service_account" }}
12---
13apiVersion: apps/v1
14kind: StatefulSet
15metadata:
16 name: hss
17 labels:
18{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
19spec:
20 replicas: 1
21 serviceName: hss-headless
22 selector:
23 matchLabels:
24{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 6 }}
25 template:
26 metadata:
27 labels:
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 serviceAccountName: hss
35 initContainers:
36 - name: hss-dep-check
37 image: {{ .Values.images.tags.depCheck | quote }}
38 imagePullPolicy: {{ .Values.images.pullPolicy }}
39 securityContext:
40 allowPrivilegeEscalation: false
41 readOnlyRootFilesystem: false
42 runAsUser: 0
43 env:
44 - name: NAMESPACE
45 valueFrom:
46 fieldRef:
47 apiVersion: v1
48 fieldPath: metadata.namespace
49 - name: PATH
50 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
51 - name: COMMAND
52 value: "echo done"
53 - name: DEPENDENCY_JOBS
54 {{- if .Values.config.hss.bootstrap }}
55 value: job-hss-db-sync,job-hss-bootstrap
56 {{- else }}
57 value: job-hss-db-sync
58 {{- end }}
59 command:
60 - kubernetes-entrypoint
61 volumeMounts:
62 []
63 {{- if .Values.config.coreDump.enabled }}
64{{ tuple "hss" . | include "omec-control-plane.coredump_init" | indent 6 }}
65 {{- end }}
66 containers:
67 - name: hss
68 image: {{ .Values.images.tags.hss }}
69 imagePullPolicy: {{ .Values.images.pullPolicy }}
70 {{- if .Values.config.coreDump.enabled }}
71 securityContext:
72 privileged: true
73 runAsUser: 0
74 {{- end }}
75 stdin: true
76 tty: true
77 command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"]
78 {{- if .Values.resources.enabled }}
79 resources:
80{{ toYaml .Values.resources.hss | indent 10 }}
81 {{- end }}
82 volumeMounts:
83 - name: hss-script
84 mountPath: /opt/c3po/hss/hss-run.sh
85 subPath: hss-run.sh
86 - name: hss-config
87 mountPath: /etc/hss/conf
88 {{- if .Values.config.coreDump.enabled }}
89 - name: coredump
90 mountPath: /tmp/coredump
91 {{- end }}
92 volumes:
93 - name: hss-script
94 configMap:
95 name: hss
96 defaultMode: 493
97 - name: hss-config
98 configMap:
99 name: hss
100 defaultMode: 420
101 {{- if .Values.config.coreDump.enabled }}
102 - name: host-rootfs
103 hostPath:
104 path: /
105 - name: coredump
106 hostPath:
107 path: {{ .Values.config.coreDump.path }}
108 {{- end }}