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
Bug 1735728: Add description to operator user facing CRDs. #65
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,22 +26,30 @@ spec: | |
metadata: | ||
type: object | ||
spec: | ||
description: Specification describing how a NetworkAttachmentDefinition | ||
custom resource shall be defined for SR-IOV CNI plugin. | ||
properties: | ||
ipam: | ||
description: IPAM configuration to be used for this network. | ||
type: string | ||
networkNamespace: | ||
description: Namespace of the NetworkAttachmentDefinition custom resource | ||
type: string | ||
resourceName: | ||
description: SRIOV Network device plugin endpoint resource name | ||
type: string | ||
spoofChk: | ||
description: VF spoof check | ||
type: boolean | ||
trust: | ||
description: VF trust mode | ||
type: boolean | ||
vlan: | ||
description: VLAN ID to assign for the VF. Defaults to 0. | ||
format: int64 | ||
type: integer | ||
minimum: 0 | ||
maximum: 4096 | ||
minimum: 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I noticed the order of max/min vlan numbers have been changed many times, is there particular reason for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The CRD file is auto generated by operator-sdk. I don't think the order matters. |
||
type: integer | ||
required: | ||
- resourceName | ||
type: object | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,6 @@ spec: | |
plural: sriovnetworknodepolicies | ||
singular: sriovnetworknodepolicy | ||
scope: Namespaced | ||
subresources: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so nodepolicy status is never used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct |
||
status: {} | ||
validation: | ||
openAPIV3Schema: | ||
properties: | ||
|
@@ -28,32 +26,44 @@ spec: | |
metadata: | ||
type: object | ||
spec: | ||
description: Spec hold the intent of how this operator should configure | ||
the SR-IoV on host. | ||
properties: | ||
deviceType: | ||
description: The driver type for configured VFs. Allowed value "netdevice", | ||
"vfio-pci". Defaults to netdevice. | ||
enum: | ||
- netdevice | ||
- vfio-pci | ||
type: string | ||
isRdma: | ||
description: RDMA mode. Defaults to false. | ||
type: boolean | ||
mtu: | ||
description: MTU of VF | ||
format: int64 | ||
maximum: 9000 | ||
minimum: 1 | ||
type: integer | ||
nicSelector: | ||
description: NicSelector selects the NICs to be configured | ||
properties: | ||
deviceID: | ||
description: The device hex code of SR-IoV device. | ||
type: string | ||
pfNames: | ||
description: Name of SR-IoV PF. | ||
items: | ||
type: string | ||
type: array | ||
rootDevices: | ||
description: PCI address of SR-IoV PF. | ||
items: | ||
type: string | ||
type: array | ||
vendor: | ||
description: The vendor hex code of SR-IoV device. Allowed value | ||
"8086", "15b3". | ||
enum: | ||
- "8086" | ||
- 15b3 | ||
|
@@ -62,17 +72,22 @@ spec: | |
nodeSelector: | ||
additionalProperties: | ||
type: string | ||
description: NodeSelector selects the nodes to be configured | ||
type: object | ||
numVfs: | ||
description: Number of VFs for each PF | ||
format: int64 | ||
minimum: 0 | ||
type: integer | ||
priority: | ||
description: Priority of the policy, higher priority policies can override | ||
lower ones. | ||
format: int64 | ||
maximum: 99 | ||
minimum: 0 | ||
type: integer | ||
resourceName: | ||
description: SRIOV Network device plugin endpoint resource name | ||
type: string | ||
required: | ||
- resourceName | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ type SriovNetworkNodeStateStatus struct { | |
|
||
// +genclient | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// +kubebuilder:subresource:status | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curious, does updating nodestate work without this tag before? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a bug in operator-sdk, which makes errors the generated CRD. Therefore, we have to do manual change to the generated CRD. |
||
// SriovNetworkNodeState is the Schema for the sriovnetworknodestates API | ||
// +k8s:openapi-gen=true | ||
type SriovNetworkNodeState struct { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Shall we also change the file under
manifests/4.2/manifests/4.2/sriov-network-operator-sriovnetwork.crd.yaml
?before this PR, they have same content.
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.
Yes. Will do.