-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
Pull Request Test Coverage Report for Build 11571592164Details
💛 - Coveralls |
@@ -97,9 +97,11 @@ spec: | |||
#### Configuration details | |||
|
|||
* `numVFs`: if provided, configure SR-IOV VFs via nvconfig. | |||
* This is a mandatory parameter. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's add it :)
Nevertheless, our CRDs already mark those fields as required: https://github.com/Mellanox/nic-configuration-operator/blob/main/config/crd/bases/configuration.net.nvidia.com_nicconfigurationtemplates.yaml#L169
Signed-off-by: Alexander Maslennikov <[email protected]>
c6e55ce
to
7d8cb6e
Compare
No description provided.