Skip to content

Commit

Permalink
Stop serving v1alpha3 API types
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
  • Loading branch information
killianmuldoon committed May 16, 2023
1 parent 4350ec2 commit 49a9154
Show file tree
Hide file tree
Showing 37 changed files with 58 additions and 17 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha3/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ func (v APIEndpoint) String() string {
// ANCHOR_END: APIEndpoint

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:resource:path=clusters,shortName=cl,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed"
Expand All @@ -224,6 +225,7 @@ func (c *Cluster) SetConditions(conditions Conditions) {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// ClusterList contains a list of Cluster.
type ClusterList struct {
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha3/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ limitations under the License.
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
// +kubebuilder:unservedversion
package v1alpha3
2 changes: 2 additions & 0 deletions api/v1alpha3/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ type Bootstrap struct {
// ANCHOR_END: Bootstrap

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:resource:path=machines,shortName=ma,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="Provider ID"
Expand Down Expand Up @@ -266,6 +267,7 @@ func (m *Machine) SetConditions(conditions Conditions) {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// MachineList contains a list of Machine.
//
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha3/machinedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:resource:path=machinedeployments,shortName=md,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
Expand All @@ -262,6 +263,7 @@ type MachineDeployment struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// MachineDeploymentList contains a list of MachineDeployment.
//
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha3/machinehealthcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ type MachineHealthCheckStatus struct {
// ANCHOR_END: MachineHealthCheckStatus

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:resource:path=machinehealthchecks,shortName=mhc;mhcs,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="MaxUnhealthy",type="string",JSONPath=".spec.maxUnhealthy",description="Maximum number of unhealthy machines allowed"
Expand Down Expand Up @@ -145,6 +146,7 @@ func (m *MachineHealthCheck) SetConditions(conditions Conditions) {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// MachineHealthCheckList contains a list of MachineHealthCheck.
//
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha3/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func (m *MachineSet) Validate() field.ErrorList {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:resource:path=machinesets,shortName=ms,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
Expand All @@ -204,6 +205,7 @@ type MachineSet struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// MachineSetList contains a list of MachineSet.
//
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha3/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import (
)

func TestClusterConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")

g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
g.Expect(err).ToNot(HaveOccurred())
Expand All @@ -48,6 +50,7 @@ func TestClusterConversion(t *testing.T) {
}

func TestMachineSetConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
g.Expect(err).ToNot(HaveOccurred())
Expand Down Expand Up @@ -75,6 +78,7 @@ func TestMachineSetConversion(t *testing.T) {
}

func TestMachineDeploymentConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
g.Expect(err).ToNot(HaveOccurred())
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/kubeadm/api/v1alpha3/kubeadmconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ type KubeadmConfigStatus struct {
}

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

Expand All @@ -157,6 +158,7 @@ func (c *KubeadmConfig) SetConditions(conditions clusterv1alpha3.Conditions) {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// KubeadmConfigList contains a list of KubeadmConfig.
//
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/kubeadm/api/v1alpha3/kubeadmconfigtemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type KubeadmConfigTemplateResource struct {
}

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

// KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API.
Expand All @@ -44,6 +45,7 @@ type KubeadmConfigTemplate struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// KubeadmConfigTemplateList contains a list of KubeadmConfigTemplate.
//
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/kubeadm/api/v1alpha3/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
)

func TestKubeadmConfigConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
g.Expect(err).ToNot(HaveOccurred())
Expand All @@ -49,6 +50,7 @@ func TestKubeadmConfigConversion(t *testing.T) {
}

func TestKubeadmConfigTemplateConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
g.Expect(err).ToNot(HaveOccurred())
Expand Down

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

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

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

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

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_clusters.yaml

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

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml

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

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml

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

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinepools.yaml

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

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machines.yaml

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

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinesets.yaml

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

Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ type KubeadmControlPlaneStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:resource:path=kubeadmcontrolplanes,shortName=kcp,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
Expand Down Expand Up @@ -217,6 +218,7 @@ func (in *KubeadmControlPlane) SetConditions(conditions clusterv1alpha3.Conditio
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// KubeadmControlPlaneList contains a list of KubeadmControlPlane.
//
Expand Down
1 change: 1 addition & 0 deletions controlplane/kubeadm/api/v1alpha3/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestKubeadmControlPlaneConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
g := NewWithT(t)

ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
Expand Down

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

4 changes: 2 additions & 2 deletions docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ maintainers of providers and consumers of our Go API.

### Deprecation

-
- API version `v1alpha3` is not served anymore from v1.5 (users can enable it manually in case they are lagging behind with deprecation cycles). Important: `v1alpha3` will be removed in 1.6.

### Removals

-
- API version`v1alpha4` is deprecated and CAPI will stop serving this version in v1.6.

### API Changes

Expand Down
2 changes: 2 additions & 0 deletions exp/addons/api/v1alpha3/clusterresourceset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (m *ClusterResourceSet) SetConditions(conditions clusterv1alpha3.Conditions
}

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

Expand All @@ -126,6 +127,7 @@ type ClusterResourceSet struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// ClusterResourceSetList contains a list of ClusterResourceSet.
//
Expand Down
2 changes: 2 additions & 0 deletions exp/addons/api/v1alpha3/clusterresourcesetbinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func (c *ClusterResourceSetBinding) DeleteBinding(clusterResourceSet *ClusterRes
}

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

Expand All @@ -124,6 +125,7 @@ type ClusterResourceSetBindingSpec struct {
// ANCHOR_END: ClusterResourceSetBindingSpec

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// ClusterResourceSetBindingList contains a list of ClusterResourceSetBinding.
//
Expand Down
2 changes: 2 additions & 0 deletions exp/addons/api/v1alpha3/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
)

func TestClusterResourceSetConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
g.Expect(err).ToNot(HaveOccurred())
Expand Down Expand Up @@ -62,6 +63,7 @@ func TestClusterResourceSetConversion(t *testing.T) {
}

func TestClusterResourceSetBindingConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, fmt.Sprintf("conversion-webhook-%s", util.RandomString(5)))
g.Expect(err).ToNot(HaveOccurred())
Expand Down
2 changes: 2 additions & 0 deletions exp/api/v1alpha3/machinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:resource:path=machinepools,shortName=mp,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas
Expand Down Expand Up @@ -234,6 +235,7 @@ func (m *MachinePool) SetConditions(conditions clusterv1alpha3.Conditions) {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// MachinePoolList contains a list of MachinePool.
//
Expand Down
1 change: 1 addition & 0 deletions exp/api/v1alpha3/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
)

func TestMachinePoolConversion(t *testing.T) {
t.Skipf("v1alpha3 is no longer served see: https://cluster-api.sigs.k8s.io/contributing#removal-of-v1alpha3--v1alpha4-apiversions")
// NOTE: MachinePool feature flag is disabled by default, thus preventing to create or update MachinePool.
// Enabling the feature flag temporarily for this test.
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.MachinePool, true)()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type APIEndpoint struct {
// +kubebuilder:resource:path=dockerclusters,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// DockerCluster is the Schema for the dockerclusters API.
//
Expand All @@ -94,6 +95,7 @@ func (c *DockerCluster) SetConditions(conditions clusterv1alpha3.Conditions) {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// DockerClusterList contains a list of DockerCluster.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ type DockerMachineStatus struct {

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

// DockerMachine is the Schema for the dockermachines API.
Expand All @@ -117,6 +118,7 @@ func (c *DockerMachine) SetConditions(conditions clusterv1alpha3.Conditions) {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion

// DockerMachineList contains a list of DockerMachine.
//
Expand Down
Loading

0 comments on commit 49a9154

Please sign in to comment.