Skip to content

Commit 1779df2

Browse files
committed
docs(vpc): generate README parameters from values.yaml
The vpc Makefile never passed -r README.md to cozyvalues-gen, unlike every other app, so its Parameters table was never regenerated. It still described subnets as a map after the switch to a list, and the README example, which also feeds the website reference page, fails values.schema.json. Assisted-by: LLM Signed-off-by: Roshan Ramani <[email protected]>
1 parent aed7fa8 commit 1779df2

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

‎packages/apps/vpc/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include ../../../hack/package.mk
22

33
generate:
4-
cozyvalues-gen -m 'vpc' -v values.yaml -s values.schema.json -g ../../../api/apps/v1alpha1/vpc/types.go
4+
cozyvalues-gen -m 'vpc' -v values.yaml -s values.schema.json -r README.md -g ../../../api/apps/v1alpha1/vpc/types.go
55
../../../hack/update-crd.sh
66

77
update:

‎packages/apps/vpc/README.md‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,18 @@ A VM or a pod may be connected to multiple secondary Subnets at once. Each secon
2727

2828
### Common parameters
2929

30-
| Name | Description | Type | Value |
31-
| -------------------- | -------------------------------- | ------------------- | ------- |
32-
| `subnets` | Subnets of a VPC | `map[string]object` | `{...}` |
33-
| `subnets[name].cidr` | Subnet CIDR, e.g. 192.168.0.0/24 | `cidr` | `{}` |
30+
| Name | Description | Type | Value |
31+
| -------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------- | ----- |
32+
| `subnets` | Subnets of a VPC | `[]object` | `[]` |
33+
| `subnets[i].name` | Subnet name | `string` | `""` |
34+
| `subnets[i].cidr` | IP address range | `string` | `""` |
35+
| `subnets[i].allowSubnets` | Additional source CIDRs admitted into this private subnet, such as remote networks routed in through a gateway VM | `[]string` | `[]` |
36+
| `peers` | VPC peering connections (bidirectional declaration required) | `[]object` | `[]` |
37+
| `peers[i].vpcName` | Logical name of the remote VPC (without "virtualprivatecloud-" prefix) | `string` | `""` |
38+
| `peers[i].tenantNamespace` | Namespace of the remote tenant | `string` | `""` |
39+
| `routes` | Static routes for the VPC | `[]object` | `[]` |
40+
| `routes[i].cidr` | Destination CIDR | `string` | `""` |
41+
| `routes[i].nextHopIP` | Next hop IP address | `string` | `""` |
3442

3543

3644
## Examples
@@ -41,10 +49,10 @@ metadata:
4149
name: vpc00
4250
spec:
4351
subnets:
44-
sub00:
52+
- name: sub00
4553
cidr: 172.16.0.0/24
46-
sub01:
54+
- name: sub01
4755
cidr: 172.16.1.0/24
48-
sub02:
56+
- name: sub02
4957
cidr: 172.16.2.0/24
5058
```

0 commit comments

Comments
 (0)