diff --git a/.golangci-kal.yml b/.golangci-kal.yml index 5e0a2ede42..2d4c130386 100644 --- a/.golangci-kal.yml +++ b/.golangci-kal.yml @@ -32,7 +32,7 @@ linters: # having the omitempty value in their json tag where appropriate. - "optionalorrequired" # Every field should be marked as optional or required. - "requiredfields" # Required fields should have omitempty/omitzero, and should only be pointers when the zero value is valid. - # - "ssatags" # Ensure array fields have the appropriate listType markers. + - "ssatags" # Ensure array fields have the appropriate listType markers. - "statusoptional" # Ensure all first children within status should be optional. - "statussubresource" # All root objects that have a status field should have a status subresource. - "uniquemarkers" # Ensure that types and fields do not contain more than a single definition of a marker that should only be present once. diff --git a/api/v1beta2/openstackcluster_types.go b/api/v1beta2/openstackcluster_types.go index e1ecc6f461..866bd4f8bf 100644 --- a/api/v1beta2/openstackcluster_types.go +++ b/api/v1beta2/openstackcluster_types.go @@ -233,6 +233,8 @@ type OpenStackClusterStatus struct { APIServerManagedLoadBalancer *LoadBalancer `json:"apiServerManagedLoadBalancer,omitempty"` // failureDomains represent OpenStack availability zones + // +listType=map + // +listMapKey=name // +optional FailureDomains []clusterv1.FailureDomain `json:"failureDomains,omitempty"` diff --git a/api/v1beta2/openstackmachine_types.go b/api/v1beta2/openstackmachine_types.go index c816605a73..9051a7c7eb 100644 --- a/api/v1beta2/openstackmachine_types.go +++ b/api/v1beta2/openstackmachine_types.go @@ -112,10 +112,12 @@ type OpenStackMachineSpec struct { // ports to be attached to the server instance. They are created if a port with the given name does not already exist. // If not specified a default port will be added for the default cluster network. + // +listType=atomic // +optional Ports []PortOpts `json:"ports,omitempty"` // securityGroups is a list of security groups to assign to the instance. + // +listType=atomic // +optional SecurityGroups []SecurityGroupParam `json:"securityGroups,omitempty"` @@ -218,6 +220,7 @@ type OpenStackMachineStatus struct { InstanceID optional.String `json:"instanceID,omitempty"` // addresses contains the OpenStack instance associated addresses. + // +listType=atomic // +optional Addresses []corev1.NodeAddress `json:"addresses,omitempty"` diff --git a/api/v1beta2/types.go b/api/v1beta2/types.go index c7827cb7fb..7a7a10ebdf 100644 --- a/api/v1beta2/types.go +++ b/api/v1beta2/types.go @@ -346,12 +346,14 @@ type SubnetSpec struct { // dnsNameservers holds a list of DNS server addresses that will be provided when creating // the subnet. These addresses need to have the same IP version as CIDR. + // +listType=atomic // +optional DNSNameservers []string `json:"dnsNameservers,omitempty"` // allocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. // If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from // outside of these ranges manually. + // +listType=atomic // +optional AllocationPools []AllocationPool `json:"allocationPools,omitempty"` } @@ -424,6 +426,7 @@ type ResolvedPortSpecFields struct { // addresses. If not specified, the MAC Address will be the MAC Address // of the port. Depending on the configuration of Neutron, it may be // supported to specify a CIDR instead of a specific IP address. + // +listType=atomic // +optional AllowedAddressPairs []AddressPair `json:"allowedAddressPairs,omitempty"` @@ -751,6 +754,7 @@ type NetworkStatus struct { ID string `json:"id,omitempty"` // tags is a list of tags on the network. + // +listType=set // +optional Tags []string `json:"tags,omitempty"` } @@ -760,6 +764,7 @@ type NetworkStatusWithSubnets struct { NetworkStatus `json:",inline"` // subnets is a list of subnets associated with the default cluster network. Machines which use the default cluster network will get an address from all of these subnets. + // +listType=atomic // +optional Subnets []Subnet `json:"subnets,omitempty"` } @@ -781,6 +786,7 @@ type Subnet struct { CIDR string `json:"cidr,omitempty"` // tags is a list of tags on the subnet. + // +listType=set // +optional Tags []string `json:"tags,omitempty"` } @@ -796,9 +802,11 @@ type Router struct { // +kubebuilder:validation:MinLength=1 ID string `json:"id,omitempty"` // tags is a list of tags on the router. + // +listType=set // +optional Tags []string `json:"tags,omitempty"` // ips is a list of IP addresses assigned to the router. + // +listType=set // +optional IPs []string `json:"ips,omitempty"` } @@ -822,9 +830,11 @@ type LoadBalancer struct { // +kubebuilder:validation:MinLength=1 InternalIP string `json:"internalIP,omitempty"` // allowedCIDRs is a list of CIDRs that are allowed to access the load balancer. + // +listType=set // +optional AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` // tags is a list of tags on the load balancer. + // +listType=set // +optional Tags []string `json:"tags,omitempty"` // loadBalancerNetwork contains information about network and/or subnets which the @@ -906,6 +916,7 @@ type SecurityGroupRuleSpec struct { // remoteManagedGroups is the remote managed groups to be associated with this security group rule. // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + // +listType=set // +optional RemoteManagedGroups []ManagedSecurityGroupName `json:"remoteManagedGroups,omitempty"` } @@ -1091,12 +1102,14 @@ type ResolvedMachineSpec struct { FlavorID string `json:"flavorID,omitempty"` // ports is the fully resolved list of ports to create for the machine. + // +listType=atomic // +optional Ports []ResolvedPortSpec `json:"ports,omitempty"` } type MachineResources struct { // ports is the status of the ports created for the machine. + // +listType=atomic // +optional Ports []PortStatus `json:"ports,omitempty"` } diff --git a/api_violations.report b/api_violations.report index 28efea0167..1d4b4a1298 100644 --- a/api_violations.report +++ b/api_violations.report @@ -25,23 +25,6 @@ API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,Subnet,Tags API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetSpec,AllocationPools API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetSpec,DNSNameservers -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,LoadBalancer,AllowedCIDRs -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,LoadBalancer,Tags -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,MachineResources,Ports -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,NetworkStatus,Tags -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,NetworkStatusWithSubnets,Subnets -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackClusterStatus,FailureDomains -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineSpec,Ports -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineSpec,SecurityGroups -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineStatus,Addresses -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,ResolvedMachineSpec,Ports -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,ResolvedPortSpecFields,AllowedAddressPairs -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,Router,IPs -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,Router,Tags -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SecurityGroupRuleSpec,RemoteManagedGroups -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,Subnet,Tags -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SubnetSpec,AllocationPools -API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SubnetSpec,DNSNameservers API rule violation: list_type_missing,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterClassPatch,Definitions API rule violation: list_type_missing,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterClassSpec,Patches API rule violation: list_type_missing,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterClassSpec,Variables diff --git a/cmd/models-schema/zz_generated.openapi.go b/cmd/models-schema/zz_generated.openapi.go index 2a72ebaf29..bd96fd5b60 100644 --- a/cmd/models-schema/zz_generated.openapi.go +++ b/cmd/models-schema/zz_generated.openapi.go @@ -22957,6 +22957,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_LoadBalancer(re }, }, "allowedCIDRs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "allowedCIDRs is a list of CIDRs that are allowed to access the load balancer.", Type: []string{"array"}, @@ -22972,6 +22977,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_LoadBalancer(re }, }, "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "tags is a list of tags on the load balancer.", Type: []string{"array"}, @@ -23028,6 +23038,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_MachineResource Type: []string{"object"}, Properties: map[string]spec.Schema{ "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "ports is the status of the ports created for the machine.", Type: []string{"array"}, @@ -23368,6 +23383,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkStatus(r }, }, "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "tags is a list of tags on the network.", Type: []string{"array"}, @@ -23411,6 +23431,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkStatusWi }, }, "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "tags is a list of tags on the network.", Type: []string{"array"}, @@ -23426,6 +23451,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkStatusWi }, }, "subnets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "subnets is a list of subnets associated with the default cluster network. Machines which use the default cluster network will get an address from all of these subnets.", Type: []string{"array"}, @@ -23802,6 +23832,14 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackCluste }, }, "failureDomains": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ Description: "failureDomains represent OpenStack availability zones", Type: []string{"array"}, @@ -24162,6 +24200,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachin }, }, "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "ports to be attached to the server instance. They are created if a port with the given name does not already exist. If not specified a default port will be added for the default cluster network.", Type: []string{"array"}, @@ -24176,6 +24219,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachin }, }, "securityGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "securityGroups is a list of security groups to assign to the instance.", Type: []string{"array"}, @@ -24365,6 +24413,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachin }, }, "addresses": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "addresses contains the OpenStack instance associated addresses.", Type: []string{"array"}, @@ -24714,6 +24767,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_PortOpts(ref co }, }, "allowedAddressPairs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "allowedAddressPairs is a list of address pairs which Neutron will allow the port to send traffic from in addition to the port's addresses. If not specified, the MAC Address will be the MAC Address of the port. Depending on the configuration of Neutron, it may be supported to specify a CIDR instead of a specific IP address.", Type: []string{"array"}, @@ -24867,6 +24925,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedMachine }, }, "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "ports is the fully resolved list of ports to create for the machine.", Type: []string{"array"}, @@ -24998,6 +25061,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedPortSpe }, }, "allowedAddressPairs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "allowedAddressPairs is a list of address pairs which Neutron will allow the port to send traffic from in addition to the port's addresses. If not specified, the MAC Address will be the MAC Address of the port. Depending on the configuration of Neutron, it may be supported to specify a CIDR instead of a specific IP address.", Type: []string{"array"}, @@ -25098,6 +25166,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedPortSpe }, }, "allowedAddressPairs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "allowedAddressPairs is a list of address pairs which Neutron will allow the port to send traffic from in addition to the port's addresses. If not specified, the MAC Address will be the MAC Address of the port. Depending on the configuration of Neutron, it may be supported to specify a CIDR instead of a specific IP address.", Type: []string{"array"}, @@ -25252,6 +25325,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Router(ref comm }, }, "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "tags is a list of tags on the router.", Type: []string{"array"}, @@ -25267,6 +25345,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Router(ref comm }, }, "ips": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "ips is a list of IP addresses assigned to the router.", Type: []string{"array"}, @@ -25715,6 +25798,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupRu }, }, "remoteManagedGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "remoteManagedGroups is the remote managed groups to be associated with this security group rule. You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups.", Type: []string{"array"}, @@ -25868,6 +25956,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Subnet(ref comm }, }, "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ Description: "tags is a list of tags on the subnet.", Type: []string{"array"}, @@ -26080,6 +26173,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetSpec(ref }, }, "dnsNameservers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "dnsNameservers holds a list of DNS server addresses that will be provided when creating the subnet. These addresses need to have the same IP version as CIDR.", Type: []string{"array"}, @@ -26095,6 +26193,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetSpec(ref }, }, "allocationPools": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "allocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from outside of these ranges manually.", Type: []string{"array"}, diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml index 122472ef05..09a00467df 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml @@ -3448,6 +3448,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. @@ -3852,6 +3853,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic providerID: description: providerID is the unique identifier as specified by the cloud provider. @@ -4064,6 +4066,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic serverGroup: description: serverGroup is the server group to assign the machine to. @@ -4551,6 +4554,7 @@ spec: - worker type: string type: array + x-kubernetes-list-type: set required: - direction - name @@ -4635,6 +4639,7 @@ spec: - worker type: string type: array + x-kubernetes-list-type: set required: - direction - name @@ -4719,6 +4724,7 @@ spec: - worker type: string type: array + x-kubernetes-list-type: set required: - direction - name @@ -4757,6 +4763,7 @@ spec: - start type: object type: array + x-kubernetes-list-type: atomic cidr: description: |- cidr is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. @@ -4770,6 +4777,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - cidr type: object @@ -5179,6 +5187,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set id: description: id is the unique identifier of the load balancer. minLength: 1 @@ -5232,17 +5241,20 @@ spec: items: type: string type: array + x-kubernetes-list-type: set required: - cidr - id - name type: object type: array + x-kubernetes-list-type: atomic tags: description: tags is a list of tags on the network. items: type: string type: array + x-kubernetes-list-type: set required: - id - name @@ -5256,6 +5268,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set required: - id - internalIP @@ -5327,6 +5340,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. @@ -5468,6 +5482,7 @@ spec: - networkID type: object type: array + x-kubernetes-list-type: atomic serverGroupID: description: serverGroupID is the ID of the server group the machine should be added to and is calculated based on ServerGroupFilter. @@ -5490,6 +5505,7 @@ spec: - id type: object type: array + x-kubernetes-list-type: atomic type: object sshKeyName: description: sshKeyName is the name of the SSH key used for the @@ -5615,6 +5631,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set required: - id - name @@ -5645,6 +5662,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map initialization: description: initialization contains information about the initialization status of the cluster. @@ -5692,17 +5712,20 @@ spec: items: type: string type: array + x-kubernetes-list-type: set required: - cidr - id - name type: object type: array + x-kubernetes-list-type: atomic tags: description: tags is a list of tags on the network. items: type: string type: array + x-kubernetes-list-type: set required: - id - name @@ -5719,6 +5742,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set name: description: name is the name of the router. minLength: 1 @@ -5728,6 +5752,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set required: - id - name diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml index 1118cd81f9..14691b11f2 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml @@ -2904,6 +2904,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. @@ -3318,6 +3319,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic providerID: description: providerID is the unique identifier as specified by the cloud provider. @@ -3535,6 +3537,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic serverGroup: description: serverGroup is the server group to assign the machine to. @@ -4031,6 +4034,7 @@ spec: - worker type: string type: array + x-kubernetes-list-type: set required: - direction - name @@ -4115,6 +4119,7 @@ spec: - worker type: string type: array + x-kubernetes-list-type: set required: - direction - name @@ -4199,6 +4204,7 @@ spec: - worker type: string type: array + x-kubernetes-list-type: set required: - direction - name @@ -4238,6 +4244,7 @@ spec: - start type: object type: array + x-kubernetes-list-type: atomic cidr: description: |- cidr is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. @@ -4251,6 +4258,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - cidr type: object diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml index de7ac61a3e..c932bb7d31 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml @@ -278,6 +278,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set required: - id - name diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml index b4acab1972..f5fdfad1ce 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml @@ -1589,6 +1589,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. @@ -1983,6 +1984,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic providerID: description: providerID is the unique identifier as specified by the cloud provider. @@ -2194,6 +2196,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic serverGroup: description: serverGroup is the server group to assign the machine to. @@ -2280,6 +2283,7 @@ spec: - type type: object type: array + x-kubernetes-list-type: atomic conditions: description: |- conditions defines current service state of the OpenStackMachine. @@ -2412,6 +2416,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. @@ -2551,6 +2556,7 @@ spec: - networkID type: object type: array + x-kubernetes-list-type: atomic serverGroupID: description: serverGroupID is the ID of the server group the machine should be added to and is calculated based on ServerGroupFilter. @@ -2573,6 +2579,7 @@ spec: - id type: object type: array + x-kubernetes-list-type: atomic type: object type: object type: object diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml index 3f24440170..30c268bc92 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml @@ -1333,6 +1333,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. @@ -1737,6 +1738,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic providerID: description: providerID is the unique identifier as specified by the cloud provider. @@ -1949,6 +1951,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic serverGroup: description: serverGroup is the server group to assign the machine to. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml index fa0516b61d..4e4beca7ea 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml @@ -308,6 +308,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. @@ -1132,6 +1133,7 @@ spec: - ipAddress type: object type: array + x-kubernetes-list-type: atomic description: description: description is a human-readable description for the port. diff --git a/pkg/generated/applyconfiguration/internal/internal.go b/pkg/generated/applyconfiguration/internal/internal.go index 4152fc4f9b..c6eded9162 100644 --- a/pkg/generated/applyconfiguration/internal/internal.go +++ b/pkg/generated/applyconfiguration/internal/internal.go @@ -2024,7 +2024,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: id type: scalar: string @@ -2045,7 +2045,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.MachineInitialization map: fields: @@ -2168,7 +2168,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkStatusWithSubnets map: fields: @@ -2189,7 +2189,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NodeInfo map: fields: @@ -2315,7 +2315,9 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: namedType: io.k8s.sigs.cluster-api.api.core.v1beta2.FailureDomain - elementRelationship: atomic + elementRelationship: associative + keys: + - name - name: initialization type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ClusterInitialization @@ -2758,7 +2760,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: name type: scalar: string @@ -2767,7 +2769,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RouterFilter map: fields: @@ -2918,7 +2920,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupStatus map: fields: @@ -2969,7 +2971,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: scalar: string - elementRelationship: atomic + elementRelationship: associative - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetFilter map: fields: