Skip to content

Commit de706fa

Browse files
committed
Port: fix type for SecurityGroupRefs
It should be a list of KubernetesNameRef and not OpenStackName. Fixes #438
1 parent f5d3d53 commit de706fa

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

api/v1alpha1/port_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ type PortResourceSpec struct {
125125
// +optional
126126
Addresses []Address `json:"addresses,omitempty"`
127127

128-
// securityGroupRefs are the names of the security groups associated
128+
// securityGroupRefs are references the security groups associated
129129
// with this port.
130130
// +kubebuilder:validation:MaxItems:=32
131131
// +listType=set
132132
// +optional
133-
SecurityGroupRefs []OpenStackName `json:"securityGroupRefs,omitempty"`
133+
SecurityGroupRefs []KubernetesNameRef `json:"securityGroupRefs,omitempty"`
134134

135135
// vnicType specifies the type of vNIC which this port should be
136136
// attached to. This is used to determine which mechanism driver(s) to

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/models-schema/zz_generated.openapi.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/openstack.k-orc.cloud_ports.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,11 @@ spec:
314314
type: string
315315
securityGroupRefs:
316316
description: |-
317-
securityGroupRefs are the names of the security groups associated
317+
securityGroupRefs are references the security groups associated
318318
with this port.
319319
items:
320-
maxLength: 255
320+
maxLength: 253
321321
minLength: 1
322-
pattern: ^[^,]+$
323322
type: string
324323
maxItems: 32
325324
type: array

pkg/clients/applyconfiguration/api/v1alpha1/portresourcespec.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/docs/crd-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ _Appears in:_
18281828
| `tags` _[NeutronTag](#neutrontag) array_ | tags is a list of tags which will be applied to the port. | | MaxItems: 32 <br />MaxLength: 255 <br />MinLength: 1 <br /> |
18291829
| `allowedAddressPairs` _[AllowedAddressPair](#allowedaddresspair) array_ | allowedAddressPairs are allowed addresses associated with this port. | | MaxItems: 32 <br /> |
18301830
| `addresses` _[Address](#address) array_ | addresses are the IP addresses for the port. | | MaxItems: 32 <br /> |
1831-
| `securityGroupRefs` _[OpenStackName](#openstackname) array_ | securityGroupRefs are the names of the security groups associated<br />with this port. | | MaxItems: 32 <br />MaxLength: 255 <br />MinLength: 1 <br />Pattern: `^[^,]+$` <br /> |
1831+
| `securityGroupRefs` _[KubernetesNameRef](#kubernetesnameref) array_ | securityGroupRefs are references the security groups associated<br />with this port. | | MaxItems: 32 <br />MaxLength: 253 <br />MinLength: 1 <br /> |
18321832
| `vnicType` _string_ | vnicType specifies the type of vNIC which this port should be<br />attached to. This is used to determine which mechanism driver(s) to<br />be used to bind the port. The valid values are normal, macvtap,<br />direct, baremetal, direct-physical, virtio-forwarder, smart-nic and<br />remote-managed, although these values will not be validated in this<br />API to ensure compatibility with future neutron changes or custom<br />implementations. What type of vNIC is actually available depends on<br />deployments. If not specified, the Neutron default value is used. | | MaxLength: 64 <br /> |
18331833
| `portSecurity` _[PortSecurityState](#portsecuritystate)_ | portSecurity controls port security for this port.<br />When set to Enabled, port security is enabled.<br />When set to Disabled, port security is disabled and SecurityGroupRefs must be empty.<br />When set to Inherit (default), it takes the value from the network level. | Inherit | Enum: [Enabled Disabled Inherit] <br /> |
18341834
| `projectRef` _[KubernetesNameRef](#kubernetesnameref)_ | projectRef is a reference to the ORC Project this resource is associated with.<br />Typically, only used by admin. | | MaxLength: 253 <br />MinLength: 1 <br /> |

0 commit comments

Comments
 (0)