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

Sync node labels and taints #4

Merged
merged 50 commits into from
Jan 8, 2021
Merged

Sync node labels and taints #4

merged 50 commits into from
Jan 8, 2021

Conversation

annismckenzie
Copy link
Owner

@annismckenzie annismckenzie commented Jan 4, 2021

This closes #5.

@annismckenzie annismckenzie self-assigned this Jan 4, 2021
@annismckenzie annismckenzie force-pushed the sync-node-labels branch 2 times, most recently from 39929d1 to b803fd9 Compare January 4, 2021 14:10
@annismckenzie annismckenzie changed the title Sync node labels Sync node labels and taints Jan 5, 2021
@annismckenzie annismckenzie added this to the v0.1 Initial release milestone Jan 5, 2021
@annismckenzie annismckenzie force-pushed the sync-node-labels branch 2 times, most recently from 2e990b4 to 587230f Compare January 6, 2021 22:04
@annismckenzie annismckenzie marked this pull request as ready for review January 8, 2021 00:51
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Owner Author

@annismckenzie annismckenzie left a comment

Choose a reason for hiding this comment

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

A couple nits that need to be addressed but overall this looks good.

README.md Outdated Show resolved Hide resolved
controllers/config/k3osconfig_controller.go Outdated Show resolved Hide resolved
controllers/config/k3osconfig_controller.go Outdated Show resolved Hide resolved
controllers/config/k3osconfig_controller.go Outdated Show resolved Hide resolved
controllers/config/k3osconfig_controller.go Outdated Show resolved Hide resolved
controllers/config/k3osconfig_setup.go Show resolved Hide resolved
pkg/util/taints/taints.go Outdated Show resolved Hide resolved
pkg/util/taints/taints.go Show resolved Hide resolved
pkg/util/taints/taints.go Show resolved Hide resolved
pkg/nodes/labeler.go Outdated Show resolved Hide resolved
annismckenzie and others added 23 commits January 8, 2021 11:37
…ed from

For now it’s from the environment via the downward API but this might
change and the reconciler should not care when this changes.
This is another approach to handle terminal errors in a reconciler.
For the case where an object was deleted (like the node, the secret or
the K3OSConfig CR object) we have to return a nil error to the caller
so that our reconciler isn’t called anymore. I might flesh this out
more in the future with some functional options to configure the
response error further. For now, this will do.
…conciler

There’s now a couple more smaller methods to make this easier to read,
understand and test.
This removes the need for the nasty panic I added earlier.
This cuts down on the amount of parameters these need to lug around.
This way we can change the implementation of that and the rest of the
code doesn’t need to care.
This creates metadata-only watches on our secret (filtered by the
unique label it has) as well as the node the current instance is
running on. It’s pretty light on the network and the memory but boy
was this a pain to set up. 🤞 that it works correctly.
We’re using the context everywhere so enabling this should be safe.
This feature has been on by default since v1.14 and this operator was
never deployed anywhere.
This includes about the same number of tests as the node label
reconciler but the implementation is more complex because of the
fact that taints have a lot more intricacies than labels.
This mostly deals with updates to comments and removing dead code.
This handles IsNotFound, IsGone and IsForbidden API server error
responses.
1. k3OS cluster that's running nominally
2. A (local) directory of YAML files as describes in https://github.com/sgielen/picl-k3os-image-generator#getting-started:
1. A k3OS cluster that's running [nominally](https://joshdance.medium.com/what-does-nominal-mean-when-spacex-mission-control-says-it-39c2d249da27#:~:text=performing%20or%20achieved%20within%20expected,within%20expected%20and%20acceptable%20limits.).
2. A local clone of https://github.com/sgielen/picl-k3os-image-generator.
Copy link
Owner Author

Choose a reason for hiding this comment

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

This will probably have to point to my fork to work.

@annismckenzie
Copy link
Owner Author

This is done – merging. :shipit: :shipit: :shipit:

@annismckenzie annismckenzie merged commit 01502d6 into main Jan 8, 2021
@annismckenzie annismckenzie deleted the sync-node-labels branch January 8, 2021 10:43
@annismckenzie annismckenzie added enhancement New feature or request go Pull requests that update Go code labels Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync labels and taints
1 participant