blob: a69b4ac892dabb8dbab13519fbe03d1da2367ed0 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2019-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5
6Default values for mcord-vepc-helm.
7This is a YAML-formatted file.
8Declare variables to be passed into your templates.
9*/}}
10
11{{- if .Values.config.hss.deploy }}
12{{ 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 {{- with .Values.config.hss.podAnnotations }}
31 annotations:
32 {{- toYaml . | nindent 8 }}
33 {{- end }}
34 spec:
35 {{- if .Values.nodeSelectors.enabled }}
36 nodeSelector:
37 {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
38 {{- end }}
39 serviceAccountName: hss
40 {{- if hasKey .Values.images "pullSecrets" }}
41 imagePullSecrets:
42{{ toYaml .Values.images.pullSecrets | indent 8 }}
43 {{- end }}
44 initContainers:
45 - name: hss-bootstrap
46 image: {{ .Values.images.tags.hssdb }}
47 imagePullPolicy: {{ .Values.images.pullPolicy }}
48 command: ["/opt/c3po/hss/scripts/hss-bootstrap.sh"]
49 volumeMounts:
50 - name: scripts
51 mountPath: /opt/c3po/hss/scripts
52 {{- if .Values.config.coreDump.enabled }}
53{{ tuple "hss" . | include "omec-control-plane.coredump_init" | indent 6 }}
54 {{- end }}
55 containers:
56 - name: hss
57 image: {{ .Values.images.tags.hss }}
58 imagePullPolicy: {{ .Values.images.pullPolicy }}
59 {{- if .Values.config.coreDump.enabled }}
60 securityContext:
61 privileged: true
62 runAsUser: 0
63 {{- end }}
64 stdin: true
65 tty: true
66 command: ["bash", "-c", "/opt/c3po/hss/scripts/hss-run.sh; sleep 3600"]
67 {{- if .Values.resources.enabled }}
68 resources:
69{{ toYaml .Values.resources.hss | indent 10 }}
70 {{- end }}
71 volumeMounts:
72 - name: scripts
73 mountPath: /opt/c3po/hss/scripts
74 - name: configs
75 mountPath: /etc/hss/conf
76 {{- if .Values.config.coreDump.enabled }}
77 - name: coredump
78 mountPath: /tmp/coredump
79 {{- end }}
80 volumes:
81 - name: scripts
82 configMap:
83 name: hss-scripts
84 defaultMode: 493
85 - name: configs
86 configMap:
87 name: hss-configs
88 defaultMode: 420
89 {{- if .Values.config.coreDump.enabled }}
90 - name: host-rootfs
91 hostPath:
92 path: /
93 - name: coredump
94 hostPath:
95 path: {{ .Values.config.coreDump.path }}
96 {{- end }}
97{{- end }}