blob: cedd809f6bc82401c2b15b10209171d11e547294 [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:
Hyunsun Moond60f50c2020-10-06 15:09:01 -050041 - name: hss-bootstrap
42 image: {{ .Values.images.tags.hssdb }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070043 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moond60f50c2020-10-06 15:09:01 -050044 command: ["/opt/c3po/hss/hss-bootstrap.sh"]
Jeremy Ronquillo223db002020-06-05 10:28:22 -070045 volumeMounts:
Hyunsun Moond60f50c2020-10-06 15:09:01 -050046 - name: hss-script
47 mountPath: /opt/c3po/hss/hss-bootstrap.sh
48 subPath: hss-bootstrap.sh
Jeremy Ronquillo223db002020-06-05 10:28:22 -070049 {{- if .Values.config.coreDump.enabled }}
50{{ tuple "hss" . | include "omec-control-plane.coredump_init" | indent 6 }}
51 {{- end }}
52 containers:
53 - name: hss
54 image: {{ .Values.images.tags.hss }}
55 imagePullPolicy: {{ .Values.images.pullPolicy }}
56 {{- if .Values.config.coreDump.enabled }}
57 securityContext:
58 privileged: true
59 runAsUser: 0
60 {{- end }}
61 stdin: true
62 tty: true
63 command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"]
64 {{- if .Values.resources.enabled }}
65 resources:
66{{ toYaml .Values.resources.hss | indent 10 }}
67 {{- end }}
68 volumeMounts:
69 - name: hss-script
70 mountPath: /opt/c3po/hss/hss-run.sh
71 subPath: hss-run.sh
72 - name: hss-config
73 mountPath: /etc/hss/conf
74 {{- if .Values.config.coreDump.enabled }}
75 - name: coredump
76 mountPath: /tmp/coredump
77 {{- end }}
78 volumes:
79 - name: hss-script
80 configMap:
81 name: hss
82 defaultMode: 493
83 - name: hss-config
84 configMap:
85 name: hss
86 defaultMode: 420
87 {{- if .Values.config.coreDump.enabled }}
88 - name: host-rootfs
89 hostPath:
90 path: /
91 - name: coredump
92 hostPath:
93 path: {{ .Values.config.coreDump.path }}
94 {{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -070095{{- end }}