cluster-api-provider-gcp
cluster-api-provider-gcp copied to clipboard
Implement GCPMachinePool using MIGs
/kind feature
Describe the solution you'd like [A clear and concise description of what you want to happen.]
Implement GCPMachinePool using Managed Instance Groups. The GCPMachinePool implementation should follow the same package / group structure as CAPI and be added to the exp package, the experimental feature package. The feature should be gated using the MachinePool flag used in CAPI.
See also: kubernetes-sigs/cluster-api-provider-azure#483 and CAPI Machine Pool Proposal
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Note: As noted below in comments, the https://github.com/kubernetes-sigs/cluster-api/pull/7107 also be supported/implemented as part of this
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/lifecycle frozen /help
@detiber: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
/lifecycle frozen /help
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.
Hey, would like to work on this. Can I assign it myself?
/assign
@jayesh-srivastava just curious if you are still working on this? Myself or another colleague of mine might have some cycles to pick this up if you need any help.
@CecileRobertMichon could we also add as a requirement to this ticket that (if actually merged) the externally-managed autoscaller annotation is also supported / implemented as part of this?
@AverageMarcus added a note in description
Perfect! Thank you!
I have pinged @jayesh-srivastava via Slack and he told me that he is not able to work on this issue due to personal commitments. @evanfreed and myself are going to work on it unless there is any objection.
Pending blockers:
- https://github.com/kubernetes-sigs/cluster-api-provider-gcp/issues/643
- https://github.com/GoogleCloudPlatform/k8s-cloud-provider/pull/71
- https://github.com/kubernetes-sigs/cluster-api/pull/7107
/assign @nsilve
/unassign @jayesh-srivastava
Azure does not support any kind of templating for instance creation, so all the configuration should be included into VMSS (so into AzureMachinePool). But both AWS and GCP have discrete template resources for ASG (launch template)/MIG (instance template) so we are having the following options:
- manage GCP instance templates internally to GCP Machine Pool controller (like CAPA)
- manage GCP instance templates via a separate GCP Instance Template controller
- something else
Right now they are not managed at all since ControlPlane machines are not created via MIG, so GCPMachineTemplate configuration is passed directly to GCPMachine. Since no actual GCP Instance Template is created right now, we will need to find a solution for it if we proceed with solution 2 because we will need to create only the instance templates which are going to be used for workers created via MIG (although creating another instance template for Control Plane won't hurt anyone but it is going to be a unused resource).
Moreover, based on GCP documentation, instance templates can be used to create both virtual machine (VM) instances and managed instance groups (MIGs). That means that we could probably define GCPMachineTemplate and use them directly into GCPMachinePool (not tested)
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: GCPMachineTemplate
metadata:
name: workload
spec:
template:
spec:
image: projects/elastic-esp-dev/global/images/capi-ubuntu-2004-k8s-v1-24-1
instanceType: n2-standard-2
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: GCPMachinePool
metadata:
name: workload
spec:
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: GCPMachineTemplate
name: workload
Any ideas/comments/objections?
/remove-lifecycle frozen
Plans changed so I am afraid that I cannot proceed with that.
/unassign @nsilve
/assign