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 | [] |
| 73 | containers: |
| 74 | - name: hss |
| 75 | image: {{ .Values.images.tags.hss }} |
| 76 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 77 | stdin: true |
| 78 | tty: true |
| 79 | command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"] |
| 80 | {{- if .Values.resources.enabled }} |
| 81 | resources: |
| 82 | {{ toYaml .Values.resources.hss | indent 10 }} |
| 83 | {{- end }} |
| 84 | volumeMounts: |
| 85 | - name: hss-script |
| 86 | mountPath: /opt/c3po/hss/hss-run.sh |
| 87 | subPath: hss-run.sh |
| 88 | - name: hss-config |
| 89 | mountPath: /etc/hss/conf |
| 90 | volumes: |
| 91 | - name: hss-script |
| 92 | configMap: |
| 93 | name: hss |
| 94 | defaultMode: 493 |
| 95 | - name: hss-config |
| 96 | configMap: |
| 97 | name: hss |
| 98 | defaultMode: 420 |