From 0efefecf1a6e1b3e58041df1d418b011ee30a97c Mon Sep 17 00:00:00 2001 From: Karol Szwaj Date: Mon, 19 Aug 2024 16:51:10 +0200 Subject: [PATCH] add default vpc subnet docs Signed-off-by: Karol Szwaj --- docs/guide/vpc.en.md | 30 +++++++++++++++++++++++++----- docs/reference/kube-ovn-api.en.md | 1 + 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/docs/guide/vpc.en.md b/docs/guide/vpc.en.md index a3db7abc5..bf87d479c 100644 --- a/docs/guide/vpc.en.md +++ b/docs/guide/vpc.en.md @@ -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' @@ -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. @@ -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. diff --git a/docs/reference/kube-ovn-api.en.md b/docs/reference/kube-ovn-api.en.md index d2a6ed729..696ebbd05 100644 --- a/docs/reference/kube-ovn-api.en.md +++ b/docs/reference/kube-ovn-api.en.md @@ -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