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

[WIP] 🌱 Add the autoscaler e2e test #8262

Closed

Conversation

fabriziopandini
Copy link
Member

@fabriziopandini fabriziopandini commented Mar 10, 2023

What this PR does / why we need it:
Probably it needs some more cleanup + migration to cc (this can be also a follow-up PR)

Fixes #8282

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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from fabriziopandini. For more information see the Kubernetes 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 10, 2023
@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-test-full-main
to trigger the new test

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-cluster-api-build-main
  • /test pull-cluster-api-e2e-main
  • /test pull-cluster-api-test-main
  • /test pull-cluster-api-test-mink8s-main
  • /test pull-cluster-api-verify-main

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-apidiff-main
  • /test pull-cluster-api-e2e-full-main
  • /test pull-cluster-api-e2e-informing-ipv6-main
  • /test pull-cluster-api-e2e-informing-main
  • /test pull-cluster-api-e2e-scale-main-experimental
  • /test pull-cluster-api-e2e-workload-upgrade-1-26-latest-main

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-apidiff-main
  • pull-cluster-api-build-main
  • pull-cluster-api-e2e-informing-ipv6-main
  • pull-cluster-api-e2e-informing-main
  • pull-cluster-api-e2e-main
  • pull-cluster-api-test-main
  • pull-cluster-api-test-mink8s-main
  • pull-cluster-api-verify-main

In response to this:

/test pull-cluster-api-test-full-main
to trigger the new test

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.

@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: The following test 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-e2e-main 74850f2 link true /test pull-cluster-api-e2e-main

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.

WaitForDeploymentsAvailable(ctx, WaitForDeploymentsAvailableInput{
Getter: input.ClusterProxy.GetClient(),
Deployment: scalelUpDeployment,
}, intervals...)
Copy link
Member

Choose a reason for hiding this comment

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

could also delete and wait for the MachineDeployment to scale down fwiw https://github.com/openshift/hypershift/blob/main/test/e2e/autoscaling_test.go#L22.

@enxebre
Copy link
Member

enxebre commented Mar 13, 2023

Very nice, thanks Fabrizio!

# Limit cluster autoscaler to only match against resources belonging to a single Cluster API cluster
- --node-group-auto-discovery=clusterapi:namespace=${CLUSTER_NAMESPACE},clusterName=${CLUSTER_NAME}
volumeMounts:
- name: kubeconfig-management-cluster
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this is following the pattern of installing the cluster-autoscaler deployment onto the mgmt cluster (as opposed to it being installed onto the workload cluster). Should we do a per-cluster cluster-autoscaler deployment namespace so that there is a path forward for managing multiple clusters?

Name: fmt.Sprintf("cluster-%s-token", input.Cluster.Name),
},
}
Eventually(func() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

slight preference for Eventually(func(g Gomega) { and then ending in .Should(Succeed(),...

This way we can assert the err and the lookups. E.g.:

g.Expect(err).NotTo(HaveOccurred())

and

_, ok := tokenSecret.Data["token"]
g.Expect(ok).To(BeTrue())

This way we'll get the line that caused the failure+retry printed to stdout and debugging will be easier.

@sbueringer
Copy link
Member

Thx for the reviews!

Please note that this is a WIP-PR. We have a few more changes planned for this PR

@sbueringer
Copy link
Member

sbueringer commented Mar 14, 2023

Created an issue to discuss the exact scope of this PR #8282

@fabriziopandini
Copy link
Member Author

/close
this work is being revived in #8514, thanks @ykakarap for picking this up

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: Closed this PR.

In response to this:

/close
this work is being revived in #8514, thanks @ykakarap for picking this up

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.

@fabriziopandini fabriziopandini deleted the test-autoscaler branch May 9, 2023 12:36
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add e2e test to cover basic autoscaler scenarios
5 participants