Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#1198 from apricote/rename-v1beta1-…
Browse files Browse the repository at this point in the history
…v1alpha5

⚠️ rename v1beta1 to v1alpha5
  • Loading branch information
k8s-ci-robot authored Apr 19, 2022
2 parents aeedb58 + 311741f commit af6f623
Show file tree
Hide file tree
Showing 71 changed files with 1,175 additions and 1,175 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ linters-settings:
alias: infrav1alpha3
- pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha4
alias: infrav1alpha4
- pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1
- pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5
alias: infrav1
- pkg: sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors
alias: capoerrors
Expand Down
8 changes: 4 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ resources:
kind: OpenStackClusterTemplate
version: v1alpha4
- group: infrastructure
version: v1beta1
version: v1alpha5
kind: OpenStackCluster
- group: infrastructure
version: v1beta1
version: v1alpha5
kind: OpenStackMachine
- group: infrastructure
version: v1beta1
version: v1alpha5
kind: OpenStackMachineTemplate
- group: infrastructure
kind: OpenStackClusterTemplate
version: v1beta1
version: v1alpha5
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This provider's versions are compatible with the following versions of Cluster A
| OpenStack Provider v1alpha3 (v0.3) || | |
| OpenStack Provider v1alpha4 (v0.4) | || |
| OpenStack Provider v1alpha4 (v0.5) | | ||
| OpenStack Provider v1beta1 | | ||
| OpenStack Provider v1alpha5 | | ||


This provider's versions are able to install and manage the following versions of Kubernetes:
Expand All @@ -52,7 +52,7 @@ This provider's versions are able to install and manage the following versions o
| OpenStack Provider v1alpha3 (v0.3) |||||| |
| OpenStack Provider v1alpha4 (v0.4) | | | | |||
| OpenStack Provider v1alpha4 (v0.5) | | | | |||
| OpenStack Provider v1beta1 | | | | | ||
| OpenStack Provider v1alpha5 | | | | | ||

This provider's versions are able to install Kubernetes to the following versions of OpenStack:

Expand All @@ -61,7 +61,7 @@ This provider's versions are able to install Kubernetes to the following version
| OpenStack Provider v1alpha3 (v0.3) | + | + | + ||||| | |
| OpenStack Provider v1alpha4 (v0.4) | + | + | + | + | + | + || | |
| OpenStack Provider v1alpha4 (v0.5) | + | + | + | + | + | + || | |
| OpenStack Provider v1beta1 | + | + | + | + | + | + ||||
| OpenStack Provider v1alpha5 | + | + | + | + | + | + ||||

Test status:

Expand Down
110 changes: 55 additions & 55 deletions api/v1alpha3/conversion.go

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions api/v1alpha3/conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
ctrlconversion "sigs.k8s.io/controller-runtime/pkg/conversion"

infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1"
infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5"
)

