Skip to content

[feat] add fields for supporting configurable VPC IPv4 prefixes#1093

Merged
AshleyDumaine merged 6 commits into
mainfrom
vpc-ipv4-field
Jul 8, 2026
Merged

[feat] add fields for supporting configurable VPC IPv4 prefixes#1093
AshleyDumaine merged 6 commits into
mainfrom
vpc-ipv4-field

Conversation

@AshleyDumaine

@AshleyDumaine AshleyDumaine commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.68%. Comparing base (939e91a) to head (a0f4187).

Files with missing lines Patch % Lines
...nternal/controller/linodevpc_controller_helpers.go 82.60% 2 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

komer3
komer3 previously approved these changes Jul 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) and spec.ipv4Range (requested) fields to LinodeVPCSpec, 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

Comment thread internal/controller/linodevpc_controller_helpers.go
Comment thread docs/src/reference/out.md Outdated
Comment thread api/v1alpha2/linodevpc_types.go Outdated
// +listType=map
// +listMapKey=range
IPv4 []linodego.VPCIPv4Range `json:"ipv4,omitzero"`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note for v1beta1: We should rename these controller-set fields so they're less confusing vs IPvXRange.

@AshleyDumaine AshleyDumaine merged commit 288607e into main Jul 8, 2026
17 checks passed
@AshleyDumaine AshleyDumaine deleted the vpc-ipv4-field branch July 8, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants