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

⚠️ in-place propagation support for KCP #8057

Merged

Conversation

ykakarap
Copy link
Contributor

@ykakarap ykakarap commented Feb 4, 2023

What this PR does / why we need it:

This PR implements the in-place propagation behavior for KCP.
The PR contains the following features:

  • Changes to in-place propagation fields in KCP will not trigger a machine rollout
  • Changes to in-place propagation fields in KCP are synced to the target Machines, InfraMachines and KubeadmConfigs
    • Example: A user can changekcp.spec.machineTemplate.metadata.labels without triggering a rollout and the changes will be passed down to the target Machines.

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 #

Part of #7731

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

ykakarap commented Feb 6, 2023

/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-workload-upgrade-1-26-latest-main

@sbueringer
Copy link
Member

General approach seems fine to me

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 8, 2023
@ykakarap ykakarap changed the title ✨ [WIP][Experiment] in-place propagation from KCP to Machines ✨ [WIP]in-place propagation from KCP to Machines Feb 15, 2023
@ykakarap ykakarap changed the title ✨ [WIP]in-place propagation from KCP to Machines ⚠️ [WIP]in-place propagation from KCP to Machines Feb 15, 2023
@ykakarap ykakarap force-pushed the node-label_kcp-machine-in-place branch 2 times, most recently from 48f3890 to c275414 Compare February 15, 2023 05:10
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 15, 2023
@fabriziopandini
Copy link
Member

@ykakarap I made a first pass and I have really appreciated the consistency of this work with other PRs of the same effort, also, the implementation is really straightforward, so I'm looking forward to see the unit test and making a final pass soon

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 16, 2023
@ykakarap ykakarap force-pushed the node-label_kcp-machine-in-place branch from 61e1ab0 to 8f1b10a Compare February 16, 2023 09:15
Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

Was just taking a quick look and left some comments that might still be useful, even though the PR is WIP ;)

controllers/external/util.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/controllers/controller.go Outdated Show resolved Hide resolved
@ykakarap ykakarap force-pushed the node-label_kcp-machine-in-place branch from ef0f708 to 4a1d1a3 Compare February 28, 2023 10:23
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2023
@ykakarap ykakarap changed the title ⚠️ [WIP]in-place propagation from KCP to Machines ⚠️ in-place propagation support for KCP Feb 28, 2023
Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

Overall looks good to me.

Let's just please move the unrelated test changes that we don't have to do in this PR to a separate PR. Otherwise I think it will take longer to get this PR merged.

internal/util/ssa/filterintent.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/filters.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/controllers/controller.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/controllers/controller.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/controllers/helpers_test.go Outdated Show resolved Hide resolved
@ykakarap ykakarap force-pushed the node-label_kcp-machine-in-place branch from 4a1d1a3 to c5488b4 Compare March 1, 2023 02:23
@ykakarap
Copy link
Contributor Author

ykakarap commented Mar 1, 2023

/test ?

@k8s-ci-robot
Copy link
Contributor

@ykakarap: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-build-main
  • /test pull-cluster-api-e2e-main
  • /test pull-cluster-api-test-main
  • /test pull-cluster-api-test-mink8s-main
  • /test pull-cluster-api-verify-main

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-apidiff-main
  • /test pull-cluster-api-e2e-full-main
  • /test pull-cluster-api-e2e-informing-ipv6-main
  • /test pull-cluster-api-e2e-informing-main
  • /test pull-cluster-api-e2e-scale-main-experimental
  • /test pull-cluster-api-e2e-workload-upgrade-1-26-latest-main

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-apidiff-main
  • pull-cluster-api-build-main
  • pull-cluster-api-e2e-informing-ipv6-main
  • pull-cluster-api-e2e-informing-main
  • pull-cluster-api-e2e-main
  • pull-cluster-api-test-main
  • pull-cluster-api-test-mink8s-main
  • pull-cluster-api-verify-main

In response to this:

/test ?

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 Author

ykakarap commented Mar 1, 2023

/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-workload-upgrade-1-26-latest-main

@sbueringer
Copy link
Member

Just a few nits and only in tests and error messages

Nice work!!

/assign @fabriziopandini

@ykakarap ykakarap force-pushed the node-label_kcp-machine-in-place branch from c5488b4 to a535e78 Compare March 2, 2023 02:02
@ykakarap
Copy link
Contributor Author

ykakarap commented Mar 2, 2023

/retest

@ykakarap
Copy link
Contributor Author

ykakarap commented Mar 2, 2023

/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-workload-upgrade-1-26-latest-main

// some parts of the controller that need SSA as the current test setup does not
// support SSA. This flag should be dropped after all affected tests are migrated
// to envtest.
disableInPlacePropagation bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a follow-up item in the umbrella issue to drop this and migrate the affected tests to envtest.

Copy link
Member

Choose a reason for hiding this comment

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

👍

@sbueringer
Copy link
Member

sbueringer commented Mar 2, 2023

Thank you very much! Great work and clean implementation.

And as in the previous PRs good improvements across the board in terms of general quality (go doc, tests, ...)
Nice!

/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 2, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 23c88c1661b4bc56d50556e665d4c3340ad65539

@fabriziopandini
Copy link
Member

Great work!
/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 2, 2023
@k8s-ci-robot k8s-ci-robot merged commit 3813555 into kubernetes-sigs:main Mar 2, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.4 milestone Mar 2, 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. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants