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

Refactor node annotations #23772

Merged
merged 1 commit into from Feb 22, 2023
Merged

Conversation

marseel
Copy link
Contributor

@marseel marseel commented Feb 15, 2023

Refactor node annotations and add function for removing node's annotations.

Related: #22306

@marseel marseel requested review from a team as code owners February 15, 2023 11:02
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 15, 2023
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Feb 15, 2023
marseel added a commit to marseel/cilium-cli that referenced this pull request Feb 15, 2023
Related PR: cilium/cilium#23772

Signed-off-by: Marcel Zięba <marseel@gmail.com>
daemon/cmd/daemon.go Outdated Show resolved Hide resolved
@@ -1192,7 +1192,15 @@ func newDaemon(ctx context.Context, cleaner *daemonCleanup,
node.GetInternalIPv4Router(), node.GetIPv6Router())
if err != nil {
log.WithError(err).Warning("Cannot annotate k8s node with CIDR range")
} else {
cleaner.cleanupFuncs.Add(func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should only do this if, as mentioned in the original issue, clean-cilium-state is set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, I removed this part and only pushed refactoring + new function for removing node annotations. I will work on this in separate PR.

marseel added a commit to marseel/cilium-cli that referenced this pull request Feb 16, 2023
Related PR: cilium/cilium#23772

Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
marseel added a commit to marseel/cilium-cli that referenced this pull request Feb 20, 2023
Related PR: cilium/cilium#23772

Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
@marseel marseel changed the title Remove node's annotations that have been added by Cilium Refactor node annotations Feb 21, 2023
package k8s

import (
"github.com/cilium/cilium/pkg/annotation"
Copy link
Contributor

Choose a reason for hiding this comment

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

got a linting error here. i think this should fix it:

goimports -w -local github.com/cilium/cilium/pkg/annotation pkg/k8s/annotate_test.go

…tions.

Related: cilium#22306

Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
@marseel
Copy link
Contributor Author

marseel commented Feb 21, 2023

/test

tklauser pushed a commit to cilium/cilium-cli that referenced this pull request Feb 21, 2023
Related PR: cilium/cilium#23772

Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
Copy link
Contributor

@thorn3r thorn3r left a comment

Choose a reason for hiding this comment

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

LGTM!
CI hit a flake tracked here: #23845

@thorn3r thorn3r requested a review from squeed February 21, 2023 18:39
@squeed squeed added the release-note/misc This PR makes changes that have no direct user impact. label Feb 22, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 22, 2023
@squeed squeed added dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. and removed kind/community-contribution This was a contribution made by a community member. labels Feb 22, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 22, 2023
@squeed
Copy link
Contributor

squeed commented Feb 22, 2023

Agreed; that seems to be a known flake. Marking as ready-to-merge.

@squeed squeed added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 22, 2023
@pchaigno pchaigno merged commit cf03f13 into cilium:master Feb 22, 2023
@christarazi christarazi added the sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. label Apr 1, 2023
michi-covalent pushed a commit to michi-covalent/cilium that referenced this pull request May 30, 2023
Related PR: cilium#23772

Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants