COMAC-171,COMAC-172,COMAC-173 Restructure mcord-release charts
Done
- Rename mcord-services to omec
- Split mcord-services to omec-data-plane and omec-control-plane
- Merge mcord-setup to omec-data-plane chart
- Move cdn-services outside of omec
- Work fine in single cluster
To do
- Make it work in multi-cluster
Change-Id: Ic91d7732b844347b9f0a78a97b5d6d888d00887b
diff --git a/omec/omec-data-plane/templates/statefulset-spgwu.yaml b/omec/omec-data-plane/templates/statefulset-spgwu.yaml
new file mode 100644
index 0000000..b1a2c1a
--- /dev/null
+++ b/omec/omec-data-plane/templates/statefulset-spgwu.yaml
@@ -0,0 +1,146 @@
+{{/*
+Copyright 2018-present Open Networking Foundation
+Copyright 2018 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: spgwu
+ labels:
+{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 6 }}
+ serviceName: spgwu
+ template:
+ metadata:
+ labels:
+{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 8 }}
+ annotations:
+ k8s.v1.cni.cncf.io/networks: '[
+ { "name": "s1u-net", "interface": "s1u-net" },
+ { "name": "sgi-net", "interface": "sgi-net" }
+ ]'
+ spec:
+ {{- if .Values.nodeSelectors.enabled }}
+ nodeSelector:
+ {{ .Values.nodeSelectors.spgwu.label }}: {{ .Values.nodeSelectors.spgwu.value }}
+ {{- end }}
+ {{- if not .Values.config.sriov.enabled }}
+ initContainers:
+ - name: spgwu-iptables-init
+ image: {{ .Values.images.tags.init | quote }}
+ imagePullPolicy: {{ .Values.images.pullPolicy | quote }}
+ command: [ "sh", "-xec"]
+ securityContext:
+ capabilities:
+ add:
+ - NET_ADMIN
+ args:
+ - iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP;
+ - name: spgwu-af-iface-init
+ image: {{ .Values.images.tags.init | quote }}
+ imagePullPolicy: {{ .Values.images.pullPolicy | quote }}
+ securityContext:
+ capabilities:
+ add:
+ - NET_ADMIN
+ command:
+ - /opt/dp/scripts/setup-af-iface.sh
+ volumeMounts:
+ - name: dp-script
+ mountPath: /opt/dp/scripts/setup-af-iface.sh
+ subPath: setup-af-iface.sh
+ {{- end }}
+ containers:
+ - name: spgwu
+ image: {{ .Values.images.tags.spgwu | quote }}
+ imagePullPolicy: {{ .Values.images.pullPolicy | quote }}
+ stdin: true
+ tty: true
+ env:
+ - name: MEM_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: spgwu
+ resource: limits.memory
+ divisor: 1Mi
+ - name: S1U_DEVNAME
+ {{- if .Values.config.sriov.enabled }}
+ value: s1u-net
+ {{- else }}
+ value: {{ .Values.config.spgwu.s1uAfDev | quote }}
+ {{- end }}
+ - name: SGI_DEVNAME
+ {{- if .Values.config.sriov.enabled }}
+ value: sgi-net
+ {{- else }}
+ value: {{ .Values.config.spgwu.sgiAfDev | quote }}
+ {{- end }}
+ - name: DEVICES
+ value: {{ .Values.config.spgwu.devices | quote }}
+ - name: CP_ADDR
+ value: {{ .Values.config.spgwu.spgwc.addr | quote }}
+ - name: CP_PORT
+ value: {{ .Values.config.spgwu.spgwc.port | quote }}
+ - name: DP_ADDR
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: RTR_SGI_IP
+ value: {{ .Values.config.spgwu.rtrSgiIp | quote }}
+ - name: SGI_MASK
+ value: {{ .Values.config.spgwu.sgiMask | quote }}
+ command: ["bash", "-xc"]
+ args:
+ - ip a;
+ /opt/dp/scripts/run.sh;
+ volumeMounts:
+ - name: dp-script
+ mountPath: /opt/dp/scripts/run.sh
+ subPath: run.sh
+ - name: dp-config
+ mountPath: /etc/dp/config
+ resources:
+ requests:
+ {{- if .Values.resources.enabled }}
+{{ toYaml .Values.resources.spgwu.requests | indent 12 }}
+ {{- end }}
+ {{- if .Values.config.sriov.enabled }}
+ intel.com/sriov_vfio: 2
+ {{- end }}
+ limits:
+ {{- if .Values.resources.enabled }}
+{{ toYaml .Values.resources.spgwu.limits | indent 12 }}
+ {{- end }}
+ {{- if .Values.config.sriov.enabled }}
+ intel.com/sriov_vfio: 2
+ {{- end }}
+ securityContext:
+ capabilities:
+ add:
+ - IPC_LOCK
+ volumes:
+ - name: dp-script
+ configMap:
+ name: spgwu
+ defaultMode: 493
+ - name: dp-config
+ configMap:
+ name: spgwu
+ defaultMode: 420