draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | Network Config Controller |
---|
simpleViewer | false |
---|
width | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 1081 |
---|
revision | 2 |
---|
|
Cluster Network Intents
Networks Intent
With network API dynamic networks can be created.
...
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-providers/{cluster-provider-name}/clusters/{cluster-name}/networks
POST BODY:
{
"metadata": {
"name": "<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
},
"spec": {
"cniType": "ovn4nfv",
"ipv4Subnets": [
{
"subnet": "172.16.33.0/24",
"name": "subnet1",
"gateway": "172.16.33.1/24",
"excludeIps": "172.16.33.2 172.16.33.5..172.16.33.10"
}
]
}
}
|
Provider Networks Intent
With provider network API dynamic provider networks can be created.
...
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-providers/{cluster-provider-name}/clusters/{cluster-name}/provider-networks
POST BODY:
{
"metadata": {
"name": "<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
},
"spec": {
"cniType": "ovn4nfv",
"ipv4Subnets": [
{
"subnet": "172.16.33.0/24",
"name": "subnet1",
"gateway": "172.16.33.1/24",
"excludeIps": "172.16.33.2 172.16.33.5..172.16.33.10"
}
],
"providerNetType": "VLAN",
"vlan": {
"vlanId": "100",
"providerInterfaceName": "eth1",
"logicalInterfaceName": "eth1.100",
"vlanNodeSelector": "specific",
"nodeLabelList": [
"kubernetes.io/hostname=localhost"
]
}
}
}
|
Apply
Create networks and Provider networks in the cluster
...
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-providers/{cluster-provider-name}/clusters/{cluster-name}/apply
POST BODY:
{
}
|
Terminate
Delete networks and Provider networks in the cluster
...
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/network-controller-intent/{net-control-intent}/workload-intents/<workload-intent-name>/interfaces
POST BODY:
{
"metadata": {
"name": "<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
},
"spec": {
"interface-name":"net0",
"network-name" : "provider-net-1",
"default-interfacedefaultGateway": "false", // Optional, default value is false
"ip-addressipAddress": "0.0.0.0", // Optional, if not provided then dynamically allocated
"mac-addressmacAddress": "x:x:x:x" // Optional, if not provided then dynamically allocated
}
|
Network Chain Intent
With network chaining, network chains can be created.
...
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/network-controller-intent/{net-control-intent}/network-chains
POST BODY:
{
"metadata": {
"name": "<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
},
"spec": {
"app-name": "<name>",
"chainType": "Routing",
"routingSpec": {
"namespace": "default",
"networkChain": "app=slb,dync-net1,app=ngfw,dync-net2,app=sdwan",
# "leftApp": {"app-name": "ms1", "workload": "app=dep1"}, // Not yet implemented
# "rightApp": {"app-name": "ms2", "workload": "app=dep2"}, // Not yet implemented
"leftNetwork": [
{
"leftStaticIp": "172.30.10.3",
"networkName": "pnet1",
"gatewayIp": "172.30.10.2",
"subnet": "172.30.10.0/24"
}
],
"rightNetwork": [
{
"rightStaticIp": "172.20.10.3",
"networkName": "pnet2",
"gatewayIp": "172.30.20.2",
"subnet": "172.30.20.0/24"
}
]
}
}
} |
Apply
Create network control intents for a given composite app/version
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/network-controller-intent/{net-control-intent}/apply
POST BODY:
{
}
|
Terminate
Delete network control intents for a given composite app/version
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/network-controller-intent/{net-control-intent}/terminate
POST BODY:
{
}
|