blob: 93c872116736148224002dd19d4f29cd8097a1d3 [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 []
73 containers:
74 - name: hss
75 image: {{ .Values.images.tags.hss }}
76 imagePullPolicy: {{ .Values.images.pullPolicy }}
77 stdin: true
78 tty: true
79 command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"]
80 {{- if .Values.resources.enabled }}
81 resources:
82{{ toYaml .Values.resources.hss | indent 10 }}
83 {{- end }}
84 volumeMounts:
85 - name: hss-script
86 mountPath: /opt/c3po/hss/hss-run.sh
87 subPath: hss-run.sh
88 - name: hss-config
89 mountPath: /etc/hss/conf
90 volumes:
91 - name: hss-script
92 configMap:
93 name: hss
94 defaultMode: 493
95 - name: hss-config
96 configMap:
97 name: hss
98 defaultMode: 420