-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add implementation for OVSNetwork controller
Signed-off-by: Yury Kulazhenkov <[email protected]>
- Loading branch information
1 parent
a51d01b
commit de0caa8
Showing
12 changed files
with
511 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"apiVersion": "k8s.cni.cncf.io/v1", | ||
"kind": "NetworkAttachmentDefinition", | ||
"metadata": { | ||
"annotations": { | ||
"k8s.v1.cni.cncf.io/resourceName": "/testresource" | ||
}, | ||
"name": "test", | ||
"namespace": "testnamespace" | ||
}, | ||
"spec": { | ||
"config": "{ \"cniVersion\":\"0.3.1\", \"name\":\"test\",\"plugins\": [ {\"type\":\"ovs\",\"mtu\":1500,\"ipam\":{} },\n{ \"type\": \"vrf\", \"vrfname\": \"blue\" }\n] }" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"apiVersion": "k8s.cni.cncf.io/v1", | ||
"kind": "NetworkAttachmentDefinition", | ||
"metadata": { | ||
"annotations": { | ||
"k8s.v1.cni.cncf.io/resourceName": "/testresource" | ||
}, | ||
"name": "test", | ||
"namespace": "testnamespace" | ||
}, | ||
"spec": { | ||
"config": "{ \"cniVersion\":\"0.3.1\", \"name\":\"test\",\"type\":\"ovs\",\"capabilities\":{\"foo\": \"bar\"},\"bridge\":\"test\",\"vlan\":100,\"mtu\":1500,\"trunk\":[{\"id\":120},{\"minID\":500,\"maxID\":550}],\"interface_type\":\"netdev\",\"ipam\":{\"type\":\"foo\"} }" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"apiVersion": "k8s.cni.cncf.io/v1", | ||
"kind": "NetworkAttachmentDefinition", | ||
"metadata": { | ||
"annotations": { | ||
"k8s.v1.cni.cncf.io/resourceName": "/testresource" | ||
}, | ||
"name": "test", | ||
"namespace": "testnamespace" | ||
}, | ||
"spec": { | ||
"config": "{ \"cniVersion\":\"0.3.1\", \"name\":\"test\",\"type\":\"ovs\",\"ipam\":{} }" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: "k8s.cni.cncf.io/v1" | ||
kind: NetworkAttachmentDefinition | ||
metadata: | ||
name: {{.NetworkName}} | ||
namespace: {{.NetworkNamespace}} | ||
annotations: | ||
k8s.v1.cni.cncf.io/resourceName: {{.CniResourceName}} | ||
spec: | ||
config: '{ | ||
"cniVersion":"0.3.1", | ||
"name":"{{.NetworkName}}", | ||
{{- if .MetaPluginsConfigured -}} | ||
"plugins": [ | ||
{ | ||
{{- end -}} | ||
"type":"{{.CniType}}", | ||
{{- if .CapabilitiesConfigured -}} | ||
"capabilities":{{.CniCapabilities}}, | ||
{{- end -}} | ||
{{- if .Bridge -}} | ||
"bridge":"{{.Bridge}}", | ||
{{- end -}} | ||
{{- if .VlanTag -}} | ||
"vlan":{{.VlanTag}}, | ||
{{- end -}} | ||
{{- if .MTU -}} | ||
"mtu":{{.MTU}}, | ||
{{- end -}} | ||
{{- if .Trunk -}} | ||
"trunk":{{.Trunk}}, | ||
{{- end -}} | ||
{{- if .InterfaceType -}} | ||
"interface_type":"{{.InterfaceType}}", | ||
{{- end -}} | ||
{{.CniIpam}} | ||
} | ||
{{- if .MetaPluginsConfigured -}} | ||
, | ||
{{.MetaPlugins}} | ||
] | ||
} | ||
{{- end -}} | ||
' |
File renamed without changes.
Oops, something went wrong.