Skip to content

Commit

Permalink
add default vpc subnet docs (#190)
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <[email protected]>
  • Loading branch information
cnvergence authored Aug 23, 2024
1 parent adf68c5 commit 340778c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
30 changes: 25 additions & 5 deletions docs/guide/vpc.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@ metadata:
name: eipd01
spec:
natGwDp: gw1
---
kind: IptablesDnatRule
apiVersion: kubeovn.io/v1
metadata:
name: dnat01
spec:
eip: eipd01
eip: eipd01
externalPort: '8888'
internalIp: 10.0.1.10
internalPort: '80'
Expand Down Expand Up @@ -565,9 +565,9 @@ View resource information:

```bash
[root@hci-dev-mst-1 kubeovn]# kubectl get vpc-dns
NAME ACTIVE VPC SUBNET
test-cjh1 false cjh-vpc-1 cjh-subnet-1
test-cjh2 true cjh-vpc-1 cjh-subnet-2
NAME ACTIVE VPC SUBNET
test-cjh1 false cjh-vpc-1 cjh-subnet-1
test-cjh2 true cjh-vpc-1 cjh-subnet-2
```

- `ACTIVE`: if the custom vpc-dns is ready.
Expand All @@ -577,3 +577,23 @@ test-cjh2 true cjh-vpc-1 cjh-subnet-2
- Only one custom DNS component will be deployed in one VPC;
- When multiple VPC-DNS resources (i.e. different subnets in the same VPC) are configured in one VPC, only one VPC-DNS resource with status `true` will be active, while the others will be `false`;
- When the `true` VPC-DNS is deleted, another `false` VPC-DNS will be deployed.

## Default subnet selection for custom VPC

If the custom VPC is running multiple Subnets, you can specify the default Subnet for that VPC.

```yaml
kind: Vpc
apiVersion: kubeovn.io/v1
metadata:
name: test-vpc-1
spec:
namespaces:
- ns1
defaultSubnet: test
```

- `defaultSubnet`: Name of the subnet that should be used by custom VPC as the default one.

Please note that it will annotate the VPC namespaces with just one logical switch using `"ovn.kubernetes.io/logical_switch"` annotation.
Any of the new Pods without `"ovn.kubernetes.io/logical_switch"` annotation will be added to the default Subnet.
1 change: 1 addition & 0 deletions docs/reference/kube-ovn-api.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ In each CRD definition, the Condition field in Status follows the above format,
| policyRoutes | []*PolicyRoute | The policy route information configured under Vpc |
| vpcPeerings | []*VpcPeering | Vpc interconnection information |
| enableExternal | Bool | Whether vpc is connected to an external switch |
| defaultSubnet | String | Name of the subnet that should be used by custom Vpc as the default one |

##### StaticRoute

Expand Down

0 comments on commit 340778c

Please sign in to comment.