-
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
ASOAPI: add e2e test #4791
ASOAPI: add e2e test #4791
Conversation
networkProfile: | ||
networkPlugin: 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.
This is necessary for Windows node pools, or at least an easy way to get them to work.
@@ -78,20 +82,15 @@ func DiscoverAndWaitForAKSControlPlaneInitialized(ctx context.Context, input Dis | |||
Expect(input.Lister).NotTo(BeNil(), "Invalid argument. input.Lister can't be nil when calling DiscoverAndWaitForAKSControlPlaneInitialized") | |||
Expect(input.Cluster).NotTo(BeNil(), "Invalid argument. input.Cluster can't be nil when calling DiscoverAndWaitForAKSControlPlaneInitialized") | |||
|
|||
controlPlane := GetAzureManagedControlPlaneByCluster(ctx, GetAzureManagedControlPlaneByClusterInput{ |
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.
Since we only ever use the Name and Namespace from this controlPlane
, I opted to pull those from the Cluster instead so we don't need an ASOAPI-typed equivalent for this GetAzureManagedControlPlaneByCluster
function which is otherwise unused.
test/e2e/azure_test.go
Outdated
@@ -937,6 +955,28 @@ var _ = Describe("Workload cluster creation", func() { | |||
}) | |||
}) | |||
|
|||
Context("Creating an AKS cluster with the ASO API [Managed Kubernetes][OPTIONAL]", func() { |
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'd sort of prefer we remove the "OPTIONAL" label. Do we think there's a risk of adding PR friction? I would expect the new API to be operationally equivalent to the existing AKS CAPZ API.
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 don't suspect this test will be flakier than any of the other tests. I was just generally thinking that experimental things probably don't need to be required. I'll change it though and we can reevaluate if this becomes an issue.
ammpList := &infrav1.AzureManagedMachinePoolList{} | ||
asommpList := &infrav1exp.AzureASOManagedMachinePoolList{} |
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.
The gist here is to build up one big list of all the CAPZ ManagedMachinePools, regardless of the exact type whether it's an AzureManagedMachinePool or AzureASOManagedMachinePool. Then we can use their shared metadata structure to get the owning MachinePool which is what we're ultimately checking here.
/hold for squash |
transient github download failure: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4791 +/- ##
=======================================
Coverage 62.48% 62.48%
=======================================
Files 196 196
Lines 16188 16188
=======================================
Hits 10115 10115
Misses 5333 5333
Partials 740 740 ☔ View full report in Codecov by Sentry. |
/retest |
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
great to have these tests bootstrapped as part of the surface area leading up to the release!
LGTM label has been added. Git tree hash: 4200c716a9e64961e8d9ee7fe7c8ee196566a3a8
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis 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 |
squashed! |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR adds a basic e2e test for an ASOAPI AKS cluster which only checks that the cluster and its associated resources reach a ready state after being created.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Part of #4713
Special notes for your reviewer:
There is at least one more step before a ClusterClass test will work. Setting up those templates will likely also be a bit tricker than these, so I elected to punt on that for now.
TODOs:
Release note: