Skip to content

Commit 35fa1a1

Browse files
committed
Add nolint comments for intentional API design choices
- HostID.ID: Allows raw hypervisor host ID as alternative to ServerRef - PortResourceSpec.HostID: The HostID struct intentionally provides both options - SecurityGroupRefs: Known issue #438, breaking change planned for next API version
1 parent 13afb05 commit 35fa1a1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

api/v1alpha1/port_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type HostID struct {
5959
// This is mutually exclusive with serverRef.
6060
// +kubebuilder:validation:MaxLength=36
6161
// +optional
62-
ID string `json:"id,omitempty"`
62+
ID string `json:"id,omitempty"` //nolint:kubeapilinter // intentionally allow raw ID
6363

6464
// serverRef is a reference to an ORC Server resource from which to
6565
// retrieve the hostID for port binding. The hostID will be read from
@@ -167,7 +167,7 @@ type PortResourceSpec struct {
167167
// +kubebuilder:validation:MaxItems:=64
168168
// +listType=set
169169
// +optional
170-
SecurityGroupRefs []OpenStackName `json:"securityGroupRefs,omitempty"`
170+
SecurityGroupRefs []OpenStackName `json:"securityGroupRefs,omitempty"` //nolint:kubeapilinter // https://github.com/k-orc/openstack-resource-controller/issues/438
171171

172172
// vnicType specifies the type of vNIC which this port should be
173173
// attached to. This is used to determine which mechanism driver(s) to
@@ -209,7 +209,7 @@ type PortResourceSpec struct {
209209
// binding host, not the value specified here.
210210
// +optional
211211
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="hostID is immutable"
212-
HostID *HostID `json:"hostID,omitempty"`
212+
HostID *HostID `json:"hostID,omitempty"` //nolint:kubeapilinter // HostID provides both raw ID and ServerRef options
213213
}
214214

215215
type PortResourceStatus struct {

0 commit comments

Comments
 (0)