[feat] add fields for supporting configurable VPC IPv4 prefixes#1093
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1093 +/- ##
==========================================
+ Coverage 69.64% 69.68% +0.03%
==========================================
Files 71 71
Lines 6579 6600 +21
==========================================
+ Hits 4582 4599 +17
- Misses 1708 1710 +2
- Partials 289 291 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
25304bc to
bfa9d86
Compare
b2e6df2 to
7136b78
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends CAPL’s LinodeVPC support to expose and reconcile Linode’s configurable VPC IPv4 prefix feature (via linodego), including API/CRD surface area, controller reconciliation behavior, and generated client/test artifacts.
Changes:
- Add
spec.ipv4(allocated) andspec.ipv4Range(requested) fields toLinodeVPCSpec, plus corresponding CRD + reference docs output. - Plumb linodego VPC IPv4 prefix configuration through VPC create and (for existing VPCs) update reconciliation paths.
- Update Linode client interfaces/wrappers/mocks and adjust/add unit tests for the new behavior.
Reviewed changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| observability/wrappers/linodeclient/linodeclient.gen.go | Adds tracing wrapper method for UpdateVPC. |
| mock/client.go | Extends gomock clients with UpdateVPC to match updated interfaces. |
| internal/controller/linodevpc_controller_test.go | Adds reconciliation coverage expecting UpdateVPC when spec.ipv4Range is set. |
| internal/controller/linodevpc_controller_helpers.go | Implements IPv4 prefix create options and adds existing-VPC update path + spec field syncing. |
| internal/controller/linodevpc_controller_helpers_test.go | Updates create-config unit tests to include BYO IPv4 prefix behavior. |
| docs/src/reference/out.md | Regenerates reference docs to include new LinodeVPC IPv4 fields. |
| config/crd/bases/infrastructure.cluster.x-k8s.io_linodevpcs.yaml | Extends CRD schema with spec.ipv4 and spec.ipv4Range. |
| clients/clients.go | Adds UpdateVPC to LinodeVPCClient interface. |
| api/v1alpha2/zz_generated.deepcopy.go | Regenerates deepcopy implementations for new spec fields/types. |
| api/v1alpha2/linodevpc_types.go | Adds new LinodeVPCSpec fields and introduces VPCCreateOptionsIPv4 type. |
Files not reviewed (3)
- api/v1alpha2/zz_generated.deepcopy.go: Generated file
- mock/client.go: Generated file
- observability/wrappers/linodeclient/linodeclient.gen.go: Generated file
7136b78 to
c85b33a
Compare
e615687 to
a0f4187
Compare
| // +listType=map | ||
| // +listMapKey=range | ||
| IPv4 []linodego.VPCIPv4Range `json:"ipv4,omitzero"` | ||
|
|
There was a problem hiding this comment.
Side note for v1beta1: We should rename these controller-set fields so they're less confusing vs IPvXRange.
What this PR does / why we need it: This makes use of the new configurable VPC IPv4 Prefix feature in linodego: linode/linodego@7cbc513
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
TODOs: