blob: 709274d3f0ab68b9e8212906f23c035c4fa361e9 [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 }}
Andy Bavierba196552020-09-17 13:58:04 -070030 {{- with .Values.config.hss.podAnnotations }}
31 annotations:
32 {{- toYaml . | nindent 8 }}
33 {{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070034 spec:
35 {{- if .Values.nodeSelectors.enabled }}
36 nodeSelector:
37 {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
38 {{- end }}
39 serviceAccountName: hss
40 initContainers:
41 - name: hss-dep-check
42 image: {{ .Values.images.tags.depCheck | quote }}
43 imagePullPolicy: {{ .Values.images.pullPolicy }}
44 securityContext:
45 allowPrivilegeEscalation: false
46 readOnlyRootFilesystem: false
47 runAsUser: 0
48 env:
49 - name: NAMESPACE
50 valueFrom:
51 fieldRef:
52 apiVersion: v1
53 fieldPath: metadata.namespace
54 - name: PATH
55 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
56 - name: COMMAND
57 value: "echo done"
58 - name: DEPENDENCY_JOBS
59 {{- if .Values.config.hss.bootstrap }}
60 value: job-hss-db-sync,job-hss-bootstrap
61 {{- else }}
62 value: job-hss-db-sync
63 {{- end }}
64 command:
65 - kubernetes-entrypoint
66 volumeMounts:
67 []
68 {{- if .Values.config.coreDump.enabled }}
69{{ tuple "hss" . | include "omec-control-plane.coredump_init" | indent 6 }}
70 {{- end }}
71 containers:
72 - name: hss
73 image: {{ .Values.images.tags.hss }}
74 imagePullPolicy: {{ .Values.images.pullPolicy }}
75 {{- if .Values.config.coreDump.enabled }}
76 securityContext:
77 privileged: true
78 runAsUser: 0
79 {{- end }}
80 stdin: true
81 tty: true
82 command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"]
83 {{- if .Values.resources.enabled }}
84 resources:
85{{ toYaml .Values.resources.hss | indent 10 }}
86 {{- end }}
87 volumeMounts:
88 - name: hss-script
89 mountPath: /opt/c3po/hss/hss-run.sh
90 subPath: hss-run.sh
91 - name: hss-config
92 mountPath: /etc/hss/conf
93 {{- if .Values.config.coreDump.enabled }}
94 - name: coredump
95 mountPath: /tmp/coredump
96 {{- end }}
97 volumes:
98 - name: hss-script
99 configMap:
100 name: hss
101 defaultMode: 493
102 - name: hss-config
103 configMap:
104 name: hss
105 defaultMode: 420
106 {{- if .Values.config.coreDump.enabled }}
107 - name: host-rootfs
108 hostPath:
109 path: /
110 - name: coredump
111 hostPath:
112 path: {{ .Values.config.coreDump.path }}
113 {{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -0700114{{- end }}