-
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
🌱 Export scale e2e test to make it reusable by providers #11333
🌱 Export scale e2e test to make it reusable by providers #11333
Conversation
7268bf6
to
e06306c
Compare
03c3126
to
a04ce9f
Compare
cc @sbueringer |
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.
Just a few nits, otherwise ready to merge
test/e2e/scale.go
Outdated
clusterNamespace string, | ||
clusterName string, | ||
clusterClassYAML []byte, | ||
clusterTemplateYAML []byte) (clusterClassTemlate []byte, ClusterTemplate []byte) |
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.
clusterTemplateYAML []byte) (clusterClassTemlate []byte, ClusterTemplate []byte) | |
clusterTemplateYAML []byte) (clusterClassYAML []byte, clusterTemplateYAML []byte) |
nit
Let's also add a new line after this line
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.
It is complaining that clusterClassYAML redeclared in this bock !
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 removed that return var name
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.
Ah :)
test/e2e/scale.go
Outdated
@@ -568,7 +577,9 @@ func getClusterCreateFn(clusterProxy framework.ClusterProxy) clusterCreator { | |||
} | |||
} | |||
|
|||
func createClusterWorker(ctx context.Context, clusterProxy framework.ClusterProxy, inputChan <-chan string, resultChan chan<- workResult, wg *sync.WaitGroup, defaultNamespace string, deployClusterInSeparateNamespaces bool, baseClusterClassYAML, baseClusterTemplateYAML []byte, create clusterCreator) { | |||
type PostScaleClusterNamespaceCreated func(clusterProxy framework.ClusterProxy, clusterNamespace string, clusterName string, clusterClassYAML []byte, clusterTemplateYAML []byte) (clusterClassTemlate []byte, ClusterTemplate []byte) |
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.
type PostScaleClusterNamespaceCreated func(clusterProxy framework.ClusterProxy, clusterNamespace string, clusterName string, clusterClassYAML []byte, clusterTemplateYAML []byte) (clusterClassTemlate []byte, ClusterTemplate []byte) | |
type PostScaleClusterNamespaceCreated func(clusterProxy framework.ClusterProxy, clusterNamespace string, clusterName string, clusterClassYAML []byte, clusterTemplateYAML []byte) (clusterClassYAML []byte, clusterTemplateYAML []byte)) |
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.
removed return var names
- Export ScaleSpec and ScaleSpecInput to allow reuse in other providers. - Add PostScaleClusterNamespaceCreated hook to be called after generating cluster name and namespace but before applying the template. Signed-off-by: Mohammed Boukhalfa <mohammed.boukhalfa@est.tech>
a04ce9f
to
241b8e4
Compare
/assign @mquhuy |
@mboukhalfa: GitHub didn't allow me to assign the following users: mquhuy. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. 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-sigs/prow repository. |
/assign @mquhuy |
@adilGhaffarDev: GitHub didn't allow me to assign the following users: mquhuy. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. 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-sigs/prow repository. |
Thx! |
LGTM label has been added. Git tree hash: e2ae4eab6908986212636d33e70ca425f2395cda
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
Make scale e2e test reusable for CAPM3 and other providers
ScaleSpec
andScaleSpecInput
to allow reuse in other providers.PostScaleClusterNamespaceCreated
hook, which is called after generating the cluster name and namespace but before applying the template. This enables provider-specific customizations and allows adapting the cluster template accordingly before application such as adding specific cluster endpoints.Fixes #11332