cluster-api-provider-gcp
cluster-api-provider-gcp copied to clipboard
Adding GCPMachinePool Functionality
What type of PR is this? /kind feature
What this PR does / why we need it: This PR Implements GCPMachinePool using Managed Instance Groups. This is needed to support the CAPI MachinePools object. Feature will allow cluster operators to deploy GCP MIG's to their CAPG clusters to take advantage of both Google Autoscaling of Compute Instances or utilizing cluster autoscaler to dynamically provision node resources.
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 #297,#1005
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:
- [X] squashed commits
- [ ] includes documentation
- [ ] adds unit tests
Release note:
Feature: adds MachinePool/GCPMachinePool Objects to deploy Managed Instance Group services.
Welcome @BrennenMM7!
It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-gcp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/cluster-api-provider-gcp has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @BrennenMM7. 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.
@BrennenMM7: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.
In response to this:
/ok-to-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.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: BrennenMM7 Once this PR has been reviewed and has the lgtm label, please ask for approval from cpanato. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle rotten - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
Deploy Preview for kubernetes-sigs-cluster-api-gcp ready!
| Name | Link |
|---|---|
| Latest commit | 3f4e888dcf9748820c0c2b5c0ac27069248f4691 |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-cluster-api-gcp/deploys/664b768b53ff470008c520a0 |
| Deploy Preview | https://deploy-preview-901--kubernetes-sigs-cluster-api-gcp.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
I've had a chat during the CAPG meeting with @BrennenMM7.
@BrennenMM7 and team would like some thoughts on the overall design of the API, mainly from maintainers. Once that is agreed on they can write E2Es to prove this works and ensure regression checks on future changes.
/cc. @cpanato @richardcase @dims
PR needs rebase.
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-sigs/prow repository.
@BrennenMM7 this will need a rebase :)
need rebase
@damdo @cpanato PR has been rebased thanks 💯
@BrennenMM7: The following tests 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-provider-gcp-verify | 3f4e888dcf9748820c0c2b5c0ac27069248f4691 | link | true | /test pull-cluster-api-provider-gcp-verify |
| pull-cluster-api-provider-gcp-test | 3f4e888dcf9748820c0c2b5c0ac27069248f4691 | link | true | /test pull-cluster-api-provider-gcp-test |
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.
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-sigs/prow repository. I understand the commands that are listed here.
PR needs rebase.
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-sigs/prow repository.
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Reopen this PR with
/reopen - Mark this PR as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closed this PR.
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closedYou can:
- Reopen this PR with
/reopen- Mark this PR as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
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-sigs/prow repository.
/reopen
@damdo: Reopened this PR.
In response to this:
/reopen
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-sigs/prow repository.
/remove-lifecycle rotten
Hey @BrennenMM7. We discussed previously the fact that we do not want to create a Kubeadm dependency, which was an issue with other providers too. I think we can do something similar to what CAPZ did here which decouples the MachinePool reconciler from Kubeadm. What do you think?
@salasberryfin 👋 Yeah this looks good, I can easily port my changes to support this, I'll update and rebase this PR this week.
Hey @BrennenMM7, would you be able to update this PR?
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
Thanks @aslafy-z. I think this is a relevant feature that should be supported by the provider but I see there's not much activity in this PR. @BrennenMM7, could you take a look at this?
@salasberryfin 👋 Hey sorry for the inactive PR, I no longer have access to the same resources for CAPG development. I can pull forward my PR and try to add the previous items about agnostic bootstrap providers. However testing E2E would be under my own dime so best I can do is a test suite.
For reference, this is a PR to abstract the same mechanism in CAPV: https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/5416
Thanks for doing this @BrennenMM7 . I rebased and made a few very small tweaks and was able to get this working at head: https://github.com/kubernetes-sigs/cluster-api-provider-gcp/compare/main...justinsb:cluster-api-provider-gcp:tweak_gcp_machine_pool
I did have three suggestions/questions above (do we want to drain / should we use GCPMachine / do we need to block on kubeadm abstraction). But I propose that as this feature is experimental, we should merge and iterate. Maybe the GCPMachine vs GCPMachinePoolMachine is more blocking because it's a schema change...
In terms of landing this, I'm happy to create a PR with these commits as the start (keeping the author on them and more clearly marking things I had to change), or I can rebase and just make myself a Co-Author so that @BrennenMM7 gets the main credit (having done the bulk of the work here). I'll have to rebase anyway I believe so even in the first approach these commits will be changed a bit (I think).
@justinsb 👋 Super awesome to see a Google dev in the CAPG project. Thanks for picking up where I left this PR, I have had zero time/resources to pull this thing forward to head. Your branch looks solid to me, thanks for leaving me as a co-author.
I agree with you iteration is how I normally approach my projects, so the dropping of support for N number of bootstrap providers for someone to add the logic in later seems like the best approach to finally get this thing merged as a feature. However I more or less was just following the thread of maintainers in the project.
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale