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

Add integration test for downscale #53

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

MichelHollands
Copy link
Contributor

@MichelHollands MichelHollands commented Apr 25, 2023

Adds an integration test that downscales and upscales a statefulset. The method called on the ingesters for downscaling returns 200 or an error based on the scenario.

Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
mock.ObjectMeta.Annotations[admission.PrepareDownscalePortAnnotationKey] = "8080"
requireCreateStatefulSet(ctx, t, api, mock)
requireEventuallyPodCount(ctx, t, api, "name=mock", 3)
// TODO: find a good way to wait until the DNS propagation is done for the pods
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When running this locally the DNS entry for the third pod (mock-2) doesn't always exist until a bit later.
I tried a few things here (wait for the EndpointSlices to be ready etc) but nothing really works apart from a 2 second wait.
Any suggestions are welcome.

@MichelHollands MichelHollands marked this pull request as ready for review April 26, 2023 14:16
@MichelHollands MichelHollands requested a review from a team as a code owner April 26, 2023 14:16
Copy link
Contributor

@JordanRushing JordanRushing left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for implementing this!

@MichelHollands MichelHollands changed the title WIP Add integration test for downscale Add integration test for downscale Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants