Skip to content

Add integration test for downscale#53

Open
MichelHollands wants to merge 13 commits intografana:mainfrom
MichelHollands:add_integration_test_for_downscale
Open

Add integration test for downscale#53
MichelHollands wants to merge 13 commits intografana:mainfrom
MichelHollands:add_integration_test_for_downscale

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

@MichelHollands MichelHollands Apr 26, 2023

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.

2 participants