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

✨ Add Server Side Apply helper to the topology controller #6495

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
This PR makes the topology controller use server-side apply when applying changes, so we can leverage on the API server for handling controllers co-authoring the same object as described in https://kubernetes.io/docs/reference/using-api/server-side-apply/

Which issue(s) this PR fixes:
Fixes #6320

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 10, 2022
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 10, 2022
@fabriziopandini fabriziopandini force-pushed the topology-ssa branch 2 times, most recently from 6bbb9e9 to 796d296 Compare May 10, 2022 18:42
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

First observations

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 30, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2022
@fabriziopandini fabriziopandini changed the title [WIP] ✨ Add Server Side Apply helper to the topology controller ✨ Add Server Side Apply helper to the topology controller Jun 3, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 3, 2022
@fabriziopandini
Copy link
Member Author

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

@sbueringer
Copy link
Member

sbueringer commented Jun 4, 2022

/test pull-cluster-api-e2e-full-main
(probably flake)
/test pull-cluster-api-test-mink8s-main
(not so sure, maybe because of Kubernetes 1.19, looks like it broke with commit b5d1d11)

@fabriziopandini
Copy link
Member Author

In order to fix pull-cluster-api-test-mink8s-main failures it is required to bump the min k8s version supported by Cluster API to get a Kubernetes fix that merged in 1.20 (kubernetes/kubernetes#95836)
We are considering if to add an additional restriction or a warning when using CC, to require management cluster >= v1.22 (the version where SSA went GA)

@chrischdi
Copy link
Member

@fabriziopandini: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-e2e-full-main 56a0d3a link false /test pull-cluster-api-e2e-full-main
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Expected that, currently analyzing this error so we can solve it 👍

TLDR: clusterctl move screws up the managed fields and thus leads to an additional rollout (topology controller detects changes due to missing managed fields, which leads to template rotation)

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.

One comment, otherwise looks good as far as I can tell :) (+/- open conversations)

cmd/clusterctl/client/cluster/mover.go Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-topology-plan.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-topology-plan.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-topology-plan.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-topology-plan.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-topology-plan.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/v1.1-to-v1.2.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/v1.1-to-v1.2.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/v1.1-to-v1.2.md Outdated Show resolved Hide resolved
internal/contract/types.go Outdated Show resolved Hide resolved
internal/contract/types.go Outdated Show resolved Hide resolved
internal/contract/types.go Outdated Show resolved Hide resolved
@chrischdi
Copy link
Member

Just 3 typos 🎉
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 10, 2022
@sbueringer
Copy link
Member

Really great work! lgtm pending the 3 nits + squash from my side

Co-authored-by: chrischdi <schlotterc@vmware.com>
Co-authored-by: sbueringer <buringerst@vmware.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 10, 2022
@sbueringer
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 10, 2022
@fabriziopandini
Copy link
Member Author

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

@vincepri
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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 Jun 10, 2022
@k8s-ci-robot k8s-ci-robot merged commit 94fd5cd into kubernetes-sigs:main Jun 10, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.2 milestone Jun 10, 2022
@fabriziopandini fabriziopandini deleted the topology-ssa branch June 11, 2022 11:25
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.

capi-controller-manager continously patches AWSCluster object when using ClusterClass
5 participants