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

✨ Enable Kubernetes upgrades in CAPIM #8938

Merged

Conversation

killianmuldoon
Copy link
Contributor

Enable upgrading of Kubernetes clusters using in-memory infrastructure with CAPIM.

@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 Jun 29, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 29, 2023
Copy link
Contributor Author

@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.

/area provider/infrastructure-in-memory

@k8s-ci-robot k8s-ci-robot added area/provider/infrastructure-in-memory Issues or PRs related to the in-memory infrastructure provider needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 29, 2023
@killianmuldoon killianmuldoon force-pushed the pr-capim-upgrade-handling branch 3 times, most recently from 71c506c to a32cbda Compare July 3, 2023 11:37
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 3, 2023
@killianmuldoon killianmuldoon force-pushed the pr-capim-upgrade-handling branch 3 times, most recently from 72941e7 to 41841e7 Compare July 3, 2023 13:31
@killianmuldoon
Copy link
Contributor Author

/retitle ✨ Enable Kubernetes upgrades in CAPIM

@k8s-ci-robot k8s-ci-robot changed the title [WIP] ✨ Enable Kubernetes upgrades in CAPIM ✨ Enable Kubernetes upgrades in CAPIM Jul 3, 2023
@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 Jul 3, 2023
@killianmuldoon
Copy link
Contributor Author

This should be ready for review now. This PR doesn't add an e2e test upgrade flow - I'm not sure of the best way to do that i.e. inline in our current test or as a new scaling test case.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

great work!
just a couple of nits

@@ -117,6 +119,15 @@ func (c *cache) List(resourceGroup string, list client.ObjectList, opts ...clien
}
}

// TODO: This only matches the nodeName field for pods. No other fieldSelectors are implemented.
Copy link
Member

Choose a reason for hiding this comment

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

WDYT about returning an error when we notice another field selector?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

// TODO: This only matches the nodeName field for pods. No other fieldSelectors are implemented.
if pod, ok := obj.(*corev1.Pod); ok {
if listOpts.FieldSelector != nil && !listOpts.FieldSelector.Empty() {
if !listOpts.FieldSelector.Matches(fields.Set{"spec.nodeName": pod.Spec.NodeName}) {
Copy link
Member

Choose a reason for hiding this comment

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

Is there any way to check that the "incoming" field selector is the one we think it is?

(maybe I'm misreading this entire statement)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like to take this as a follow-up for now. I'm not sure what else this might break currently.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good

Looks like I basically added the same comment twice 😂

Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
@fabriziopandini
Copy link
Member

/lgtm
great work!

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

LGTM label has been added.

Git tree hash: a3d6d7a020e340c6290020a704d35d52a2a24fb5

@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 Jul 5, 2023
@k8s-ci-robot k8s-ci-robot merged commit ea92e68 into kubernetes-sigs:main Jul 5, 2023
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jul 5, 2023
@killianmuldoon killianmuldoon mentioned this pull request Jul 6, 2023
27 tasks
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/provider/infrastructure-in-memory Issues or PRs related to the in-memory infrastructure provider 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.

None yet

4 participants