-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 e2e tests & clusterctl changes for cross-ns CC ref #11395
base: main
Are you sure you want to change the base?
✨ Add e2e tests & clusterctl changes for cross-ns CC ref #11395
Conversation
d92a5c2
to
7560e66
Compare
7560e66
to
09ce978
Compare
Renamed wip since it builds on a PR not yet 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.
Made first pass, I will get back to this when the PR it builds on top are merged
test/e2e/data/infrastructure-docker/main/cluster-template-cross-ns-topology/cluster.yaml
Outdated
Show resolved
Hide resolved
09ce978
to
2d4a64e
Compare
2d4a64e
to
c181e3e
Compare
b74fdb8
to
0ddc544
Compare
/test pull-cluster-api-e2e-main |
0ddc544
to
ef9f745
Compare
/test pull-cluster-api-e2e-main |
1 similar comment
/test pull-cluster-api-e2e-main |
Failing again. Probably we should look into why the cluster breaks. It shouldn't 😅 I would probably have time for that next week |
Just fyi, Christian is currently looking into this. We're probably hitting an edge case in KCP |
cc @Danil-Grigorev the above comments should help to get this one green :-) |
231fcd7
to
5d11aa7
Compare
- Prevent duplicate CC creation in template processing - Test runtimextension integration - Add changes to CC rebase e2e test - Add a note CLUSTER_CLASS_NAMESPACE to the clusterctl contract Co-authored-by: Christian Schlotter <[email protected]> Signed-off-by: Danil-Grigorev <[email protected]>
5d11aa7
to
0c1c5b9
Compare
/test pull-cluster-api-e2e-main |
Nice, only another test failed. I call this a win! :) /test pull-cluster-api-e2e-main |
/test pull-cluster-api-e2e-main |
2 similar comments
/test pull-cluster-api-e2e-main |
/test pull-cluster-api-e2e-main |
@Danil-Grigorev: 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-sigs/prow repository. I understand the commands that are listed here. |
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.
g.Expect(ok).To(BeTrue()) | ||
g.Expect(controlPlane.GetGeneration()).To(BeComparableTo(observedGeneration)) |
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.
g.Expect(ok).To(BeTrue()) | |
g.Expect(controlPlane.GetGeneration()).To(BeComparableTo(observedGeneration)) | |
if ok { | |
g.Expect(controlPlane.GetGeneration()).To(BeComparableTo(observedGeneration)) | |
} |
I think (observedGeneration is not part of the contract, so we can't expect it exists)
scaling, err := contract.ControlPlane().IsScaling(controlPlane) | ||
g.Expect(err).ToNot(HaveOccurred()) | ||
g.Expect(scaling).To(BeFalse()) | ||
}, input.WaitForControlPlaneIntervals...).Should(BeNil()) |
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.
}, input.WaitForControlPlaneIntervals...).Should(BeNil()) | |
}, input.WaitForControlPlaneIntervals...).Should(Succeed()) |
@@ -44,6 +44,9 @@ type QuickStartSpecInput struct { | |||
// If not set, a random one will be generated. | |||
ClusterName *string | |||
|
|||
// DeployClusterClassInSeparateNamespace defines if the ClusterClass should be deployed in a separate namespace. |
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.
We have to rebase onto main. In the meantime ClusterctlVariables was added as an input field and we have to add to that map (I would simply overwrite the CLUSTER_CLASS_NAMESPACE key)
(#11780)
Note: we also have to handle the case where input.ClusterctlVariables is nil
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.
One nit from my side :-)
version, err := semver.ParseTolerant(e2eConfig.GetVariable(KubernetesVersionUpgradeFrom)) | ||
Expect(err).ToNot(HaveOccurred(), "Invalid argument, KUBERNETES_VERSION_UPGRADE_FROM is not a valid version") | ||
if version.LT(semver.MustParse("1.24.0")) { | ||
Fail("This test only supports upgrades from Kubernetes >= v1.24.0") | ||
} | ||
|
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.
version, err := semver.ParseTolerant(e2eConfig.GetVariable(KubernetesVersionUpgradeFrom)) | |
Expect(err).ToNot(HaveOccurred(), "Invalid argument, KUBERNETES_VERSION_UPGRADE_FROM is not a valid version") | |
if version.LT(semver.MustParse("1.24.0")) { | |
Fail("This test only supports upgrades from Kubernetes >= v1.24.0") | |
} |
We can drop this constraint as 1.24 is rotated out of our tests/support range :-)
What this PR does / why we need it:
This PR allows
clusterctl
to create a template with a reference to CC located in a different namespace.This change allows to perform e2e tests in a multi-ns environment.
Added e2e tests to verify cluster-class quick-start scenario and runtime extension scenario in a cross-namespaced context.
The PR is built on top of:
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 #5673