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 |
| 31 | selector: |
| 32 | matchLabels: |
| 33 | {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 6 }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 34 | template: |
| 35 | metadata: |
| 36 | labels: |
| 37 | {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 8 }} |
| 38 | spec: |
| 39 | {{- if .Values.nodeSelectors.enabled }} |
| 40 | nodeSelector: |
| 41 | {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }} |
| 42 | {{- end }} |
| 43 | serviceAccountName: hss |
| 44 | initContainers: |
| 45 | - name: hss-dep-check |
| 46 | image: {{ .Values.images.tags.depCheck | quote }} |
| 47 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 48 | securityContext: |
| 49 | allowPrivilegeEscalation: false |
| 50 | readOnlyRootFilesystem: false |
| 51 | runAsUser: 0 |
| 52 | env: |
| 53 | - name: NAMESPACE |
| 54 | valueFrom: |
| 55 | fieldRef: |
| 56 | apiVersion: v1 |
| 57 | fieldPath: metadata.namespace |
| 58 | - name: PATH |
| 59 | value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/ |
| 60 | - name: COMMAND |
| 61 | value: "echo done" |
| 62 | - name: DEPENDENCY_JOBS |
| 63 | {{- if .Values.config.hss.bootstrap }} |
| 64 | value: job-hss-db-sync,job-hss-bootstrap |
| 65 | {{- else }} |
| 66 | value: job-hss-db-sync |
| 67 | {{- end }} |
| 68 | command: |
| 69 | - kubernetes-entrypoint |
| 70 | volumeMounts: |
| 71 | [] |
| 72 | containers: |
| 73 | - name: hss |
| 74 | image: {{ .Values.images.tags.hss }} |
| 75 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 76 | stdin: true |
| 77 | tty: true |
| 78 | command: ["bash", "-c", "/opt/c3po/hss/hss-run.sh; sleep 3600"] |
| 79 | {{- if .Values.resources.enabled }} |
| 80 | resources: |
| 81 | {{ toYaml .Values.resources.hss | indent 10 }} |
| 82 | {{- end }} |
| 83 | volumeMounts: |
| 84 | - name: hss-script |
| 85 | mountPath: /opt/c3po/hss/hss-run.sh |
| 86 | subPath: hss-run.sh |
| 87 | - name: hss-config |
| 88 | mountPath: /etc/hss/conf |
| 89 | volumes: |
| 90 | - name: hss-script |
| 91 | configMap: |
| 92 | name: hss |
| 93 | defaultMode: 493 |
| 94 | - name: hss-config |
| 95 | configMap: |
| 96 | name: hss |
| 97 | defaultMode: 420 |