Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
assert.placement
field of agdt-kube
test Spec allows a test author to specify the expected scheduling outcome for a set of Pods returned by the Kubernetes API server from the result of akube.get
call.Suppose you have a Deployment resource with a
TopologySpreadConstraints
that specifies the Pods in the Deployment must land on different hosts:You can create a
gdt-kube
test case that verifies that yournginx
Deployment's Pods are evenly spread across all available hosts:If there are more hosts than the
spec.replicas
in the Deployment,gdt-kube
will ensure that each Pod landed on a unique host. If there are fewer hosts than thespec.replicas
in the Deployment,gdt-kube
will ensure that there is an even spread of Pods to hosts, with any host having no more than one more Pod than any other.Debug/trace output includes information on how the placement spread looked like to the gdt-kube placement spread asserter:
Issue #7