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

Implement the reconciliation loop for GCPManagedMachinePool (GKE Part 4) #789

Conversation

richardchen331
Copy link
Contributor

@richardchen331 richardchen331 commented Dec 15, 2022

What type of PR is this?
/kind feature

What this PR does / why we need it:
This change adds the reconciliation logic for the GCPManagedControlPlane.

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

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Add the reconciliation logic for **GCPManagedMachinePool**

@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. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 15, 2022
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 15, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @richardchen331. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 15, 2022
@richardchen331 richardchen331 changed the title CAPG implementation [WIP] CAPG GKE implementation Dec 15, 2022
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 15, 2022
@cpanato
Copy link
Member

cpanato commented Dec 16, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 16, 2022
@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from ff90f23 to 2071e51 Compare January 25, 2023 19:12
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 25, 2023
@richardchen331 richardchen331 changed the title [WIP] CAPG GKE implementation Implement the reconciliation loop for GCPManagedMachinePool (GKE Part 4) Jan 25, 2023
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 25, 2023
@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from e19cdc7 to bee121d Compare January 25, 2023 20:48
@richardchen331 richardchen331 marked this pull request as ready for review January 25, 2023 20:54
@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 Jan 25, 2023
@k8s-ci-robot k8s-ci-robot requested a review from cpanato January 25, 2023 20:54
@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from bee121d to ee03800 Compare January 25, 2023 21:09
Copy link
Member

@richardcase richardcase left a comment

Choose a reason for hiding this comment

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

Thanks @richardchen331 🎉

cloud/scope/managedcontrolplane.go Outdated Show resolved Hide resolved
cloud/scope/managedmachinepool.go Show resolved Hide resolved
cloud/scope/managedmachinepool.go Outdated Show resolved Hide resolved
cloud/scope/managedmachinepool.go Outdated Show resolved Hide resolved
cloud/scope/managedmachinepool.go Outdated Show resolved Hide resolved
config/manager/manager.yaml Outdated Show resolved Hide resolved
feature/feature.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@richardchen331 richardchen331 requested review from richardcase and removed request for dims and cpanato January 26, 2023 18:47
@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from bccb40b to 54bbe39 Compare January 26, 2023 22:40
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 31, 2023
Copy link
Member

@richardcase richardcase left a comment

Choose a reason for hiding this comment

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

Fantastic @richardchen331

cloud/scope/managedcontrolplane.go Outdated Show resolved Hide resolved
cloud/services/container/clusters/kubeconfig.go Outdated Show resolved Hide resolved
cloud/services/container/clusters/reconcile.go Outdated Show resolved Hide resolved
cloud/services/container/nodepools/reconcile.go Outdated Show resolved Hide resolved
cloud/services/container/nodepools/reconcile.go Outdated Show resolved Hide resolved
cloud/services/container/nodepools/reconcile.go Outdated Show resolved Hide resolved
cloud/services/container/nodepools/reconcile.go Outdated Show resolved Hide resolved
// In regional or multi-zonal clusters, this is the number of nodes per zone.
InitialNodeCount int32 `json:"initialNodeCount"`
NodeCount int32 `json:"nodeCount"`
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to expose autoscaling initially as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my plan is to get an MVP working and adding more features after the initial set of PRs are merged. let me know if that make sense :)

Copy link
Member

@richardcase richardcase Feb 7, 2023

Choose a reason for hiding this comment

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

I would agree with this approach for most features. But I wonder as this is a machinepool should we have scaling from the beginning? Feels like we should but happy to go with what you feel is best.

@richardcase
Copy link
Member

@richardchen331 - sorry for the late replay. I left 1 reply around auto-scaling. Apart from that, I think this looks good. Could you rebase and squash commits?

@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from 06f1fdc to 399fea3 Compare February 11, 2023 19:05
@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 11, 2023
@richardchen331
Copy link
Contributor Author

@richardchen331 - sorry for the late replay. I left 1 reply around auto-scaling. Apart from that, I think this looks good. Could you rebase and squash commits?

Thanks for the review! I rebased and squashed the commits (only left one additional for the autoscaling change), and add auto scaling support. Please take another look when you have time. I can squash again after it's approved :)

@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from 399fea3 to 9e9dc7f Compare February 11, 2023 20:22
@richardchen331
Copy link
Contributor Author

/test pull-cluster-api-provider-gcp-e2e-test

@richardcase
Copy link
Member

@richardchen331 - this looks great, and thanks for adding the autoscaling options initially. I think this will help. From my side, i have no further comments on the code.

Can you squash and handle the conflicting go.mod?

I will then approve :)

@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 14, 2023
@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from 9e9dc7f to 9fbafc3 Compare February 14, 2023 18:21
@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 14, 2023
@richardchen331
Copy link
Contributor Author

@richardchen331 - this looks great, and thanks for adding the autoscaling options initially. I think this will help. From my side, i have no further comments on the code.

Can you squash and handle the conflicting go.mod?

I will then approve :)

Sure. I rebased and squashed the commits. Could you help approve the PR? Thanks Richard!

@richardchen331 richardchen331 force-pushed the gke_pr_4_integrate_gcpmanagedcluster branch from 9fbafc3 to 175ba26 Compare February 14, 2023 18:23
@richardcase
Copy link
Member

/override pull-cluster-api-provider-gcp-apidiff

@k8s-ci-robot
Copy link
Contributor

@richardcase: Overrode contexts on behalf of richardcase: pull-cluster-api-provider-gcp-apidiff

In response to this:

/override pull-cluster-api-provider-gcp-apidiff

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.

@richardcase
Copy link
Member

Thanks for this @richardchen331 , great work

/lgtm

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

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

nice work

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, richardchen331

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 Feb 15, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4cdd048 into kubernetes-sigs:main Feb 15, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.1.0 milestone Feb 15, 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

4 participants