blob: 44dfabd755841a41fadf981d973a80b87d555102 [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{- /*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003# Copyright 2019-present Open Networking Foundation
4#
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07005# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07006
Jeremy Ronquillo223db002020-06-05 10:28:22 -07007*/ -}}
8
9{{ tuple "accelleran-cbrs-ric" . | include "accelleran-cbrs-common.service_account" }}
10
11---
12apiVersion: apps/v1
13kind: StatefulSet
14metadata:
15 name: accelleran-cbrs-ric
16 labels:
17{{ tuple "accelleran-cbrs-ric" . | include "accelleran-cbrs-common.metadata_labels" | indent 4 }}
18spec:
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 Moon1f868cf2021-05-08 18:26:44 -070033 {{- if hasKey .Values.images "pullSecrets" }}
Hyunsun Moon8da17882020-10-14 21:28:44 -050034 imagePullSecrets:
Hyunsun Moon1f868cf2021-05-08 18:26:44 -070035{{ toYaml .Values.images.pullSecrets | indent 8 }}
Hyunsun Moon8da17882020-10-14 21:28:44 -050036 {{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070037 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