Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 1 | --- |
Wei-Yu Chen | 53aec36 | 2019-01-18 16:30:33 -0800 | [diff] [blame] | 2 | # Copyright 2018-present Open Networking Foundation |
| 3 | # Copyright 2018 Intel Corporation |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | --- |
| 18 | apiVersion: v1 |
| 19 | kind: Service |
| 20 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 21 | name: ngic-cp |
| 22 | spec: |
| 23 | selector: |
| 24 | app: ngic-cp |
| 25 | clusterIP: None |
| 26 | ports: |
| 27 | - name: s11 |
| 28 | port: {{ .Values.ngic_cp.ports.s11 }} |
| 29 | protocol: UDP |
| 30 | - name: sx |
| 31 | port: {{ .Values.ngic_cp.ports.sx }} |
| 32 | protocol: UDP |
| 33 | --- |
| 34 | apiVersion: apps/v1 |
| 35 | kind: StatefulSet |
| 36 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 37 | name: ngic-cp |
| 38 | labels: |
| 39 | app: ngic-cp |
| 40 | spec: |
| 41 | replicas: {{ .Values.ngic_cp.replicas }} |
| 42 | selector: |
| 43 | matchLabels: |
| 44 | app: ngic-cp |
| 45 | serviceName: "ngic-cp" |
| 46 | template: |
| 47 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 48 | labels: |
| 49 | app: ngic-cp |
| 50 | spec: |
| 51 | initContainers: |
| 52 | - name: init-iptables |
| 53 | image: {{ .Values.ngic_cp.images.init }} |
| 54 | command: [ "sh", "-c"] |
| 55 | securityContext: |
| 56 | capabilities: |
| 57 | add: |
| 58 | - NET_ADMIN |
| 59 | args: |
| 60 | - iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP; |
| 61 | terminationGracePeriodSeconds: 1 |
| 62 | containers: |
| 63 | - name: ngic |
| 64 | image: {{ .Values.ngic_cp.images.cp }} |
| 65 | imagePullPolicy: IfNotPresent |
| 66 | stdin: true |
Wei-Yu Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 67 | command: [ "bash", "-xc"] |
| 68 | args: |
| 69 | - . /opt/ngic/config/cp_config.cfg; |
Wei-Yu Chen | 9e5e046 | 2019-01-18 16:58:10 -0800 | [diff] [blame] | 70 | sleep 20; |
| 71 | ./ngic_controlplane $EAL_ARGS -- $APP_ARGS; |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 72 | tty: true |
| 73 | env: |
| 74 | - name: MME_S11_IP |
Wei-Yu Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 75 | value: {{ .Values.mme_hostname }} |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 76 | #- name: SGW_S1U_IP # for now,this will be in our own pod |
| 77 | # value: "5.5.5.5" |
| 78 | - name: APN |
| 79 | value: {{ .Values.ngic_cp.config.apn }} |
| 80 | - name: IP_POOL_IP |
| 81 | value: "{{ .Values.ngic_cp.config.ue_ip_pool }}" |
| 82 | - name: IP_POOL_MASK |
| 83 | value: "{{ .Values.ngic_cp.config.ue_ip_pool_mask }}" |
| 84 | - name: S11_TEID_POOL_START |
| 85 | value: "00100000" |
| 86 | - name: S11_TEID_POOL_STOP |
| 87 | value: "001fffff" |
| 88 | - name: S1U_TEID_POOL_START |
| 89 | value: "00100000" |
| 90 | - name: S1U_TEID_POOL_STOP |
| 91 | value: "001fffff" |
| 92 | - name: MEM_LIMIT |
| 93 | valueFrom: |
| 94 | resourceFieldRef: |
| 95 | containerName: ngic |
| 96 | resource: limits.memory |
| 97 | divisor: 1Mi |
| 98 | volumeMounts: |
| 99 | - name: config-volume |
| 100 | mountPath: /opt/ngic/config |
| 101 | #- name: hugepage |
| 102 | # mountPath: /dev/hugepages |
| 103 | - name: shared-data |
| 104 | mountPath: /opt/ngic/config/shared |
| 105 | resources: |
| 106 | limits: |
| 107 | #hugepages-1Gi: 4Gi |
| 108 | cpu: {{ .Values.ngic_cp.resources.cpu }} |
| 109 | memory: {{ .Values.ngic_cp.resources.mem }} |
| 110 | volumes: |
| 111 | - name: config-volume |
| 112 | configMap: |
| 113 | name: ngiccp-config |
| 114 | - name: shared-data |
| 115 | emptyDir: {} |