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

small fixes in documentation #33

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

almaslennikov
Copy link
Collaborator

No description provided.

@coveralls
Copy link

coveralls commented Oct 28, 2024

Pull Request Test Coverage Report for Build 11571592164

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 60.443%

Files with Coverage Reduction New Missed Lines %
internal/controller/nicconfigurationtemplate_controller.go 6 87.06%
Totals Coverage Status
Change from base Build 11513872292: 0.0%
Covered Lines: 1745
Relevant Lines: 2887

💛 - Coveralls

@@ -97,9 +97,11 @@ spec:
#### Configuration details

* `numVFs`: if provided, configure SR-IOV VFs via nvconfig.
* This is a mandatory parameter.
Copy link
Member

Choose a reason for hiding this comment

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

We should rather make this field required in our API instead of only documenting this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is required, the additional comment here in the docs is for transparency

Copy link
Member

@tobiasgiese tobiasgiese Oct 29, 2024

Choose a reason for hiding this comment

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

But it is not defined as required via CRD validation. Is this on purpose?
We should add the annotation // +required

// Number of VFs to be configured
NumVfs int `json:"numVfs"`

xref https://book.kubebuilder.io/reference/markers/crd-validation

Copy link
Collaborator Author

@almaslennikov almaslennikov Oct 29, 2024

Choose a reason for hiding this comment

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

It doesn't have the omitempty attribute which in turn doesn't allow to create a template without it.

Copy link
Member

Choose a reason for hiding this comment

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

But it is not a strict contract to the API. Additionally it is not user visible while reading the API docs or running kubectl explain. With the annotation on it the user will see it automatically

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Signed-off-by: Alexander Maslennikov <[email protected]>
@almaslennikov almaslennikov merged commit 7a4cdf8 into Mellanox:main Oct 30, 2024
8 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.

3 participants