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 | |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | # Copyright 2019-present Open Networking Foundation |
| 4 | # |
Jeremy Ronquillo | 6046ce3 | 2020-06-18 11:06:29 -0700 | [diff] [blame] | 5 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame] | 6 | |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 7 | */ -}} |
| 8 | |
| 9 | {{ tuple "accelleran-cbrs-ric" . | include "accelleran-cbrs-common.service_account" }} |
| 10 | |
| 11 | --- |
| 12 | apiVersion: apps/v1 |
| 13 | kind: StatefulSet |
| 14 | metadata: |
| 15 | name: accelleran-cbrs-ric |
| 16 | labels: |
| 17 | {{ tuple "accelleran-cbrs-ric" . | include "accelleran-cbrs-common.metadata_labels" | indent 4 }} |
| 18 | spec: |
| 19 | selector: |
| 20 | matchLabels: |
| 21 | {{ tuple "accelleran-cbrs-ric" . | include "accelleran-cbrs-common.metadata_labels" | indent 6 }} |
| 22 | serviceName: accelleran-cbrs-ric |
| 23 | template: |
| 24 | metadata: |
| 25 | labels: |
| 26 | {{ tuple "accelleran-cbrs-ric" . | include "accelleran-cbrs-common.metadata_labels" | indent 8 }} |
| 27 | spec: |
| 28 | {{- if .Values.nodeSelectors.enabled }} |
| 29 | nodeSelector: |
| 30 | {{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }} |
| 31 | {{- end }} |
| 32 | serviceAccountName: accelleran-cbrs-ric |
Hyunsun Moon | 1f868cf | 2021-05-08 18:26:44 -0700 | [diff] [blame] | 33 | {{- if hasKey .Values.images "pullSecrets" }} |
Hyunsun Moon | 8da1788 | 2020-10-14 21:28:44 -0500 | [diff] [blame] | 34 | imagePullSecrets: |
Hyunsun Moon | 1f868cf | 2021-05-08 18:26:44 -0700 | [diff] [blame] | 35 | {{ toYaml .Values.images.pullSecrets | indent 8 }} |
Hyunsun Moon | 8da1788 | 2020-10-14 21:28:44 -0500 | [diff] [blame] | 36 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 37 | initContainers: |
| 38 | - name: redis-init-dep-check |
| 39 | image: {{ .Values.images.tags.depCheck }} |
| 40 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 41 | securityContext: |
| 42 | allowPrivilegeEscalation: false |
| 43 | readOnlyRootFilesystem: false |
| 44 | runAsUser: 0 |
| 45 | env: |
| 46 | - name: POD_NAME |
| 47 | valueFrom: |
| 48 | fieldRef: |
| 49 | apiVersion: v1 |
| 50 | fieldPath: metadata.name |
| 51 | - name: NAMESPACE |
| 52 | valueFrom: |
| 53 | fieldRef: |
| 54 | apiVersion: v1 |
| 55 | fieldPath: metadata.namespace |
| 56 | - name: PATH |
| 57 | value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/ |
| 58 | - name: COMMAND |
| 59 | value: "echo done" |
| 60 | - name: DEPENDENCY_JOBS |
| 61 | value: job-redis-init |
| 62 | containers: |
| 63 | - name: ric |
| 64 | image: {{ .Values.images.tags.ric }} |
| 65 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 66 | securityContext: |
| 67 | privileged: true |
| 68 | capabilities: |
| 69 | add: |
| 70 | - NET_ADMIN |
| 71 | - IPC_LOCK |
| 72 | - SYS_NICE |
| 73 | env: |
| 74 | - name: ZLOG_CONF_PATH |
| 75 | value: /zlog.conf |
| 76 | - name: BOOTSTRAP_FILENAME |
| 77 | value: /bootstrap |
| 78 | - name: LD_LIBRARY_PATH |
| 79 | value: /data/ |
| 80 | - name: FAP_DB_PATH |
| 81 | value: /data/ |
| 82 | command: ["/data/ric"] |
| 83 | {{- if .Values.resources.enabled }} |
| 84 | resources: |
| 85 | {{ toYaml .Values.resources.accelleranCBRSCommon | indent 10 }} |
| 86 | {{- end }} |
| 87 | volumeMounts: |
| 88 | - name: ric-config-volume |
| 89 | mountPath: /bootstrap |
| 90 | subPath: bootstrap |
| 91 | - name: ric-config-volume |
| 92 | mountPath: /zlog.conf |
| 93 | subPath: zlog.conf |
| 94 | volumes: |
| 95 | - name: ric-config-volume |
| 96 | configMap: |
| 97 | name: accelleran-cbrs-ric-cm |