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

feat: add podAntiAffinity to MOFED #707

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

rollandf
Copy link
Member

  • Add podAntiAffinity to MOFED
  • Add unit test to check PodAntiAffinity rendering
  • Add unit test to check NodeSelector rendering
  • Extract methods in state_ofed for better readability

Copy link
Member

@vasrem vasrem left a comment

Choose a reason for hiding this comment

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

LGTM

ds := appsv1.DaemonSet{}
err = runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &ds)
Expect(err).NotTo(HaveOccurred())
Expect(ds.Name).To(BeEquivalentTo(fmt.Sprintf("mofed-%s%s-ds", osName, osVer)))
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think it's more clear to hardcode the expected value instead of building it up for readability (just in tests).

Also, BeEquivalentTo() could be replaced with Equal() as ds.Name is just a string.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

- Add podAntiAffinity to MOFED
- Add unit test to check PodAntiAffinity rendering
- Add unit test to check NodeSelector rendering
- Extract methods in state_ofed for better readability

Signed-off-by: Fred Rolland <[email protected]>
Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

LGTM!

@adrianchiris adrianchiris merged commit 7bdd26e into Mellanox:master Dec 19, 2023
10 checks passed
rollandf added a commit to rollandf/network-operator that referenced this pull request Mar 6, 2024
- Add additional mounts to DTK container
- Fix additional mounts handling issue introduced in Mellanox#707

Signed-off-by: Fred Rolland <[email protected]>
rollandf added a commit to rollandf/network-operator that referenced this pull request Mar 6, 2024
- Add additional mounts to DTK container
- Fix additional mounts handling issue introduced in Mellanox#707

Signed-off-by: Fred Rolland <[email protected]>
e0ne added a commit that referenced this pull request Mar 6, 2024
- Add additional mounts to DTK container
- Fix additional mounts handling issue introduced in #707
rollandf added a commit to rollandf/network-operator that referenced this pull request Mar 7, 2024
- Add additional mounts to DTK container
- Fix additional mounts handling issue introduced in Mellanox#707

Signed-off-by: Fred Rolland <[email protected]>
(cherry picked from commit 63502df)
rollandf added a commit to rollandf/network-operator that referenced this pull request Mar 7, 2024
- Add additional mounts to DTK container
- Fix additional mounts handling issue introduced in Mellanox#707

Signed-off-by: Fred Rolland <[email protected]>
(cherry picked from commit 63502df)
e0ne added a commit that referenced this pull request Mar 7, 2024
- Add additional mounts to DTK container
- Fix additional mounts handling issue introduced in #707

Signed-off-by: Fred Rolland <[email protected]>
(cherry picked from commit 63502df)
@rollandf rollandf deleted the ofed-state-test branch August 27, 2024 08:56
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.

4 participants