blob: 28cb015c94f4a0afc4ef071b16d64e11070b276c [file] [log] [blame]
Woojoong Kim4feaddf2019-11-21 00:05:07 -08001{{- /*
2# Copyright 2019-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/ -}}
16
17{{ tuple "accelleran-cbrs-ricweb" . | include "accelleran-cbrs-common.service_account" }}
18---
19apiVersion: apps/v1
20kind: StatefulSet
21metadata:
22 name: accelleran-cbrs-ricweb
23 labels:
24{{ tuple "accelleran-cbrs-ricweb" . | include "accelleran-cbrs-common.metadata_labels" | indent 4 }}
25spec:
26 selector:
27 matchLabels:
28{{ tuple "accelleran-cbrs-ricweb" . | include "accelleran-cbrs-common.metadata_labels" | indent 6 }}
29 serviceName: accelleran-cbrs-ricweb
30 template:
31 metadata:
32 labels:
33{{ tuple "accelleran-cbrs-ricweb" . | include "accelleran-cbrs-common.metadata_labels" | indent 8 }}
34 spec:
35 serviceAccountName: accelleran-cbrs-ricweb
36 {{- if .Values.nodeSelectors.enabled }}
37 nodeSelector:
38 {{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
39 {{- end }}
40 initContainers:
41 - name: accelleran-cbrs-ric-dep-check
42 image: {{ .Values.images.tags.depCheck | quote }}
43 imagePullPolicy: {{ .Values.images.pullPolicy }}
44 securityContext:
45 allowPrivilegeEscalation: false
46 readOnlyRootFilesystem: false
47 runAsUser: 0
48 env:
49 - name: POD_NAME
50 valueFrom:
51 fieldRef:
52 apiVersion: v1
53 fieldPath: metadata.name
54 - name: NAMESPACE
55 valueFrom:
56 fieldRef:
57 apiVersion: v1
58 fieldPath: metadata.namespace
59 - name: PATH
60 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
61 - name: COMMAND
62 value: "echo done"
63 - name: DEPENDENCY_POD_JSON
64 value: '[{"labels": {"app": "accelleran-cbrs-ric"}, "requireSameNode": false}]'
65
66 containers:
67 - name: ric-web
68 image: {{ .Values.images.tags.ricWeb }}
69 imagePullPolicy: {{ .Values.images.pullPolicy }}
70 env:
71 - name: NATS_URL
72 value: {{ .Values.config.nats.url | quote }}