-
Notifications
You must be signed in to change notification settings - Fork 209
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
Adding GCPMachinePool Functionality #901
base: main
Are you sure you want to change the base?
Conversation
Welcome @BrennenMM7! |
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 Once the patch is verified, the new status will be reflected by the 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 In response to this:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
/assign @richardcase
thanks for your PR, an initial comments
7187b6d
to
08edce3
Compare
08edce3
to
dbffc56
Compare
45b2b1a
to
caf5243
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BrennenMM7 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
need rebase |
4cf6e2b
to
4528f81
Compare
@BrennenMM7: The following tests failed, say
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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:
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:
You can:
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: kubernetes-sigs/cluster-api-provider-azure#5416 |
|
||
if s.scope.GCPMachinePoolMachine.Status.ProvisioningState != v1beta1.Deleting { | ||
log.Info("Deleting instance", "instance", s.scope.Name()) | ||
// Cordon and drain the node before deleting the instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Draining is nice, but my understanding is that e.g. CAPA doesn't do this. Would we be the first here?
Also, as this is at the kube level, shouldn't drain be done by the Machine controller (from an architectural standpoint)?
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status" | ||
|
||
// GCPMachinePoolMachine is the Schema for the GCPMachinePoolMachines API and represents a GCP Machine Pool. | ||
type GCPMachinePoolMachine struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Should this just be a GCPMachine? e.g. a Pod in a StatefulSet is still a Pod.
). | ||
// watch for changes in KubeadmConfig to sync bootstrap token | ||
Watches( | ||
&kubeadmv1.KubeadmConfig{}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest this should not block an implementation under exp
, it can always be added later (and that is what we are doing in other providers).
Thanks for doing this @BrennenMM7 . I rebased and made a few very small tweaks and was able to get this working at head: 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). |
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:
Release note: