Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add default vpc subnet docs #190

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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