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