blob: 1efc9c6dd5b53ea6504467e8ec23f4c8ed1cdba7 [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---
10apiVersion: apps/v1
11kind: StatefulSet
12metadata:
13 name: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}
14 labels:
15 deployedCellId: {{ .Values.config.vranL3.instanceId }}
16{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 4 }}
17spec:
18 selector:
19 matchLabels:
20{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 6 }}
21 serviceName: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}
22 template:
23 metadata:
24 labels:
25 deployedCellId: {{ .Values.config.vranL3.instanceId }}
26{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 8 }}
27 spec:
28 {{- if .Values.nodeSelectors.enabled }}
29 nodeSelector:
30 {{ .Values.nodeSelectors.accelleranCBRSCU.label }}: {{ .Values.nodeSelectors.accelleranCBRSCU.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: cu-init
38 image: {{ .Values.images.tags.initCU }}
39 imagePullPolicy: {{ .Values.images.pullPolicy }}
40 securityContext:
41 privileged: true
42 runAsUser: 0
43 command: [ "sh", "-c"]
44 args:
45 - >
46 iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP;
47 if chroot /mnt/host-rootfs modinfo nf_conntrack_proto_sctp > /dev/null 2>&1; then \
48 chroot /mnt/host-rootfs modprobe nf_conntrack_proto_sctp; \
49 fi; \
50 volumeMounts:
51 - name: host-rootfs
52 mountPath: /mnt/host-rootfs
53 containers:
54 - name: vran-l3
55 image: {{ .Values.images.tags.vranL3 }}
56 imagePullPolicy: {{ .Values.images.pullPolicy }}
57 env:
58 - name: ZLOG_CONF_PATH
59 value: /zlog.conf
60 - name: BOOTSTRAP_FILENAME
61 value: /bootstrap
62 - name: LD_LIBRARY_PATH
63 value: /data/
64 - name: FAP_DB_PATH
65 value: /data/
66 command: ["sh", "-c"]
67 args:
68 - sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteEpcPlmnList set PLMNID='{{ .Values.config.vranL3.plmnId }}';";
69 sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway set SecGWServer1='{{ .Values.config.mme.ip }}';";
70 sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway set SecGWServer2='{{ .Values.config.mme.ip }}';";
71 sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway set SecGWServer3='{{ .Values.config.mme.ip }}';";
Hyunsun Moonae3198f2020-07-09 11:05:11 -070072 sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway set S1SigLinkPort='{{ .Values.config.mme.s1apPort }}';";
Jeremy Ronquillo223db002020-06-05 10:28:22 -070073 sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway_S1SigLinkServerListList set S1SigLinkServerList='{{ .Values.config.mme.ip }}';";
74 sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteRanRf set FreqBandIndicator='{{ .Values.config.vranL3.freqBand }}';";
75 sqlite3 /data/datastore.db "update featureActivation set good1PPSRequired=0;";
76 sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteRanRf_EARFCNDLList set EARFCNDL='{{ .Values.config.vranL3.earfcnDl }}';";
77 sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteRanRf_EARFCNULList set EARFCNUL='{{ .Values.config.vranL3.earfcnUl }}';";
78 sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteEpc set TAC='{{ .Values.config.vranL3.tac }}';";
79 sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteRanCommon set CellIdentity='{{ mul .Values.config.vranL3.enbId 256 }}';";
80 sqlite3 /data/datastoreRemRw.db "select * from FapServiceCellConfigLteEpc;";
81 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAYS1SIGLINKSERVERLIST[0] S1SIGLINKSERVERLIST {{ .Values.config.mme.ip }};
82 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAY_S1SIGLINKSERVERLISTLIST[0] S1SIGLINKSERVERLIST {{ .Values.config.mme.ip }};
83 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF FREQBANDINDICATOR {{ .Values.config.vranL3.freqBand }};
84 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FEATUREACTIVATION GOOD1PPSREQUIRED False;
85 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTEEPCPLMNLIST[0] PLMNID {{ .Values.config.vranL3.plmnId }};
86 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNDLLIST EARFCNDL {{ .Values.config.vranL3.earfcnDl }};
87 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNULLIST EARFCNUL {{ .Values.config.vranL3.earfcnUl }};
88 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTEEPC TAC {{ .Values.config.vranL3.tac }};
89 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANCOMMON TAC {{ mul .Values.config.vranL3.enbId 256 }};
90 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAYS1SIGLINKSERVERLIST[0];
91 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAY_S1SIGLINKSERVERLISTLIST[0];
92 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF;
93 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FEATUREACTIVATION;
94 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTEEPCPLMNLIST[0];
95 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNDLLIST;
96 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNULLIST;
97 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTEEPC;
98 redis-cli -h {{ .Values.config.redis.hostName }} -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANCOMMON;
99 sleep 30;
100 /data/l3service;
101 securityContext:
102 privileged: true
103 {{- if .Values.resources.enabled }}
104 resources:
105{{ toYaml .Values.resources.accelleranCBRSCU | indent 10 }}
106 {{- end }}
107 volumeMounts:
108 - name: l3-config-volume
109 mountPath: /bootstrap
110 subPath: bootstrap
111 - name: l3-config-volume
112 mountPath: /zlog.conf
113 subPath: zlog.conf
114 volumes:
115 - name: l3-config-volume
116 configMap:
117 name: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}-cm
118 - name: host-rootfs
119 hostPath:
120 path: /