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