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

Enable taints support in snow #2327

Merged
merged 3 commits into from
Jun 14, 2022
Merged

Conversation

jiayiwang7
Copy link
Member

@jiayiwang7 jiayiwang7 commented Jun 3, 2022

Issue #, if available:

#1574

Description of changes:

Add taints support for snow provider. Need to recreate KubeadmConfigTemplate and SnowMachineTemplate whenever worker node group's taints are updated.

Testing (if applicable):

unit tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 3, 2022
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #2327 (914528e) into main (20ab30a) will increase coverage by 0.10%.
The diff coverage is 88.34%.

@@            Coverage Diff             @@
##             main    #2327      +/-   ##
==========================================
+ Coverage   56.23%   56.33%   +0.10%     
==========================================
  Files         304      305       +1     
  Lines       24676    24740      +64     
==========================================
+ Hits        13876    13937      +61     
- Misses       9507     9509       +2     
- Partials     1293     1294       +1     
Impacted Files Coverage Δ
pkg/providers/snow/objects.go 81.89% <82.08%> (+2.72%) ⬆️
pkg/clusterapi/apibuilder.go 93.20% <100.00%> (+0.10%) ⬆️
pkg/clusterapi/fetch.go 100.00% <100.00%> (ø)
pkg/clusterapi/name.go 89.28% <100.00%> (+1.78%) ⬆️
pkg/providers/snow/apibuilder.go 84.87% <100.00%> (+0.20%) ⬆️
pkg/providers/snow/fetch.go 100.00% <100.00%> (ø)
pkg/providers/tinkerbell/hardware/csv.go 75.67% <0.00%> (+13.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20ab30a...914528e. Read the comment docs.

pkg/providers/snow/apibuilder_test.go Outdated Show resolved Hide resolved
pkg/providers/snow/fetch.go Outdated Show resolved Hide resolved
pkg/providers/snow/fetch.go Outdated Show resolved Hide resolved
}

func recreateKubeadmConfigTemplateNeeded(new, old *bootstrapv1.KubeadmConfigTemplate) bool {
return !v1alpha1.TaintsSliceEqual(new.Spec.Template.Spec.JoinConfiguration.NodeRegistration.Taints, old.Spec.Template.Spec.JoinConfiguration.NodeRegistration.Taints)
Copy link
Member

Choose a reason for hiding this comment

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

can we just compare new.Spec and old.Spec? That would make this a bit more future proof

Copy link
Member Author

@jiayiwang7 jiayiwang7 Jun 13, 2022

Choose a reason for hiding this comment

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

not all fields in spec trigger machine recreate, meaning no new kubeadmconfigtemplate created

Copy link
Member Author

Choose a reason for hiding this comment

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

chatted w folks offline -- we are treating kubeadmconfigtemplate immutable. Refer: #189 (comment)

pkg/providers/snow/objects_test.go Outdated Show resolved Hide resolved
# Conflicts:
#	pkg/clusterapi/apibuilder.go
#	pkg/clusterapi/apibuilder_test.go
#	pkg/clusterapi/identity_test.go
pkg/clusterapi/fetch.go Outdated Show resolved Hide resolved
pkg/clusterapi/fetch.go Outdated Show resolved Hide resolved
pkg/clusterapi/fetch_test.go Outdated Show resolved Hide resolved
@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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:

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

@eks-distro-bot eks-distro-bot merged commit 028f19b into aws:main Jun 14, 2022
@jiayiwang7 jiayiwang7 deleted the taints-snow branch June 28, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants