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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 fix node label propagation #8427

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
We started using SSA to patch nodes when doing machine->label propagation, but we discovered that there is an issue in node.Status.Address that has a merge key that is not sufficiently unique, which can cause data corruption when it is merged. The issue was seen previously in kubernetes/kubernetes#79391

So are are reverting to SSA to a strategic merge patch + an annotation to keep track of labels propagated from machine to node which is required to properly handle the deletion use case

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #8417

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 30, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 30, 2023
@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

@killianmuldoon
Copy link
Contributor

/retest

1 similar comment
@killianmuldoon
Copy link
Contributor

/retest

@fabriziopandini
Copy link
Member Author

@ykakarap thanks for the detailed review, all comment addressed

@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Just nits

api/v1beta1/common_types.go Outdated Show resolved Hide resolved
docs/book/src/reference/labels_and_annotations.md Outdated Show resolved Hide resolved
internal/controllers/machine/machine_controller_noderef.go Outdated Show resolved Hide resolved
internal/controllers/machine/machine_controller_noderef.go Outdated Show resolved Hide resolved
internal/controllers/machine/machine_controller_noderef.go Outdated Show resolved Hide resolved
internal/controllers/machine/machine_controller_noderef.go Outdated Show resolved Hide resolved
@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

@killianmuldoon
Copy link
Contributor

One last nit then looks good to me

@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-e2e-full-main
@killianmuldoon @ykakarap commit addressed + squashed, PTAL

@ykakarap
Copy link
Contributor

/cherry-pick release-1.4

@k8s-infra-cherrypick-robot

@ykakarap: once the present PR merges, I will cherry-pick it on top of release-1.4 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ykakarap
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f60110c36293b3992df4a70855f4a64efe7c7ccf

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm

@fabriziopandini
Copy link
Member Author

We are waiting for a last test in Azure to complete, then we are going to merge this

@CecileRobertMichon
Copy link
Contributor

/approve

Tests for Ipv6 and dual stack both passed on the test CAPZ PR. Opened a separate issue/PR to fix the MachinePool delay causing flakes: #8442 / #8443

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 31, 2023
@k8s-ci-robot k8s-ci-robot merged commit b44bdb5 into kubernetes-sigs:main Mar 31, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Mar 31, 2023
@k8s-infra-cherrypick-robot

@ykakarap: new pull request created: #8444

In response to this:

/cherry-pick release-1.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@johannesfrey
Copy link
Contributor

/area machine

@k8s-ci-robot k8s-ci-robot added the area/machine Issues or PRs related to machine lifecycle management label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/machine Issues or PRs related to machine lifecycle management cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CAPI 1.4.0: SSA patch fails when trying to apply labels to node with duplicate fields
7 participants