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

feat: add support for gke clusterclass #1442

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

salasberryfin
Copy link
Contributor

@salasberryfin salasberryfin commented Mar 11, 2025

Still work-in-progress but would appreciate any comments/reviews.

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds support for managed clusters (GKE) provisioning using ClusterClass, implementing the template types required to satisfy the CAPI contract.

Pending: adding e2e tests and sample templates

Which issue(s) this PR fixes:
Fixes #1387

Special notes for your reviewer:

Changes affect the experimental GKE feature which hopefully helps with publishing changes in the API.

Follow-ups:

  • Add documentation to book.
  • Support MachinePools

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Experimental feature GKE now supports provisioning via ClusterClass

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: salasberryfin
Once this PR has been reviewed and has the lgtm label, please assign dims for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 11, 2025
Copy link

netlify bot commented Mar 11, 2025

Deploy Preview for kubernetes-sigs-cluster-api-gcp ready!

Name Link
🔨 Latest commit f8cd86f
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-gcp/deploys/67d94c3c25cf500008facc74
😎 Deploy Preview https://deploy-preview-1442--kubernetes-sigs-cluster-api-gcp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@salasberryfin salasberryfin force-pushed the gke-clusterclass-support branch 3 times, most recently from 29808fb to 93c4e3d Compare March 13, 2025 10:02
@salasberryfin salasberryfin changed the title WIP: feat: add support for gke clusterclass feat: add support for gke clusterclass Mar 13, 2025
@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 Mar 13, 2025
@salasberryfin salasberryfin marked this pull request as ready for review March 13, 2025 10:06
@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 Mar 13, 2025
@k8s-ci-robot k8s-ci-robot requested a review from damdo March 13, 2025 10:06
@salasberryfin salasberryfin force-pushed the gke-clusterclass-support branch 6 times, most recently from 833f5a4 to 8def4a9 Compare March 13, 2025 14:16
@salasberryfin salasberryfin changed the title feat: add support for gke clusterclass WIP: feat: add support for gke clusterclass Mar 13, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 13, 2025
@salasberryfin salasberryfin force-pushed the gke-clusterclass-support branch 3 times, most recently from 7856476 to 36977fa Compare March 17, 2025 12:20
@salasberryfin salasberryfin changed the title WIP: feat: add support for gke clusterclass feat: add support for gke clusterclass Mar 18, 2025
@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 Mar 18, 2025
var _ webhook.Validator = &GCPManagedClusterTemplate{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
func (r *GCPManagedClusterTemplate) ValidateCreate() (admission.Warnings, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need a webhook if it's empty?

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 think GCPManagedClusterTemplate needs to implement ValidateCreate, ValidateUpdate and ValidateDelete to be used as Validator.

@salasberryfin salasberryfin force-pushed the gke-clusterclass-support branch from 36977fa to 7e60a2b Compare March 18, 2025 10:17
@salasberryfin salasberryfin force-pushed the gke-clusterclass-support branch from 7e60a2b to f8cd86f Compare March 18, 2025 10:34
@k8s-ci-robot
Copy link
Contributor

@salasberryfin: 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-apidiff f8cd86f link false /test pull-cluster-api-provider-gcp-apidiff
pull-cluster-api-provider-gcp-e2e-test f8cd86f link true /test pull-cluster-api-provider-gcp-e2e-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

GKE ClusterClass support
3 participants