Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .golangci-kal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions api/v1beta2/openstackcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down
3 changes: 3 additions & 0 deletions api/v1beta2/openstackmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down Expand Up @@ -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"`

Expand Down
13 changes: 13 additions & 0 deletions api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down Expand Up @@ -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"`

Expand Down Expand Up @@ -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"`
}
Expand All @@ -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"`
}
Expand All @@ -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"`
}
Expand All @@ -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"`
}
Expand All @@ -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
Expand Down Expand Up @@ -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"`
}
Expand Down Expand Up @@ -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"`
}
Expand Down
17 changes: 0 additions & 17 deletions api_violations.report
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
103 changes: 103 additions & 0 deletions cmd/models-schema/zz_generated.openapi.go

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

Loading