Skip to content
Snippets Groups Projects
Commit bdcabf77 authored by Alex ubuntu vm's avatar Alex ubuntu vm
Browse files

resources: added custom crd

parent 76ffc69b
No related branches found
No related tags found
1 merge request!2repo: added new directory where utils scripts will be
apiVersion: l2sm.k8s.local/v1
kind: L2SMNetwork
metadata:
name: spain-network
spec:
type: inter-vnet
config: |
{
"provider": {
"name": "uc3m",
"domain": "idco.uc3m.es"
},
"accessList": ["public-key-1", "public-key-2"]
}
signature: sxySO0jHw4h1kcqO/LMLDgOoOeH8dOn8vZWv4KMBq0upxz3lcbl+o/36JefpEwSlBJ6ukuKiQ79L4rsmmZgglk6y/VL54DFyLfPw9RJn3mzl99YE4qCaHyEBANSw+d5hPaJ/I8q+AMtjrYpglMTRPf0iMZQMNtMd0CdeX2V8aZOPCQP75PsZkWukPdoAK/++y1vbFQ6nQKagvpUZfr7Ecb4/QY+hIAzepm6N6lNiFNTgj6lGTrFK0qCVfRhMD+vXbBP6xzZjB2N1nIheK9vx7kvj3HORjZ+odVMa+AOU5ShSKpzXTvknrtcRTcWWmXPNUZLoq5k3U+z1g1OTFcjMdQ====
apiVersion: v1
kind: Pod
metadata:
name: ned
labels:
app: l2sm
spec:
hostNetwork: true
containers:
- name: mycontainer
image: alexdecb/l2sm-switch:2.2
command: ["sleep", "infinity"]
securityContext:
capabilities:
add: ["NET_ADMIN"]
\ No newline at end of file
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: l2sm-networks.l2sm.k8s.local
spec:
group: l2sm.k8s.local
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
type:
type: string
config:
type: string # This is now simply a string, intended to hold JSON data.
nullable: true
signature:
type: string
nullable: true
status:
type: object
properties:
connectedPods:
type: array
items:
type: string
scope: Namespaced
names:
plural: l2sm-networks
singular: l2sm-network
kind: L2SMNetwork
shortNames:
- l2sm-net
apiVersion: v1
kind: Pod
metadata:
name: ping
labels:
app: ping-pong
annotations:
l2sm/networks: ping-network
spec:
containers:
- name: router
command: ["/bin/ash", "-c", "trap : TERM INT; sleep infinity & wait"]
image: alpine:latest
securityContext:
capabilities:
add: ["NET_ADMIN"]
# Use this parameter if you want to place the pod in a specific node
nodeName: l2sm1
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth1
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br1",
"mtu": 1400,
"device": "inter-veth1"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth2
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br2",
"mtu": 1400,
"device": "inter-veth2"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth3
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br3",
"mtu": 1400,
"device": "inter-veth3"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth4
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br4",
"mtu": 1400,
"device": "inter-veth4"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth5
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br5",
"mtu": 1400,
"device": "inter-veth5"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth6
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br6",
"mtu": 1400,
"device": "inter-veth6"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth7
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br7",
"mtu": 1400,
"device": "inter-veth7"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth8
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br8",
"mtu": 1400,
"device": "inter-veth8"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth9
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br9",
"mtu": 1400,
"device": "inter-veth9"
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: inter-veth10
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "inter-br10",
"mtu": 1400,
"device": "inter-veth10"
}'
\ No newline at end of file
apiVersion: l2sm.k8s.local/v1
kind: L2SMNetwork
metadata:
name: vlink-sample
spec:
type: vlink
config: |
{
"overlay-parameters": {
"path": {
"name": "first-path",
"FromEndpoint": "node-a",
"ToEndpoint": "node-e",
"links": ["link-ac","link-cd","link-de"],
"capabilities": {
"bandwidthBits": "20M",
"latencyNanos": "8e5"
}
},
"reverse-path": {
"name": "second-path",
"fromEndpoint": "node-e",
"toEndpoint": "node-a",
"links": ["link-ed","link-db","link-ba"]
}
}
}
apiVersion: l2sm.k8s.local/v1
kind: L2SMNetwork
metadata:
name: ping-network
spec:
type: vnet
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment