Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • eclipse-research-labs/nemo-project/nemo-infrastructure-management/federated-meta-network-cluster-controller/multi-domain-l2s-m
1 result
Show changes
Showing
with 781 additions and 0 deletions
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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.
# permissions for end users to edit overlays.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: overlay-editor-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: controllermanager
app.kubernetes.io/part-of: controllermanager
app.kubernetes.io/managed-by: kustomize
name: overlay-editor-role
rules:
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- overlays
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- overlays/status
verbs:
- get
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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.
# permissions for end users to view overlays.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: overlay-viewer-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: controllermanager
app.kubernetes.io/part-of: controllermanager
app.kubernetes.io/managed-by: kustomize
name: overlay-viewer-role
rules:
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- overlays
verbs:
- get
- list
- watch
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- overlays/status
verbs:
- get
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- apps
resources:
- replicasets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- patch
- update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- l2networks
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- l2networks/finalizers
verbs:
- update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- l2networks/status
verbs:
- get
- patch
- update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- networkedgedevices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- networkedgedevices/finalizers
verbs:
- update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- networkedgedevices/status
verbs:
- get
- patch
- update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- overlays
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- overlays/finalizers
verbs:
- update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- overlays/status
verbs:
- get
- patch
- update
- apiGroups:
- l2sm.l2sm.k8s.local
resources:
- replicasets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/instance: manager-rolebinding
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: l2network
app.kubernetes.io/part-of: l2network
app.kubernetes.io/managed-by: kustomize
name: manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: manager-role
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: serviceaccount
app.kubernetes.io/instance: controller-manager-sa
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: l2network
app.kubernetes.io/part-of: l2network
app.kubernetes.io/managed-by: kustomize
name: controller-manager
namespace: system
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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.
## Append samples of your project ##
resources:
- l2sm_v1_l2network.yaml
- l2sm_v1_networkedgedevice.yaml
- l2sm_v1_networkedgedevice.yaml
- l2sm_v1_overlay.yaml
#+kubebuilder:scaffold:manifestskustomizesamples
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: l2sm.l2sm.k8s.local/v1
kind: L2Network
metadata:
name: ping-network
spec:
type: vnet
provider:
name: example-network-controller
domain: "192.168.122.60:8181"
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: l2sm.l2sm.k8s.local/v1
kind: NetworkEdgeDevice
metadata:
name: example-networkedgedevice
labels:
app: l2sm
spec:
networkController:
name: example-network-controller
domain: 192.168.122.60
nodeConfig:
nodeName: ant-machine
ipAddress: 192.168.122.60
neighbors:
- node: tucci
domain: 192.168.122.244
switchTemplate:
spec:
hostNetwork: true
containers:
- name: l2sm-switch
image: alexdecb/l2sm-ned:2.7.1
resources: {}
# command: ["/bin/sh"]
# args: ["-c", "sleep infinity"]
#imagePullPolicy: Always
ports:
- containerPort: 80
securityContext:
capabilities:
add: ["NET_ADMIN"]
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: l2sm.l2sm.k8s.local/v1
kind: Overlay
metadata:
labels:
app.kubernetes.io/name: overlay
app.kubernetes.io/instance: overlay-sample
app.kubernetes.io/part-of: controllermanager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: controllermanager
name: overlay-sample
spec:
networkController:
name: example-network-controller
domain: controller.example.com
topology:
nodes:
- ant-machine
- mole
links:
- endpointA: ant-machine
endpointB: mole
switchTemplate:
spec:
containers:
- name: l2sm-switch
image: alexdecb/l2sm-switch:2.7
resources: {}
env:
- name: NODENAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: NVETHS
value: "10"
- name: CONTROLLERIP
value: "l2sm-controller-service"
- name: PODNAME
valueFrom:
fieldRef:
fieldPath: metadata.name
imagePullPolicy: Always
securityContext:
capabilities:
add: ["NET_ADMIN"]
ports:
- containerPort: 80
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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.
resources:
- manifests.yaml
- service.yaml
\ No newline at end of file
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: Deployment
metadata:
name: controller
spec:
replicas: 1
selector:
matchLabels:
app: controller
template:
metadata:
labels:
app: controller
spec:
containers:
- name: l2sm-controller
image: alexdecb/l2sm-controller:2.4
readinessProbe:
httpGet:
path: /onos/ui
port: 8181
initialDelaySeconds: 30
periodSeconds: 10
ports:
- containerPort: 6633
- containerPort: 8181
# imagePullPolicy: Always
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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:
name: controller-service
spec:
selector:
app: controller
ports:
- name: of13-port
protocol: TCP
port: 6633
targetPort: 6633
- name: http-port
protocol: TCP
port: 8181
targetPort: 8181
type: ClusterIP
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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.
namespace: l2sm-system
resources:
- vhost1.yaml
- vhost2.yaml
- vhost3.yaml
- vhost4.yaml
- vhost5.yaml
- vhost6.yaml
- vhost7.yaml
- vhost8.yaml
- vhost9.yaml
- vhost10.yaml
\ No newline at end of file
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: veth1
labels:
app: l2sm
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "br1",
"mtu": 1400,
"device": "veth1",
"ipam": {
"type":"static"
}
}'
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: veth10
labels:
app: l2sm
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "br10",
"mtu": 1400,
"device": "veth10",
"ipam": {
"type":"static"
}
}'
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: veth2
labels:
app: l2sm
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "br2",
"mtu": 1400,
"device": "veth2",
"ipam": {
"type":"static"
}
}'
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: veth3
labels:
app: l2sm
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "br3",
"mtu": 1400,
"device": "veth3",
"ipam": {
"type":"static"
}
}'
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: veth4
labels:
app: l2sm
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "br4",
"mtu": 1400,
"device": "veth4",
"ipam": {
"type":"static"
}
}'
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: veth5
labels:
app: l2sm
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "br5",
"mtu": 1400,
"device": "veth5",
"ipam": {
"type":"static"
}
}'
# Copyright 2024 Universidad Carlos III de Madrid
#
# 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: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: veth6
labels:
app: l2sm
spec:
config: '{
"cniVersion": "0.3.0",
"type": "bridge",
"bridge": "br6",
"mtu": 1400,
"device": "veth6",
"ipam": {
"type":"static"
}
}'