Skip to content

Commit

Permalink
Deprecate v1alpha3 and v1alpha4 apiVersions
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
  • Loading branch information
killianmuldoon committed Aug 7, 2023
1 parent 32cbee4 commit 2f294c7
Show file tree
Hide file tree
Showing 29 changed files with 152 additions and 42 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ issues:
- linters:
- staticcheck
text: "SA1019: failureDomain.AutoConfigure is deprecated"
# Specific exclude rules for deprecated packages that are still part of the codebase. These
# should be removed as the referenced deprecated packages are removed from the project.
- linters:
- staticcheck
text: "SA1019: .* is deprecated: This package will be removed in one of the next releases."
- path: "test/e2e/*"
linters:
- gosec
Expand Down
2 changes: 2 additions & 0 deletions apis/v1alpha3/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ limitations under the License.
// +kubebuilder:object:generate=true
// +groupName=infrastructure.cluster.x-k8s.io
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
package v1alpha3
6 changes: 5 additions & 1 deletion apis/v1alpha3/haproxyloadbalancer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ type HAProxyLoadBalancerStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=haproxyloadbalancers,scope=Namespaced
// +kubebuilder:subresource:status

// HAProxyLoadBalancer is the Schema for the haproxyloadbalancers API
// DEPRECATED: will be removed in v1alpha4
//
// Deprecated: This type will be removed in v1alpha4.
type HAProxyLoadBalancer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -78,6 +80,8 @@ type HAProxyLoadBalancer struct {
// +kubebuilder:object:root=true

// HAProxyLoadBalancerList contains a list of HAProxyLoadBalancer
//
// Deprecated: This type will be removed in one of the next releases.
type HAProxyLoadBalancerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha3/vspherecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ type VSphereClusterStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vsphereclusters,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Cluster infrastructure is ready for VSphereMachine"
Expand All @@ -92,6 +93,8 @@ type VSphereClusterStatus struct {
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine"

// VSphereCluster is the Schema for the vsphereclusters API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -111,6 +114,8 @@ func (m *VSphereCluster) SetConditions(conditions clusterv1.Conditions) {
// +kubebuilder:object:root=true

// VSphereClusterList contains a list of VSphereCluster
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha3/vsphereclusteridentity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ func (c *VSphereClusterIdentity) SetConditions(conditions clusterv1.Conditions)
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vsphereclusteridentities,scope=Cluster,categories=cluster-api
// +kubebuilder:subresource:status

// VSphereClusterIdentity defines the account to be used for reconciling clusters
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterIdentity struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -93,6 +96,8 @@ type VSphereClusterIdentity struct {

// +kubebuilder:object:root=true
// VSphereClusterIdentityList contains a list of VSphereClusterIdentity
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterIdentityList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha3/vspheredeploymentzone_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ type VSphereDeploymentZoneStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspheredeploymentzones,scope=Cluster,categories=cluster-api
// +kubebuilder:subresource:status

// VSphereDeploymentZone is the Schema for the vspheredeploymentzones API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereDeploymentZone struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -93,6 +96,8 @@ type VSphereDeploymentZone struct {
// +kubebuilder:object:root=true

// VSphereDeploymentZoneList contains a list of VSphereDeploymentZone
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereDeploymentZoneList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha3/vspherefailuredomain_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ type FailureDomainHosts struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspherefailuredomains,scope=Cluster,categories=cluster-api

// VSphereFailureDomain is the Schema for the vspherefailuredomains API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereFailureDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -102,6 +105,8 @@ type VSphereFailureDomain struct {
// +kubebuilder:object:root=true

// VSphereFailureDomainList contains a list of VSphereFailureDomain
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereFailureDomainList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha3/vspheremachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ type VSphereMachineStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspheremachines,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this VSphereMachine belongs"
Expand All @@ -111,6 +112,8 @@ type VSphereMachineStatus struct {
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine"

// VSphereMachine is the Schema for the vspheremachines API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -130,6 +133,8 @@ func (m *VSphereMachine) SetConditions(conditions clusterv1.Conditions) {
// +kubebuilder:object:root=true

// VSphereMachineList contains a list of VSphereMachine
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha3/vspheremachinetemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ type VSphereMachineTemplateSpec struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspheremachinetemplates,scope=Namespaced,categories=cluster-api

// VSphereMachineTemplate is the Schema for the vspheremachinetemplates API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachineTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -40,6 +43,8 @@ type VSphereMachineTemplate struct {
// +kubebuilder:object:root=true

// VSphereMachineTemplateList contains a list of VSphereMachineTemplate
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachineTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha3/vspherevm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,13 @@ type VSphereVMStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspherevms,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status

// VSphereVM is the Schema for the vspherevms API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereVM struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -149,6 +152,8 @@ func (m *VSphereVM) SetConditions(conditions clusterv1.Conditions) {
// +kubebuilder:object:root=true

// VSphereVMList contains a list of VSphereVM
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereVMList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions apis/v1alpha4/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ limitations under the License.
// +kubebuilder:object:generate=true
// +groupName=infrastructure.cluster.x-k8s.io
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
package v1alpha4
5 changes: 5 additions & 0 deletions apis/v1alpha4/vspherecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type VSphereClusterStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vsphereclusters,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Cluster infrastructure is ready for VSphereMachine"
Expand All @@ -70,6 +71,8 @@ type VSphereClusterStatus struct {
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine"

// VSphereCluster is the Schema for the vsphereclusters API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -89,6 +92,8 @@ func (c *VSphereCluster) SetConditions(conditions clusterv1.Conditions) {
// +kubebuilder:object:root=true

// VSphereClusterList contains a list of VSphereCluster
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha4/vsphereclusteridentity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ func (c *VSphereClusterIdentity) SetConditions(conditions clusterv1.Conditions)
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vsphereclusteridentities,scope=Cluster,categories=cluster-api
// +kubebuilder:subresource:status

// VSphereClusterIdentity defines the account to be used for reconciling clusters
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterIdentity struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -93,6 +96,8 @@ type VSphereClusterIdentity struct {

// +kubebuilder:object:root=true
// VSphereClusterIdentityList contains a list of VSphereClusterIdentity
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterIdentityList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha4/vsphereclustertemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ type VSphereClusterTemplateSpec struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vsphereclustertemplates,scope=Namespaced,categories=cluster-api

// VSphereClusterTemplate is the Schema for the vsphereclustertemplates API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -40,6 +43,8 @@ type VSphereClusterTemplate struct {
// +kubebuilder:object:root=true

// VSphereClusterTemplateList contains a list of VSphereClusterTemplate.
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereClusterTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha4/vspheredeploymentzone_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ type VSphereDeploymentZoneStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspheredeploymentzones,scope=Cluster,categories=cluster-api
// +kubebuilder:subresource:status

// VSphereDeploymentZone is the Schema for the vspheredeploymentzones API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereDeploymentZone struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -101,6 +104,8 @@ func (z *VSphereDeploymentZone) SetConditions(conditions clusterv1.Conditions) {
// +kubebuilder:object:root=true

// VSphereDeploymentZoneList contains a list of VSphereDeploymentZone
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereDeploymentZoneList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha4/vspherefailuredomain_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,12 @@ type FailureDomainHosts struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspherefailuredomains,scope=Cluster,categories=cluster-api

// VSphereFailureDomain is the Schema for the vspherefailuredomains API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereFailureDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -103,6 +106,8 @@ type VSphereFailureDomain struct {
// +kubebuilder:object:root=true

// VSphereFailureDomainList contains a list of VSphereFailureDomain
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereFailureDomainList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha4/vspheremachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ type VSphereMachineStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspheremachines,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this VSphereMachine belongs"
Expand All @@ -111,6 +112,8 @@ type VSphereMachineStatus struct {
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine"

// VSphereMachine is the Schema for the vspheremachines API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -130,6 +133,8 @@ func (m *VSphereMachine) SetConditions(conditions clusterv1.Conditions) {
// +kubebuilder:object:root=true

// VSphereMachineList contains a list of VSphereMachine
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/v1alpha4/vspheremachinetemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ type VSphereMachineTemplateSpec struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=vspheremachinetemplates,scope=Namespaced,categories=cluster-api

// VSphereMachineTemplate is the Schema for the vspheremachinetemplates API
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachineTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -40,6 +43,8 @@ type VSphereMachineTemplate struct {
// +kubebuilder:object:root=true

// VSphereMachineTemplateList contains a list of VSphereMachineTemplate
//
// Deprecated: This type will be removed in one of the next releases.
type VSphereMachineTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
Loading

0 comments on commit 2f294c7

Please sign in to comment.