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

Fix machine implementation updating #789

Merged
merged 4 commits into from
Nov 6, 2024
Merged

Conversation

makhov
Copy link
Contributor

@makhov makhov commented Oct 22, 2024

Merge and patch existing machine objects to avoid owner conflict and/or admission webhook issues

@makhov makhov force-pushed the ownership-fix branch 13 times, most recently from f071ec3 to 425d8fa Compare October 29, 2024 08:39
@makhov makhov force-pushed the ownership-fix branch 4 times, most recently from 1afa11b to 508bdc0 Compare October 31, 2024 07:48
Signed-off-by: Alexey Makhov <amakhov@mirantis.com>
Signed-off-by: Alexey Makhov <amakhov@mirantis.com>
Signed-off-by: Alexey Makhov <amakhov@mirantis.com>
@makhov makhov force-pushed the ownership-fix branch 6 times, most recently from 34cefdc to 457a0c7 Compare November 4, 2024 14:20
@makhov makhov marked this pull request as ready for review November 5, 2024 07:32
@makhov makhov requested a review from a team as a code owner November 5, 2024 07:32
return nil, err
}

resourceType := strings.ToLower(machineFromTemplate.GetKind()) + "s"
Copy link
Contributor

Choose a reason for hiding this comment

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

wdyt about find the apiresource.Name using resource kind and rely on the crd plural?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed it to more reliable way

RESTConfig *rest.Config
Scheme *runtime.Scheme
ClientSet *kubernetes.Clientset
DynamicClient dynamic.Interface
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need DynamicClient ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not anymore. Removed it, thanks!

Signed-off-by: Alexey Makhov <amakhov@mirantis.com>
@makhov makhov merged commit f2eef3d into k0sproject:main Nov 6, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants