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
3 changes: 3 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ linters:
- linters:
- nolintlint
text: "should be written without leading space as `//nolint" # don't require machine-readable nolint directives (i.e. with no leading space)
- linters:
- staticcheck
text: "SA1019:.*OpenStack-only; not used for STACKIT."
paths:
- zz_generated\..*\.go$

Expand Down
41 changes: 25 additions & 16 deletions hack/api-reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,8 @@ boolean

<p>
FloatingPoolStatus contains information about the floating pool.

Deprecated: OpenStack-only; not used for STACKIT.
</p>

<table>
Expand All @@ -908,7 +910,7 @@ string
</em>
</td>
<td>
<p>ID is the floating pool id.</p>
<p>ID is the floating pool id.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -919,7 +921,7 @@ string
</em>
</td>
<td>
<p>Name is the floating pool name.</p>
<p>Name is the floating pool name.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>

Expand Down Expand Up @@ -952,7 +954,8 @@ string
</em>
</td>
<td>
<p>FloatingPoolName contains the FloatingPoolName name in which LoadBalancer FIPs should be created.</p>
<em>(Optional)</em>
<p>FloatingPoolName contains the FloatingPoolName name in which LoadBalancer FIPs should be created.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -964,7 +967,7 @@ string
</td>
<td>
<em>(Optional)</em>
<p>FloatingPoolSubnetName contains the fixed name of subnet or matching name pattern for subnet<br />in the Floating IP Pool where the router should be attached to.</p>
<p>FloatingPoolSubnetName contains the fixed name of subnet or matching name pattern for subnet<br />in the Floating IP Pool where the router should be attached to.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1562,7 +1565,7 @@ string
</em>
</td>
<td>
<p>FloatingPool contains information about the floating pool.</p>
<p>FloatingPool contains information about the floating pool.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -1573,7 +1576,7 @@ string
</em>
</td>
<td>
<p>Router contains information about the Router and related resources.</p>
<p>Router contains information about the Router and related resources.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1646,7 +1649,7 @@ Networks holds information about the Kubernetes and infrastructure networks.
</td>
<td>
<em>(Optional)</em>
<p>Router indicates whether to use an existing router or create a new one.</p>
<p>Router indicates whether to use an existing router or create a new one.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1692,7 +1695,7 @@ string
</td>
<td>
<em>(Optional)</em>
<p>SubnetID is the ID of an existing subnet.</p>
<p>SubnetID is the ID of an existing subnet.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1882,6 +1885,8 @@ string

<p>
RouterStatus contains information about a generated Router or resources attached to an existing Router.

Deprecated: OpenStack-only; not used for STACKIT.
</p>

<table>
Expand All @@ -1901,7 +1906,7 @@ string
</em>
</td>
<td>
<p>ID is the Router id.</p>
<p>ID is the Router id.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -1912,7 +1917,7 @@ string
</em>
</td>
<td>
<p>IP is the router ip.<br />Deprecated: use ExternalFixedIPs instead.</p>
<p>IP is the router ip.<br />Deprecated: use ExternalFixedIPs instead. OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -1923,7 +1928,7 @@ string array
</em>
</td>
<td>
<p>ExternalFixedIPs is the list of the router's assigned external fixed IPs.</p>
<p>ExternalFixedIPs is the list of the router's assigned external fixed IPs.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>

Expand Down Expand Up @@ -2132,6 +2137,8 @@ boolean

<p>
ShareNetworkStatus contains information about a generated ShareNetwork

Deprecated: OpenStack-only; not used for STACKIT.
</p>

<table>
Expand All @@ -2151,7 +2158,7 @@ string
</em>
</td>
<td>
<p>ID is the Network id.</p>
<p>ID is the Network id.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -2162,7 +2169,7 @@ string
</em>
</td>
<td>
<p>Name is the Network name.</p>
<p>Name is the Network name.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>

Expand Down Expand Up @@ -2351,6 +2358,8 @@ string

<p>
Subnet is an OpenStack subnet related to a Network.

Deprecated: OpenStack-only; not used for STACKIT.
</p>

<table>
Expand All @@ -2370,7 +2379,7 @@ Subnet is an OpenStack subnet related to a Network.
</em>
</td>
<td>
<p>Purpose is a logical description of the subnet.</p>
<p>Purpose is a logical description of the subnet.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -2381,7 +2390,7 @@ string
</em>
</td>
<td>
<p>ID is the subnet id.</p>
<p>ID is the subnet id.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>
<tr>
Expand All @@ -2393,7 +2402,7 @@ string
</td>
<td>
<em>(Optional)</em>
<p>DNSNameservers specifies the DNS nameservers for the subnet.<br />Nil if DNSNameservers could not be queried.</p>
<p>DNSNameservers specifies the DNS nameservers for the subnet.<br />Nil if DNSNameservers could not be queried.<br />Deprecated: OpenStack-only; not used for STACKIT.</p>
</td>
</tr>

Expand Down
41 changes: 40 additions & 1 deletion pkg/apis/stackit/v1alpha1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ import (
type InfrastructureConfig struct {
metav1.TypeMeta `json:",inline"`
// FloatingPoolName contains the FloatingPoolName name in which LoadBalancer FIPs should be created.
//
// Deprecated: OpenStack-only; not used for STACKIT.
// +optional
FloatingPoolName string `json:"floatingPoolName"`
// FloatingPoolSubnetName contains the fixed name of subnet or matching name pattern for subnet
// in the Floating IP Pool where the router should be attached to.
//
// Deprecated: OpenStack-only; not used for STACKIT.
// +optional
FloatingPoolSubnetName *string `json:"floatingPoolSubnetName,omitempty"`
// Networks is the OpenStack specific network configuration
Expand All @@ -27,6 +32,8 @@ type InfrastructureConfig struct {
// Networks holds information about the Kubernetes and infrastructure networks.
type Networks struct {
// Router indicates whether to use an existing router or create a new one.
//
// Deprecated: OpenStack-only; not used for STACKIT.
// +optional
Router *Router `json:"router,omitempty"`
// Worker is a CIDRs of a worker subnet (private) to create (used for the VMs).
Expand All @@ -39,6 +46,8 @@ type Networks struct {
// +optional
ID *string `json:"id,omitempty"`
// SubnetID is the ID of an existing subnet.
//
// Deprecated: OpenStack-only; not used for STACKIT.
// +optional
SubnetID *string `json:"subnetId,omitempty"`
// ShareNetwork holds information about the share network (used for shared file systems like NFS)
Expand Down Expand Up @@ -91,8 +100,12 @@ type NetworkStatus struct {
// Name is the Network name.
Name string `json:"name"`
// FloatingPool contains information about the floating pool.
//
// Deprecated: OpenStack-only; not used for STACKIT.
FloatingPool FloatingPoolStatus `json:"floatingPool"`
// Router contains information about the Router and related resources.
//
// Deprecated: OpenStack-only; not used for STACKIT.
Router RouterStatus `json:"router"`
// DNSServer contains the networks configured dnsServers
// +optional
Expand All @@ -109,30 +122,48 @@ type NetworkStatus struct {
}

// RouterStatus contains information about a generated Router or resources attached to an existing Router.
//
// Deprecated: OpenStack-only; not used for STACKIT.
type RouterStatus struct {
// ID is the Router id.
//
// Deprecated: OpenStack-only; not used for STACKIT.
ID string `json:"id"`
// IP is the router ip.
//
// Deprecated: use ExternalFixedIPs instead.
// Deprecated: use ExternalFixedIPs instead. OpenStack-only; not used for STACKIT.
IP string `json:"ip"`
// ExternalFixedIPs is the list of the router's assigned external fixed IPs.
//
// Deprecated: OpenStack-only; not used for STACKIT.
Comment thread
nschad marked this conversation as resolved.
ExternalFixedIPs []string `json:"externalFixedIP"`
}

// FloatingPoolStatus contains information about the floating pool.
//
// Deprecated: OpenStack-only; not used for STACKIT.
type FloatingPoolStatus struct {
// ID is the floating pool id.
//
// Deprecated: OpenStack-only; not used for STACKIT.
ID string `json:"id"`
// Name is the floating pool name.
//
// Deprecated: OpenStack-only; not used for STACKIT.
Name string `json:"name"`
}

// ShareNetworkStatus contains information about a generated ShareNetwork
//
// Deprecated: OpenStack-only; not used for STACKIT.
type ShareNetworkStatus struct {
// ID is the Network id.
//
// Deprecated: OpenStack-only; not used for STACKIT.
ID string `json:"id"`
// Name is the Network name.
//
// Deprecated: OpenStack-only; not used for STACKIT.
Name string `json:"name"`
}

Expand All @@ -145,13 +176,21 @@ const (
)

// Subnet is an OpenStack subnet related to a Network.
//
// Deprecated: OpenStack-only; not used for STACKIT.
type Subnet struct {
// Purpose is a logical description of the subnet.
//
// Deprecated: OpenStack-only; not used for STACKIT.
Purpose Purpose `json:"purpose"`
// ID is the subnet id.
//
// Deprecated: OpenStack-only; not used for STACKIT.
ID string `json:"id"`
// DNSNameservers specifies the DNS nameservers for the subnet.
// Nil if DNSNameservers could not be queried.
//
// Deprecated: OpenStack-only; not used for STACKIT.
// +optional
DNSNameservers *[]string `json:"dnsNameservers,omitempty"`
}
Expand Down
5 changes: 0 additions & 5 deletions pkg/apis/stackit/validation/cloudprofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func ValidateCloudProfileConfig(cloudProfile *stackitv1alpha1.CloudProfileConfig

floatingPoolPath := fldPath.Child("constraints", "floatingPools")
combinationFound := sets.NewString()
//nolint:staticcheck // SA1019: needed for migration purposes
for i, pool := range cloudProfile.Constraints.FloatingPools {
idxPath := floatingPoolPath.Index(i)
if len(pool.Name) == 0 {
Expand Down Expand Up @@ -71,7 +70,6 @@ func ValidateCloudProfileConfig(cloudProfile *stackitv1alpha1.CloudProfileConfig
}
allErrs = append(allErrs, validateMachineImageMapping(machineImages, cloudProfile, capabilityDefinitions, field.NewPath("spec").Child("machineImages"))...)

//nolint:staticcheck // SA1019: needed for migration purposes
if ca := cloudProfile.KeyStoneCACert; ca != nil && len(*ca) > 0 {
_, err := utils.DecodeCertificate([]byte(*ca))
if err != nil {
Expand All @@ -80,7 +78,6 @@ func ValidateCloudProfileConfig(cloudProfile *stackitv1alpha1.CloudProfileConfig
}

regionsFound := sets.NewString()
//nolint:staticcheck // SA1019: needed for migration purposes
for i, val := range cloudProfile.KeyStoneURLs {
idxPath := fldPath.Child("keyStoneURLs").Index(i)

Expand Down Expand Up @@ -111,13 +108,11 @@ func ValidateCloudProfileConfig(cloudProfile *stackitv1alpha1.CloudProfileConfig
}
}

//nolint:staticcheck // SA1019: needed for migration purposes
if cloudProfile.DHCPDomain != nil && len(*cloudProfile.DHCPDomain) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("dhcpDomain"), "must provide a dhcp domain when the key is specified"))
}

serverGroupPath := fldPath.Child("serverGroupPolicies")
//nolint:staticcheck // SA1019: needed for migration purposes
for i, policy := range cloudProfile.ServerGroupPolicies {
idxPath := serverGroupPath.Index(i)

Expand Down
Loading