@@ -107,13 +107,13 @@ func mustCreateTestController(t testing.TB, testConfigs ...*testConfig) (*machin
107
107
dynamicClientset := fakedynamic .NewSimpleDynamicClientWithCustomListKinds (
108
108
runtime .NewScheme (),
109
109
map [schema.GroupVersionResource ]string {
110
- {Group : "cluster.x-k8s.io" , Version : "v1alpha3" , Resource : "machinedeployments" }: "kindList" ,
111
- {Group : "cluster.x-k8s.io" , Version : "v1alpha3" , Resource : "machines" }: "kindList" ,
112
- {Group : "cluster.x-k8s.io" , Version : "v1alpha3" , Resource : "machinesets" }: "kindList" ,
113
- {Group : "cluster.x-k8s.io" , Version : "v1alpha3" , Resource : "machinepools" }: "kindList" ,
114
110
{Group : "cluster.x-k8s.io" , Version : "v1beta1" , Resource : "machinedeployments" }: "kindList" ,
115
111
{Group : "cluster.x-k8s.io" , Version : "v1beta1" , Resource : "machines" }: "kindList" ,
116
112
{Group : "cluster.x-k8s.io" , Version : "v1beta1" , Resource : "machinesets" }: "kindList" ,
113
+ {Group : "cluster.x-k8s.io" , Version : "v1beta2" , Resource : "machinedeployments" }: "kindList" ,
114
+ {Group : "cluster.x-k8s.io" , Version : "v1beta2" , Resource : "machines" }: "kindList" ,
115
+ {Group : "cluster.x-k8s.io" , Version : "v1beta2" , Resource : "machinesets" }: "kindList" ,
116
+ {Group : "cluster.x-k8s.io" , Version : "v1beta2" , Resource : "machinepools" }: "kindList" ,
117
117
{Group : "custom.x-k8s.io" , Version : "v1beta1" , Resource : "machinepools" }: "kindList" ,
118
118
{Group : "custom.x-k8s.io" , Version : "v1beta1" , Resource : "machinedeployments" }: "kindList" ,
119
119
{Group : "custom.x-k8s.io" , Version : "v1beta1" , Resource : "machines" }: "kindList" ,
@@ -151,7 +151,7 @@ func mustCreateTestController(t testing.TB, testConfigs ...*testConfig) (*machin
151
151
},
152
152
},
153
153
{
154
- GroupVersion : fmt .Sprintf ("%s/v1alpha3 " , defaultCAPIGroup ),
154
+ GroupVersion : fmt .Sprintf ("%s/v1beta2 " , defaultCAPIGroup ),
155
155
APIResources : []metav1.APIResource {
156
156
{
157
157
Name : resourceNameMachineDeployment ,
@@ -191,7 +191,7 @@ func mustCreateTestController(t testing.TB, testConfigs ...*testConfig) (*machin
191
191
192
192
gvr := schema.GroupVersionResource {
193
193
Group : action .GetResource ().Group ,
194
- Version : "v1alpha3 " ,
194
+ Version : "v1beta2 " ,
195
195
Resource : resource ,
196
196
}
197
197
@@ -366,7 +366,7 @@ func createTestConfigs(specs ...testSpec) []*testConfig {
366
366
config .machineSet = & unstructured.Unstructured {
367
367
Object : map [string ]interface {}{
368
368
"kind" : machineSetKind ,
369
- "apiVersion" : "cluster.x-k8s.io/v1alpha3 " ,
369
+ "apiVersion" : "cluster.x-k8s.io/v1beta2 " ,
370
370
"metadata" : map [string ]interface {}{
371
371
"name" : spec .machineSetName ,
372
372
"namespace" : spec .namespace ,
@@ -404,7 +404,7 @@ func createTestConfigs(specs ...testSpec) []*testConfig {
404
404
config .machineDeployment = & unstructured.Unstructured {
405
405
Object : map [string ]interface {}{
406
406
"kind" : machineDeploymentKind ,
407
- "apiVersion" : "cluster.x-k8s.io/v1alpha3 " ,
407
+ "apiVersion" : "cluster.x-k8s.io/v1beta2 " ,
408
408
"metadata" : map [string ]interface {}{
409
409
"name" : spec .machineDeploymentName ,
410
410
"namespace" : spec .namespace ,
@@ -416,9 +416,9 @@ func createTestConfigs(specs ...testSpec) []*testConfig {
416
416
"template" : map [string ]interface {}{
417
417
"spec" : map [string ]interface {}{
418
418
"infrastructureRef" : map [string ]interface {}{
419
- "apiVersion " : "infrastructure.cluster.x-k8s.io/v1beta1 " ,
420
- "kind" : machineTemplateKind ,
421
- "name" : "TestMachineTemplate" ,
419
+ "apiGroup " : "infrastructure.cluster.x-k8s.io" ,
420
+ "kind" : machineTemplateKind ,
421
+ "name" : "TestMachineTemplate" ,
422
422
},
423
423
},
424
424
},
@@ -506,7 +506,7 @@ func makeLinkedNodeAndMachine(i int, namespace, clusterName string, owner metav1
506
506
machine := & unstructured.Unstructured {
507
507
Object : map [string ]interface {}{
508
508
"kind" : machineKind ,
509
- "apiVersion" : "cluster.x-k8s.io/v1alpha3 " ,
509
+ "apiVersion" : "cluster.x-k8s.io/v1beta2 " ,
510
510
"metadata" : map [string ]interface {}{
511
511
"name" : fmt .Sprintf ("%s-%s-machine-%d" , namespace , owner .Name , i ),
512
512
"namespace" : namespace ,
@@ -1550,7 +1550,7 @@ func TestGetAPIGroupPreferredVersion(t *testing.T) {
1550
1550
{
1551
1551
description : "find version for default API group" ,
1552
1552
APIGroup : defaultCAPIGroup ,
1553
- preferredVersion : "v1alpha3 " ,
1553
+ preferredVersion : "v1beta2 " ,
1554
1554
envVar : "" ,
1555
1555
error : false ,
1556
1556
},
@@ -1584,7 +1584,7 @@ func TestGetAPIGroupPreferredVersion(t *testing.T) {
1584
1584
GroupVersion : fmt .Sprintf ("%s/v1beta1" , customCAPIGroup ),
1585
1585
},
1586
1586
{
1587
- GroupVersion : fmt .Sprintf ("%s/v1alpha3 " , defaultCAPIGroup ),
1587
+ GroupVersion : fmt .Sprintf ("%s/v1beta2 " , defaultCAPIGroup ),
1588
1588
},
1589
1589
{
1590
1590
GroupVersion : fmt .Sprintf ("%s/%s" , customCAPIGroup , customVersion ),
@@ -1595,7 +1595,7 @@ func TestGetAPIGroupPreferredVersion(t *testing.T) {
1595
1595
for _ , tc := range testCases {
1596
1596
t .Run (tc .description , func (t * testing.T ) {
1597
1597
t .Setenv (CAPIVersionEnvVar , tc .envVar )
1598
- version , err := getAPIGroupPreferredVersion (discoveryClient , tc .APIGroup )
1598
+ version , err := getCAPIGroupPreferredVersion (discoveryClient , tc .APIGroup )
1599
1599
if (err != nil ) != tc .error {
1600
1600
t .Errorf ("expected to have error: %t. Had an error: %t" , tc .error , err != nil )
1601
1601
}
@@ -1617,14 +1617,14 @@ func TestGroupVersionHasResource(t *testing.T) {
1617
1617
{
1618
1618
description : "true when it finds resource" ,
1619
1619
resourceName : resourceNameMachineDeployment ,
1620
- APIGroup : fmt .Sprintf ("%s/v1alpha3 " , defaultCAPIGroup ),
1620
+ APIGroup : fmt .Sprintf ("%s/v1beta2 " , defaultCAPIGroup ),
1621
1621
expected : true ,
1622
1622
error : false ,
1623
1623
},
1624
1624
{
1625
1625
description : "false when it does not find resource" ,
1626
1626
resourceName : "resourceDoesNotExist" ,
1627
- APIGroup : fmt .Sprintf ("%s/v1alpha3 " , defaultCAPIGroup ),
1627
+ APIGroup : fmt .Sprintf ("%s/v1beta2 " , defaultCAPIGroup ),
1628
1628
expected : false ,
1629
1629
error : false ,
1630
1630
},
@@ -1641,7 +1641,7 @@ func TestGroupVersionHasResource(t *testing.T) {
1641
1641
Fake : & clientgotesting.Fake {
1642
1642
Resources : []* metav1.APIResourceList {
1643
1643
{
1644
- GroupVersion : fmt .Sprintf ("%s/v1alpha3 " , defaultCAPIGroup ),
1644
+ GroupVersion : fmt .Sprintf ("%s/v1beta2 " , defaultCAPIGroup ),
1645
1645
APIResources : []metav1.APIResource {
1646
1646
{
1647
1647
Name : resourceNameMachineDeployment ,
0 commit comments