func TestConvertTo(t *testing.T) {
Expand Down Expand Up @@ -120,7 +120,7 @@ func TestFuzzyConversion(t *testing.T) {

fuzzerFuncs := func(_ runtimeserializer.CodecFactory) []interface{} {
return []interface{}{
// Don't test spoke-hub-spoke conversion of v1alpha3 fields which are not in v1beta1
// Don't test spoke-hub-spoke conversion of v1alpha3 fields which are not in v1alpha5
func(v1alpha3ClusterSpec *OpenStackClusterSpec, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha3ClusterSpec)

Expand All @@ -135,7 +135,7 @@ func TestFuzzyConversion(t *testing.T) {
func(v1alpha3RootVolume *RootVolume, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha3RootVolume)

// In v1beta1 only DeviceType="disk" and SourceType="image" are supported
// In v1alpha5 only DeviceType="disk" and SourceType="image" are supported
v1alpha3RootVolume.DeviceType = "disk"
v1alpha3RootVolume.SourceType = "image"
},
Expand Down Expand Up @@ -173,7 +173,7 @@ func TestFuzzyConversion(t *testing.T) {
v1alpha3SubnetFilter.SortKey = ""
v1alpha3SubnetFilter.SortDir = ""

// TenantID and ProjectID are the same thing, so TenantID is removed in v1beta1
// TenantID and ProjectID are the same thing, so TenantID is removed in v1alpha5
// Test that we restore TenantID from ProjectID
v1alpha3SubnetFilter.TenantID = v1alpha3SubnetFilter.ProjectID
},
Expand All @@ -187,50 +187,50 @@ func TestFuzzyConversion(t *testing.T) {
v1alpha3Filter.SortKey = ""
v1alpha3Filter.SortDir = ""

// TenantID and ProjectID are the same thing, so TenantID is removed in v1beta1
// TenantID and ProjectID are the same thing, so TenantID is removed in v1alpha5
// Test that we restore TenantID from ProjectID
v1alpha3Filter.TenantID = v1alpha3Filter.ProjectID
},

// Don't test hub-spoke-hub conversion of v1beta1 fields which are not in v1alpha3
func(v1beta1ClusterSpec *infrav1.OpenStackClusterSpec, c fuzz.Continue) {
c.FuzzNoCustom(v1beta1ClusterSpec)
// Don't test hub-spoke-hub conversion of v1alpha5 fields which are not in v1alpha3
func(v1alpha5ClusterSpec *infrav1.OpenStackClusterSpec, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha5ClusterSpec)

v1beta1ClusterSpec.APIServerFixedIP = ""
v1beta1ClusterSpec.AllowAllInClusterTraffic = false
v1beta1ClusterSpec.DisableAPIServerFloatingIP = false
v1alpha5ClusterSpec.APIServerFixedIP = ""
v1alpha5ClusterSpec.AllowAllInClusterTraffic = false
v1alpha5ClusterSpec.DisableAPIServerFloatingIP = false
},
func(v1beta1MachineSpec *infrav1.OpenStackMachineSpec, c fuzz.Continue) {
c.FuzzNoCustom(v1beta1MachineSpec)
func(v1alpha5MachineSpec *infrav1.OpenStackMachineSpec, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha5MachineSpec)

v1beta1MachineSpec.Ports = nil
v1beta1MachineSpec.ImageUUID = ""
v1alpha5MachineSpec.Ports = nil
v1alpha5MachineSpec.ImageUUID = ""
},
func(v1beta1Network *infrav1.Network, c fuzz.Continue) {
c.FuzzNoCustom(v1beta1Network)
func(v1alpha5Network *infrav1.Network, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha5Network)

v1beta1Network.PortOpts = nil
v1alpha5Network.PortOpts = nil
},
func(v1beta1ClusterStatus *infrav1.OpenStackClusterStatus, c fuzz.Continue) {
c.FuzzNoCustom(v1beta1ClusterStatus)
func(v1alpha5ClusterStatus *infrav1.OpenStackClusterStatus, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha5ClusterStatus)

v1beta1ClusterStatus.FailureMessage = nil
v1beta1ClusterStatus.FailureReason = nil
if v1beta1ClusterStatus.Bastion != nil {
v1beta1ClusterStatus.Bastion.ImageUUID = ""
v1alpha5ClusterStatus.FailureMessage = nil
v1alpha5ClusterStatus.FailureReason = nil
if v1alpha5ClusterStatus.Bastion != nil {
v1alpha5ClusterStatus.Bastion.ImageUUID = ""
}
},
func(v1beta1OpenStackIdentityRef *infrav1.OpenStackIdentityReference, c fuzz.Continue) {
c.FuzzNoCustom(v1beta1OpenStackIdentityRef)
func(v1alpha5OpenStackIdentityRef *infrav1.OpenStackIdentityReference, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha5OpenStackIdentityRef)

// IdentityRef was assumed to be a Secret in v1alpha3
v1beta1OpenStackIdentityRef.Kind = "Secret"
v1alpha5OpenStackIdentityRef.Kind = "Secret"
},
func(v1beta1RootVolume *infrav1.RootVolume, c fuzz.Continue) {
c.FuzzNoCustom(v1beta1RootVolume)
func(v1alpha5RootVolume *infrav1.RootVolume, c fuzz.Continue) {
c.FuzzNoCustom(v1alpha5RootVolume)

v1beta1RootVolume.VolumeType = ""
v1beta1RootVolume.AvailabilityZone = ""
v1alpha5RootVolume.VolumeType = ""
v1alpha5RootVolume.AvailabilityZone = ""
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha3/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5
package v1alpha3
Loading

0 comments on commit af6f623

Please sign in to comment.