blob: 1c01919e39956cb5f1d0ac7b0d44d9fb5bfc2848 [file] [log] [blame]
Hyunsun Moon81c8e232019-05-21 03:40:22 -06001# Copyright 2019-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Hyunsun Moon89886f12019-09-05 22:16:09 -060014
Hyunsun Moon81c8e232019-05-21 03:40:22 -060015---
Hyunsun Moon623ad542019-09-07 14:30:23 -060016apiVersion: "k8s.cni.cncf.io/v1"
17kind: NetworkAttachmentDefinition
18metadata:
19 name: sgi-net
20spec:
21 config: '{
22 "type": "simpleovs",
23 "ipam": {
24 "type": "static"
25 }
26 }'
27---
Hyunsun Moon534c7962020-06-21 20:40:43 -050028apiVersion: "k8s.cni.cncf.io/v1"
29kind: NetworkAttachmentDefinition
30metadata:
31 name: s1u-net
32spec:
33 config: '{
34 "type": "simpleovs",
35 "ipam": {
36 "type": "static"
37 }
38 }'
39---
40apiVersion: "k8s.cni.cncf.io/v1"
41kind: NetworkAttachmentDefinition
42metadata:
43 name: enb-net
44spec:
45 config: '{
46 "type": "simpleovs",
47 "ipam": {
48 "type": "static"
49 }
50 }'
51---
Hyunsun Moon81c8e232019-05-21 03:40:22 -060052apiVersion: v1
53kind: Pod
54metadata:
55 name: router
56 labels:
Hyunsun Moon89886f12019-09-05 22:16:09 -060057 app: router
Hyunsun Moon81c8e232019-05-21 03:40:22 -060058 annotations:
59 k8s.v1.cni.cncf.io/networks: '[
Hyunsun Moon534c7962020-06-21 20:40:43 -050060 { "name": "sgi-net", "interface": "sgi-rtr", "ips": "192.168.250.1/24" },
61 { "name": "enb-net", "interface": "enb-rtr", "ips": "192.168.251.1/24" },
62 { "name": "s1u-net", "interface": "s1u-rtr", "ips": "192.168.252.1/24" }
Hyunsun Moon81c8e232019-05-21 03:40:22 -060063 ]'
64spec:
65 containers:
66 - name: quagga
67 command: ["/bin/bash", "-c"]
68 args:
69 - >
Woojoong Kim68b57e72019-10-16 14:19:55 -070070 sysctl -w net.ipv4.ip_forward=1;
71 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
Hyunsun Moon81c8e232019-05-21 03:40:22 -060072 trap : TERM INT; sleep infinity & wait
73 image: opencord/quagga
74 securityContext:
Woojoong Kim68b57e72019-10-16 14:19:55 -070075 privileged: true
Hyunsun Moon81c8e232019-05-21 03:40:22 -060076 capabilities:
77 add:
78 - NET_ADMIN
79 ports:
80 - containerPort: 2601