blob: 7b3248b7165ffc44f2b9f9655a220c4b671e0283 [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-ricweb" . | include "accelleran-cbrs-common.service_account" }}
10---
11apiVersion: apps/v1
12kind: StatefulSet
13metadata:
14 name: accelleran-cbrs-ricweb
15 labels:
16{{ tuple "accelleran-cbrs-ricweb" . | include "accelleran-cbrs-common.metadata_labels" | indent 4 }}
17spec:
18 selector:
19 matchLabels:
20{{ tuple "accelleran-cbrs-ricweb" . | include "accelleran-cbrs-common.metadata_labels" | indent 6 }}
21 serviceName: accelleran-cbrs-ricweb
22 template:
23 metadata:
24 labels:
25{{ tuple "accelleran-cbrs-ricweb" . | include "accelleran-cbrs-common.metadata_labels" | indent 8 }}
26 spec:
27 serviceAccountName: accelleran-cbrs-ricweb
28 {{- if .Values.nodeSelectors.enabled }}
29 nodeSelector:
30 {{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
31 {{- end }}
Hyunsun Moon1f868cf2021-05-08 18:26:44 -070032 {{- if hasKey .Values.images "pullSecrets" }}
Hyunsun Moon8da17882020-10-14 21:28:44 -050033 imagePullSecrets:
Hyunsun Moon1f868cf2021-05-08 18:26:44 -070034{{ toYaml .Values.images.pullSecrets | indent 8 }}
Hyunsun Moon8da17882020-10-14 21:28:44 -050035 {{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070036 initContainers:
37 - name: accelleran-cbrs-ric-dep-check
38 image: {{ .Values.images.tags.depCheck | quote }}
39 imagePullPolicy: {{ .Values.images.pullPolicy }}
40 securityContext:
41 allowPrivilegeEscalation: false
42 readOnlyRootFilesystem: false
43 runAsUser: 0
44 env:
45 - name: POD_NAME
46 valueFrom:
47 fieldRef:
48 apiVersion: v1
49 fieldPath: metadata.name
50 - name: NAMESPACE
51 valueFrom:
52 fieldRef:
53 apiVersion: v1
54 fieldPath: metadata.namespace
55 - name: PATH
56 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
57 - name: COMMAND
58 value: "echo done"
59 - name: DEPENDENCY_POD_JSON
60 value: '[{"labels": {"app": "accelleran-cbrs-ric"}, "requireSameNode": false}]'
61
62 containers:
63 - name: ric-web
64 image: {{ .Values.images.tags.ricWeb }}
65 imagePullPolicy: {{ .Values.images.pullPolicy }}
66 env:
67 - name: NATS_URL
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -070068 value: {{ .Values.config.nats.url | quote }}