blob: 3c92ad12d8328d2a124d70b21a56455b4bd1ed9d [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
33 initContainers:
34 - name: redis-init-dep-check
35 image: {{ .Values.images.tags.depCheck }}
36 imagePullPolicy: {{ .Values.images.pullPolicy }}
37 securityContext:
38 allowPrivilegeEscalation: false
39 readOnlyRootFilesystem: false
40 runAsUser: 0
41 env:
42 - name: POD_NAME
43 valueFrom:
44 fieldRef:
45 apiVersion: v1
46 fieldPath: metadata.name
47 - name: NAMESPACE
48 valueFrom:
49 fieldRef:
50 apiVersion: v1
51 fieldPath: metadata.namespace
52 - name: PATH
53 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
54 - name: COMMAND
55 value: "echo done"
56 - name: DEPENDENCY_JOBS
57 value: job-redis-init
58 containers:
59 - name: ric
60 image: {{ .Values.images.tags.ric }}
61 imagePullPolicy: {{ .Values.images.pullPolicy }}
62 securityContext:
63 privileged: true
64 capabilities:
65 add:
66 - NET_ADMIN
67 - IPC_LOCK
68 - SYS_NICE
69 env:
70 - name: ZLOG_CONF_PATH
71 value: /zlog.conf
72 - name: BOOTSTRAP_FILENAME
73 value: /bootstrap
74 - name: LD_LIBRARY_PATH
75 value: /data/
76 - name: FAP_DB_PATH
77 value: /data/
78 command: ["/data/ric"]
79 {{- if .Values.resources.enabled }}
80 resources:
81{{ toYaml .Values.resources.accelleranCBRSCommon | indent 10 }}
82 {{- end }}
83 volumeMounts:
84 - name: ric-config-volume
85 mountPath: /bootstrap
86 subPath: bootstrap
87 - name: ric-config-volume
88 mountPath: /zlog.conf
89 subPath: zlog.conf
90 volumes:
91 - name: ric-config-volume
92 configMap:
93 name: accelleran-cbrs-ric-cm