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

Tolerations and TopologySpreadConstraints. Fixes #1803 and #1844 #2101

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

rigazilla
Copy link
Collaborator

Adds spec.scheduling.tolerations spec.scheduling.topologySpreadConstraints.

see #1803 #1844

// From Infinispan CR to pods
areEqual := false
for _, v := range pod.Spec.Tolerations {
if reflect.DeepEqual(v, ispn.Spec.Scheduling.Tolerations[0]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can just do assert.EqualValues() here on each of the tolerations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

k8s adds some tolerations, so arrays are not equal. so we need to check if our toleration is in the array

}
}
assert.True(areEqual)
assert.True(reflect.DeepEqual(pod.Spec.TopologySpreadConstraints, ispn.Spec.Scheduling.TopologySpreadConstraints))
Copy link
Contributor

Choose a reason for hiding this comment

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

assert.EqualValues

@@ -89,6 +103,22 @@ func verifyDefaultAuthention(require *require.Assertions, ispn *v1.Infinispan) {
testAuthentication(ispn, schema, user, pass)
}

// Make sure no PVCs were created
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this comment is valid.

@ryanemerson ryanemerson merged commit 0d2f52a into infinispan:main Jun 6, 2024
1 of 2 checks passed
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