Initial M-CORD services charts
Change-Id: I36bcfcb3f7800b95e54b5b8a375e113696f6d5b1
diff --git a/mcord/mcord-control-plane/templates/cp.yaml b/mcord/mcord-control-plane/templates/cp.yaml
new file mode 100644
index 0000000..dc6545f
--- /dev/null
+++ b/mcord/mcord-control-plane/templates/cp.yaml
@@ -0,0 +1,114 @@
+---
+# Copyright 2017-present Open Networking Foundation
+#
+# 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: v1
+kind: Service
+metadata:
+ namespace: {{ .Values.namespace }}
+ name: ngic-cp
+spec:
+ selector:
+ app: ngic-cp
+ clusterIP: None
+ ports:
+ - name: s11
+ port: {{ .Values.ngic_cp.ports.s11 }}
+ protocol: UDP
+ - name: sx
+ port: {{ .Values.ngic_cp.ports.sx }}
+ protocol: UDP
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ namespace: {{ .Values.namespace }}
+ name: ngic-cp
+ labels:
+ app: ngic-cp
+spec:
+ replicas: {{ .Values.ngic_cp.replicas }}
+ selector:
+ matchLabels:
+ app: ngic-cp
+ serviceName: "ngic-cp"
+ template:
+ metadata:
+ namespace: {{ .Values.namespace }}
+ labels:
+ app: ngic-cp
+ spec:
+ initContainers:
+ - name: init-iptables
+ image: {{ .Values.ngic_cp.images.init }}
+ command: [ "sh", "-c"]
+ securityContext:
+ capabilities:
+ add:
+ - NET_ADMIN
+ args:
+ - iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP;
+ terminationGracePeriodSeconds: 1
+ containers:
+ - name: ngic
+ image: {{ .Values.ngic_cp.images.cp }}
+ imagePullPolicy: IfNotPresent
+ stdin: true
+ command: [ "bash", "-cx", ". /opt/ngic/config/cp_config.cfg; sleep 20; ./ngic_controlplane $EAL_ARGS -- $APP_ARGS"]
+ #command: ["sleep", "3600"]
+ tty: true
+ env:
+ - name: MME_S11_IP
+ value: mme-0.mme.{{ .Values.namespace }}.local
+ #- name: SGW_S1U_IP # for now,this will be in our own pod
+ # value: "5.5.5.5"
+ - name: APN
+ value: {{ .Values.ngic_cp.config.apn }}
+ - name: IP_POOL_IP
+ value: "{{ .Values.ngic_cp.config.ue_ip_pool }}"
+ - name: IP_POOL_MASK
+ value: "{{ .Values.ngic_cp.config.ue_ip_pool_mask }}"
+ - name: S11_TEID_POOL_START
+ value: "00100000"
+ - name: S11_TEID_POOL_STOP
+ value: "001fffff"
+ - name: S1U_TEID_POOL_START
+ value: "00100000"
+ - name: S1U_TEID_POOL_STOP
+ value: "001fffff"
+ - name: MEM_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: ngic
+ resource: limits.memory
+ divisor: 1Mi
+ volumeMounts:
+ - name: config-volume
+ mountPath: /opt/ngic/config
+ #- name: hugepage
+ # mountPath: /dev/hugepages
+ - name: shared-data
+ mountPath: /opt/ngic/config/shared
+ resources:
+ limits:
+ #hugepages-1Gi: 4Gi
+ cpu: {{ .Values.ngic_cp.resources.cpu }}
+ memory: {{ .Values.ngic_cp.resources.mem }}
+ volumes:
+ - name: config-volume
+ configMap:
+ name: ngiccp-config
+ - name: shared-data
+ emptyDir: {}