Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | {{/* |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame] | 2 | # Copyright 2019-present Open Networking Foundation |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | |
Jeremy Ronquillo | 6046ce3 | 2020-06-18 11:06:29 -0700 | [diff] [blame] | 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 5 | |
| 6 | Default values for mcord-vepc-helm. |
| 7 | This is a YAML-formatted file. |
| 8 | Declare variables to be passed into your templates. |
| 9 | */}} |
| 10 | |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 11 | {{- if .Values.config.hss.deploy }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 12 | {{ tuple "hss" . | include "omec-control-plane.service_account" }} |
| 13 | --- |
| 14 | apiVersion: apps/v1 |
| 15 | kind: StatefulSet |
| 16 | metadata: |
| 17 | name: hss |
| 18 | labels: |
| 19 | {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 20 | spec: |
| 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 Bavier | ba19655 | 2020-09-17 13:58:04 -0700 | [diff] [blame] | 30 | {{- with .Values.config.hss.podAnnotations }} |
| 31 | annotations: |
| 32 | {{- toYaml . | nindent 8 }} |
| 33 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 34 | spec: |
| 35 | {{- if .Values.nodeSelectors.enabled }} |
| 36 | nodeSelector: |
| 37 | {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }} |
| 38 | {{- end }} |
| 39 | serviceAccountName: hss |
Hyunsun Moon | d9a09e8 | 2021-03-17 12:16:53 -0700 | [diff] [blame] | 40 | {{- if hasKey .Values.images "pullSecrets" }} |
Hyunsun Moon | 8da1788 | 2020-10-14 21:28:44 -0500 | [diff] [blame] | 41 | imagePullSecrets: |
Hyunsun Moon | d9a09e8 | 2021-03-17 12:16:53 -0700 | [diff] [blame] | 42 | {{ toYaml .Values.images.pullSecrets | indent 8 }} |
Hyunsun Moon | 8da1788 | 2020-10-14 21:28:44 -0500 | [diff] [blame] | 43 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 44 | initContainers: |
Hyunsun Moon | d60f50c | 2020-10-06 15:09:01 -0500 | [diff] [blame] | 45 | - name: hss-bootstrap |
| 46 | image: {{ .Values.images.tags.hssdb }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 47 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 48 | command: ["/opt/c3po/hss/scripts/hss-bootstrap.sh"] |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 49 | volumeMounts: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 50 | - name: scripts |
| 51 | mountPath: /opt/c3po/hss/scripts |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 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 |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 66 | command: ["bash", "-c", "/opt/c3po/hss/scripts/hss-run.sh; sleep 3600"] |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 67 | {{- if .Values.resources.enabled }} |
| 68 | resources: |
| 69 | {{ toYaml .Values.resources.hss | indent 10 }} |
| 70 | {{- end }} |
| 71 | volumeMounts: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 72 | - name: scripts |
| 73 | mountPath: /opt/c3po/hss/scripts |
| 74 | - name: configs |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 75 | mountPath: /etc/hss/conf |
| 76 | {{- if .Values.config.coreDump.enabled }} |
| 77 | - name: coredump |
| 78 | mountPath: /tmp/coredump |
| 79 | {{- end }} |
| 80 | volumes: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 81 | - name: scripts |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 82 | configMap: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 83 | name: hss-scripts |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 84 | defaultMode: 493 |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 85 | - name: configs |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 86 | configMap: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 87 | name: hss-configs |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 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 }} |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 97 | {{- end }} |