Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/v1alpha1/port_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ type PortResourceSpec struct {
// +optional
Addresses []Address `json:"addresses,omitempty"`

// securityGroupRefs are the names of the security groups associated
// securityGroupRefs are references to the security groups associated
// with this port.
// +kubebuilder:validation:MaxItems:=32
// +listType=set
// +optional
SecurityGroupRefs []OpenStackName `json:"securityGroupRefs,omitempty"`
SecurityGroupRefs []KubernetesNameRef `json:"securityGroupRefs,omitempty"`

// vnicType specifies the type of vNIC which this port should be
// attached to. This is used to determine which mechanism driver(s) to
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/models-schema/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions config/crd/bases/openstack.k-orc.cloud_ports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,11 @@ spec:
type: string
securityGroupRefs:
description: |-
securityGroupRefs are the names of the security groups associated
securityGroupRefs are references to the security groups associated
with this port.
items:
maxLength: 255
maxLength: 253
minLength: 1
pattern: ^[^,]+$
type: string
maxItems: 32
type: array
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/apivalidations/port_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var _ = Describe("ORC Port API validations", func() {
WithSecurityGroupRefs("sg-foo").
WithPortSecurity(orcv1alpha1.PortSecurityEnabled))
Expect(applyObj(ctx, port, patch)).To(Succeed())
Expect(port.Spec.Resource.SecurityGroupRefs).To(Equal([]orcv1alpha1.OpenStackName{"sg-foo"}))
Expect(port.Spec.Resource.SecurityGroupRefs).To(Equal([]orcv1alpha1.KubernetesNameRef{"sg-foo"}))
Expect(port.Spec.Resource.PortSecurity).To(Equal(orcv1alpha1.PortSecurityEnabled))
})

Expand Down
2 changes: 1 addition & 1 deletion website/docs/crd-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ _Appears in:_
| `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 /> |
| `allowedAddressPairs` _[AllowedAddressPair](#allowedaddresspair) array_ | allowedAddressPairs are allowed addresses associated with this port. | | MaxItems: 32 <br /> |
| `addresses` _[Address](#address) array_ | addresses are the IP addresses for the port. | | MaxItems: 32 <br /> |
| `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 /> |
| `securityGroupRefs` _[KubernetesNameRef](#kubernetesnameref) array_ | securityGroupRefs are references to the security groups associated<br />with this port. | | MaxItems: 32 <br />MaxLength: 253 <br />MinLength: 1 <br /> |
| `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 /> |
| `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 /> |
| `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 /> |
Expand Down
Loading