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

✨ Update to Cluster API 1.6 #691

Merged
merged 3 commits into from
Dec 20, 2023
Merged

Conversation

cprivitere
Copy link
Member

@cprivitere cprivitere commented Dec 18, 2023

What this PR does / why we need it:

  • breaking: remove linux/armv7 builds cause they're slow
  • feat: profiling
    • add flags for profiling
    • process profiling and tls options
    • NOTE: actual profiling may still need more work, this is mostly focused on handling flags
    • add flags support for secure metrics server
    • switch default metrics server to secured
  • refactor: main.go
    • use infrav1 instead of infrav1beta1 in main.go
    • functionize inits of webhooks, reconcilers and health checks in
    • don't set ctrl options in line for better readability
    • use caching for namespace watches
    • process restconfig options
  • test: e2e test signature update for 1.6 compatibility
  • refactor: machine controller and scope
    • remove instance id
    • get rid of getproviderid()
    • add providerid()
    • add deviceid which is providerid without prefix
    • use deviceid for all api calls
  • fix: add RBAC rules for kubebuilder
  • fix: fix controller gen calls in makefile
    • don't need two calls
    • include main.go
    • add cleanup like upstream has
  • fix: use real context in metal-go calls
  • doc: Add v0.8.x upgrade notes
  • chore: device/provider id usage now is more similar to upstream and other providers
  • chore: run make generate
  • chore: use new capi preferred api registration scheme
  • chore: use packet device id string as provider id (upstream removed noderefutil wrapped provider ids)
  • chore: metadata updates for 1.6 e2e tests
  • chore: bump calico to 3.27
  • chore: Bump kube-vip version to 0.6.4
  • chore: Bump CPEM to 3.7.0
  • chore: update readme explain tag changes

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 #687

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 18, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 18, 2023
@cprivitere cprivitere force-pushed the capi-1.6 branch 2 times, most recently from 6ad4a57 to aa55611 Compare December 18, 2023 21:11
breaking: remove linux/armv7 builds cause they're slow
feat: profiling
- add flags for profiling
- process profiling and tls options
- NOTE: actual profiling may still need more work, this is mostly focused on handling flags
- add flags support for secure metrics server
- switch default metrics server to secured
refactor: main.go
    - use infrav1 instead of infrav1beta1 in main.go
    - functionize inits of webhooks, reconcilers and health checks in
    - don't set ctrl options in line for better readability
    - use caching for namespace watches
    - process restconfig options
- e2e test signature update for 1.6 compatibility
refactor: machine controller and scope
- remove instance id
- get rid of getproviderid()
- add providerid()
- add deviceid which is providerid without prefix
- use deviceid for all api calls
- device/provider id usage now is more similar to upstream and other providers
fix: add RBAC rules for kubebuilder
fix: fix controller gen calls in makefile
    - don't need two calls
    - include main.go
    - add cleanup like upstream has
fix: use real context in metal-go calls
doc: Add v0.8.x upgrade notes
chore: run make generate
chore: use new capi preferred api registration scheme
chore: use packet device id string as provider id (upstream removed noderefutil wrapped provider ids)
chore: metadata updates for 1.6 e2e tests
chore: bump calico to 3.27
chore: Bump kube-vip version to 0.6.4
chore: Bump CPEM to 3.7.0
chore: update readme explain tag changes

Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
README.md Show resolved Hide resolved

- `CPEM_VERSION` (defaults to `v3.7.0`)
- `KUBE_VIP_VERSION` (defaults to `v0.6.4`)
- `NODE_OS` (defaults to `ubuntu_20_04`)
Copy link
Member

Choose a reason for hiding this comment

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

noting that ubuntu_22_04 images had inconcistent package configurations - some with ifupdown others with netplan

Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
@@ -436,7 +436,7 @@ func (r *PacketMachineReconciler) reconcile(ctx context.Context, machineScope *s
result = ctrl.Result{}
default:
machineScope.SetNotReady()
log.Info("Equinix Metal device state is undefined", "state", dev.GetState(), "device-id", machineScope.GetInstanceID())
log.Info("Equinix Metal device state is undefined", "state", dev.GetState(), "device-id", machineScope.ProviderID())
Copy link
Member

@displague displague Dec 20, 2023

Choose a reason for hiding this comment

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

nit: this could be .GetDeviceID() or log it as provider-id

(same on L410 and L414 above)

(looks like we already have the value in scope as deviceID, no need to call Provider() or GetDeviceID() again and again)

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
// schemeBuilder is used to add go types to the GroupVersionKind scheme.
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
Copy link
Member

Choose a reason for hiding this comment

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

This pattern and the changes to schemeBuilder, init, and objectTypes are documented at https://cluster-api.sigs.k8s.io/developer/providers/implementers-guide/create_api#registering-apis-in-the-scheme

@displague
Copy link
Member

/approve

@displague
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 20, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cprivitere, displague

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [cprivitere,displague]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 35ff463 into kubernetes-sigs:main Dec 20, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CAPI 1.6 Released - Update to support it
3 participants