blob: dc461b8c14a2aefd461feaea7ef36b21fc14a351 [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
16Default values for mcord-vepc-helm.
17This is a YAML-formatted file.
18Declare variables to be passed into your templates.
19*/}}
20
21{{ tuple "hss" . | include "omec-control-plane.service_account" }}
22---
23apiVersion: apps/v1
24kind: StatefulSet
25metadata:
26 name: hss
27 labels:
28{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
29spec:
30 replicas: 1
Hyunsun Moon834c28f2019-12-05 18:26:22 -080031 serviceName: hss-headless
Hyunsun Mooned24cac2019-08-26 20:52:20 -050032 selector:
33 matchLabels:
34{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 6 }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050035 template:
36 metadata:
37 labels:
38{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 8 }}
39 spec:
40 {{- if .Values.nodeSelectors.enabled }}
41 nodeSelector:
42 {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
43 {{- end }}
44 serviceAccountName: hss
45 initContainers:
46 - name: hss-dep-check
47 image: {{ .Values.images.tags.depCheck | quote }}
48 imagePullPolicy: {{ .Values.images.pullPolicy }}
49 securityContext:
50 allowPrivilegeEscalation: false
51 readOnlyRootFilesystem: false
52 runAsUser: 0
53 env:
54 - name: NAMESPACE
55 valueFrom:
56 fieldRef:
57 apiVersion: v1
58 fieldPath: metadata.namespace
59 - name: PATH
60 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
61 - name: COMMAND
62 value: "echo done"
63 - name: DEPENDENCY_JOBS
64 {{- if .Values.config.hss.bootstrap }}
65 value: job-hss-db-sync,job-hss-bootstrap
66 {{- else }}
67 value: job-hss-db-sync
68 {{- end }}
69 command:
70 - kubernetes-entrypoint
71 volumeMounts:
72 []
Hyunsun Moonec0b44d2020-01-10 15:50:53 -070073 {{- if .Values.config.coreDump.enabled }}
74{{ tuple "hss" . | include "omec-control-plane.coredump_init" | indent 6 }}
75 {{- end }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050076 containers:
77 - name: hss
78 image: {{ .Values.images.tags.hss }}
79 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moonec0b44d2020-01-10 15:50:53 -070080 {{- if .Values.config.coreDump.enabled }}
81 securityContext:
82 privileged: true
83 runAsUser: 0
84 {{- end }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050085 stdin: true
86 tty: true
87 command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"]
88 {{- if .Values.resources.enabled }}
89 resources:
90{{ toYaml .Values.resources.hss | indent 10 }}
91 {{- end }}
92 volumeMounts:
93 - name: hss-script
94 mountPath: /opt/c3po/hss/hss-run.sh
95 subPath: hss-run.sh
96 - name: hss-config
97 mountPath: /etc/hss/conf
Hyunsun Moonec0b44d2020-01-10 15:50:53 -070098 {{- if .Values.config.coreDump.enabled }}
99 - name: coredump
100 mountPath: /tmp/coredump
101 {{- end }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -0500102 volumes:
103 - name: hss-script
104 configMap:
105 name: hss
106 defaultMode: 493
107 - name: hss-config
108 configMap:
109 name: hss
110 defaultMode: 420
Hyunsun Moonec0b44d2020-01-10 15:50:53 -0700111 {{- if .Values.config.coreDump.enabled }}
112 - name: host-rootfs
113 hostPath:
114 path: /
115 - name: coredump
116 hostPath:
117 path: {{ .Values.config.coreDump.path }}
118 {{- end }}