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

Use hardware namespace and name as provider ID #177

Merged
merged 2 commits into from
May 25, 2022

Conversation

abhinavmpandey08
Copy link
Contributor

Signed-off-by: Abhinav Pandey abhinavmpandey08@gmail.com

Description

This PR changes the machine.spec.providerID to be of the format tinkerbell://{hardware.namespace}/{hardware.name} instead of using UID because UID can change if a hardware is recreated/moved and machine.spec.providerID is immutable so CAPT runs into errors like this:

E0518 23:43:49.671348       1 controller.go:317] controller/tinkerbellmachine "msg"="Reconciler error" "error"="ensuring machine dependencies: ensuring hardware: patching machine object: admission webhook \"validation.tinkerbellmachine.infrastructure.cluster.x-k8s.io\" denied the request: TinkerbellMachine.infrastructure.cluster.x-k8s.io \"abhinav-control-plane-template-1652916169789-67n5d\" is invalid: spec.providerID: Forbidden: is immutable once set" "name"="abhinav-control-plane-template-1652916169789-67n5d" "namespace"="eksa-system" "reconciler group"="infrastructure.cluster.x-k8s.io" "reconciler kind"="TinkerbellMachine"

This new providerID was suggested here: https://github.com/tinkerbell/cluster-api-provider-tinkerbell/pull/160/files#r869807167

How Has This Been Tested?

Created a cluster with the modified CAPT, performed a cluster move operation and verified that the cluster and machines were Ready and there were no errors in CAPT.

How are existing users impacted? What migration steps/scripts do we need?

No user impact

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
Copy link
Contributor

@micahhausler micahhausler left a comment

Choose a reason for hiding this comment

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

LGTM

@micahhausler micahhausler added the ready-to-merge Signal to Mergify to merge the PR. label May 25, 2022
@mergify mergify bot merged commit ee045e0 into tinkerbell:main May 25, 2022
@displague displague added this to the v0.2 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants