-
Notifications
You must be signed in to change notification settings - Fork 431
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
Add ClusterClass Support for Managed Clusters #4155
Add ClusterClass Support for Managed Clusters #4155
Conversation
/test pull-cluster-api-provider-azure-e2e-optional |
func (m *AzureManagedControlPlane) validateVersion(_ client.Client) error { | ||
if !kubeSemver.MatchString(m.Spec.Version) { | ||
return errors.New("must be a valid semantic version") | ||
func validateVersion(version string, fldPath *field.Path) field.ErrorList { |
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.
Refactored these webhook validation functions to be usable by the template types
} | ||
|
||
// validateLastSystemNodePool is used to check if the existing system node pool is the last system node pool. | ||
// If it is a last system node pool it cannot be deleted or mutated to user node pool as AKS expects min 1 system node pool. | ||
func (m *AzureManagedMachinePool) validateLastSystemNodePool(cli client.Client) error { | ||
func validateLastSystemNodePool(cli client.Client, labels map[string]string, namespace string) error { |
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.
Refactored these functions for the same purpose as above ^^
8a22191
to
04c455e
Compare
04c455e
to
1b5519d
Compare
/assign |
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.
This is looking good! Here's some comments from a first pass. It seems like most of it is template stuff, so I think if we can get all the tests passing, we can consider the templates to be good to go.
templates/test/ci/prow-aks-clusterclass/patches/aks-clusterclass-pool1.yaml
Outdated
Show resolved
Hide resolved
/retest |
/assign @nojnhuh |
/assign |
Not sure what's going on, but looks like the E2E test is having trouble applying the cluster template. It was working before but I made some updates to the webhoook validation since. Will be debugging this |
7f66d45
to
322243d
Compare
Fixed! |
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.
Still working through this, but wanted to share what I had so far.
46c2516
to
20bad8e
Compare
LGTM label has been added. Git tree hash: 8bb8429606aaa9c36a8f27c4995b47a0d54b3434
|
ce7d6b8
to
224b7dc
Compare
@@ -170,4 +170,6 @@ const ( | |||
AzureManagedControlPlaneKind = "AzureManagedControlPlane" | |||
// AzureClusterIdentityKind indicates the kind of an AzureClusterIdentity. | |||
AzureClusterIdentityKind = "AzureClusterIdentity" | |||
// AzureNetworkPluginName is the name of the Azure network plugin. | |||
AzureNetworkPluginName = "azure" |
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.
nit: can we move this out of that const block, it's not a Kind so doesn't belong with the others
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.
can do in follow up
return nil, mcp.validateManagedControlPlaneTemplate(mcpw.Client) | ||
} | ||
|
||
return nil, apierrors.NewInvalid(GroupVersion.WithKind("AzureManagedControlPlaneTemplate").GroupKind(), mcp.Name, allErrs) |
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.
now that we have consts for kinds, would be good to also use constants for these new kinds
Can be a follow up since that other PR just merged
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.
/lgtm
/approve
/hold cancel
@willie-yao let's merge this to get it into the release. Can you please open a follow-up PR to include the new kinds as constants following #4233 ?
LGTM label has been added. Git tree hash: 9b2c6cf19c88392c511758bfef11333d9e2f4744
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon 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 |
Will do, thanks! |
/retest |
1 similar comment
/retest |
@willie-yao: The following test 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/test-infra repository. I understand the commands that are listed here. |
Bypassing test rerun to speed up release as the last main commit is a metadata.yaml only update (#4284) and we have green signal on the current commit already from the previous run: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-azure/4155/pull-cluster-api-provider-azure-e2e-aks/1725228064436129792 /override pull-cluster-api-provider-azure-ci-entrypoint |
This comment was marked as duplicate.
This comment was marked as duplicate.
@CecileRobertMichon: Overrode contexts on behalf of CecileRobertMichon: pull-cluster-api-provider-azure-ci-entrypoint 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. |
This comment was marked as outdated.
This comment was marked as outdated.
@CecileRobertMichon: Overrode contexts on behalf of CecileRobertMichon: pull-cluster-api-provider-azure-e2e, pull-cluster-api-provider-azure-e2e-aks 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. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds ClusterClass support for managed clusters.
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 #2684
Special notes for your reviewer:
TODOs:
Release note: