Skip to content

Conversation

@AshleyDumaine
Copy link
Collaborator

@AshleyDumaine AshleyDumaine commented Oct 22, 2025

What this PR does / why we need it: Solidifies the CRD specs for the first beta version for LinodeMachine and LinodeCluster. This adds conversion webhooks to move from v1alpha2 to v1beta1 with the goal to eventually remove v1alpha2 CRDs.

CRDs to handle:

  • LinodeMachine
    • Removes Group which is marked deprecated on linodego (adds the deprecation marker on v1alpha2)
    • Moves Kernel up out of the otherwise empty Configuration struct
    • changes DiskEncryption to use linodego's type so we don't need to cast it
    • Shuffles fields around to make it easier to compare to linodego InstanceCreateOptions (which we can't use directly because of issues around DeepCopy code generation)
  • LinodeMachineTemplate
  • LinodeCluster
    • Breaks out all DNS config into a new DNSConfig struct
    • Breaks out all NodeBalancer config into a new NodeBalancerConfig struct
  • LinodeClusterTemplate

To handle in follow-up PRs

  • LinodeFirewall
  • AddressSet
  • FirewallRule
  • LinodeObjectStorageBucket
  • LinodeObjectStorageKey
  • LinodePlacementGroup
  • LinodeVPC

NOTE: Once the CRD specs are solidified, the controllers should be updated to use the v1beta1 APIs (which will be the storage version even if the deprecated v1alpha2 CRDs are used)

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
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 1.29870% with 76 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.77%. Comparing base (dfdc4a5) to head (89626f4).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
api/v1beta1/linodemachine_types.go 0.00% 24 Missing ⚠️
api/v1beta1/linodecluster_types.go 0.00% 20 Missing ⚠️
api/v1beta1/linodemachinetemplate_types.go 0.00% 10 Missing ⚠️
cmd/main.go 11.11% 8 Missing ⚠️
internal/webhook/v1beta1/linodecluster_webhook.go 0.00% 3 Missing ⚠️
internal/webhook/v1beta1/linodemachine_webhook.go 0.00% 3 Missing ⚠️
api/v1beta1/linodeclustertemplate_conversion.go 0.00% 2 Missing ⚠️
api/v1beta1/linodeclustertemplate_types.go 0.00% 2 Missing ⚠️
api/v1beta1/linodemachinetemplate_conversion.go 0.00% 2 Missing ⚠️
api/v1beta1/linodecluster_conversion.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
- Coverage   66.34%   65.77%   -0.57%     
==========================================
  Files          71       81      +10     
  Lines        7961     6426    -1535     
==========================================
- Hits         5282     4227    -1055     
+ Misses       2378     1898     -480     
  Partials      301      301              

☔ View full report in Codecov by Sentry.
📢 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.

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.

2 participants