Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | Copyright 2019-present Open Networking Foundation |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Default values for mcord-vepc-helm. |
| 17 | This is a YAML-formatted file. |
| 18 | Declare variables to be passed into your templates. |
| 19 | */}} |
| 20 | |
| 21 | {{ tuple "hss" . | include "omec-control-plane.service_account" }} |
| 22 | --- |
| 23 | apiVersion: apps/v1 |
| 24 | kind: StatefulSet |
| 25 | metadata: |
| 26 | name: hss |
| 27 | labels: |
| 28 | {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 29 | spec: |
| 30 | replicas: 1 |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 31 | serviceName: hss-headless |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 32 | selector: |
| 33 | matchLabels: |
| 34 | {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 6 }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 35 | 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 | [] |
Hyunsun Moon | ec0b44d | 2020-01-10 15:50:53 -0700 | [diff] [blame] | 73 | {{- if .Values.config.coreDump.enabled }} |
| 74 | {{ tuple "hss" . | include "omec-control-plane.coredump_init" | indent 6 }} |
| 75 | {{- end }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 76 | containers: |
| 77 | - name: hss |
| 78 | image: {{ .Values.images.tags.hss }} |
| 79 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | ec0b44d | 2020-01-10 15:50:53 -0700 | [diff] [blame] | 80 | {{- if .Values.config.coreDump.enabled }} |
| 81 | securityContext: |
| 82 | privileged: true |
| 83 | runAsUser: 0 |
| 84 | {{- end }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 85 | stdin: true |
| 86 | tty: true |
| 87 | command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"] |
| 88 | {{- if .Values.resources.enabled }} |
| 89 | resources: |
| 90 | {{ toYaml .Values.resources.hss | indent 10 }} |
| 91 | {{- end }} |
| 92 | volumeMounts: |
| 93 | - name: hss-script |
| 94 | mountPath: /opt/c3po/hss/hss-run.sh |
| 95 | subPath: hss-run.sh |
| 96 | - name: hss-config |
| 97 | mountPath: /etc/hss/conf |
Hyunsun Moon | ec0b44d | 2020-01-10 15:50:53 -0700 | [diff] [blame] | 98 | {{- if .Values.config.coreDump.enabled }} |
| 99 | - name: coredump |
| 100 | mountPath: /tmp/coredump |
| 101 | {{- end }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 102 | volumes: |
| 103 | - name: hss-script |
| 104 | configMap: |
| 105 | name: hss |
| 106 | defaultMode: 493 |
| 107 | - name: hss-config |
| 108 | configMap: |
| 109 | name: hss |
| 110 | defaultMode: 420 |
Hyunsun Moon | ec0b44d | 2020-01-10 15:50:53 -0700 | [diff] [blame] | 111 | {{- if .Values.config.coreDump.enabled }} |
| 112 | - name: host-rootfs |
| 113 | hostPath: |
| 114 | path: / |
| 115 | - name: coredump |
| 116 | hostPath: |
| 117 | path: {{ .Values.config.coreDump.path }} |
| 118 | {{- end }} |