Skip to content

Commit d0d0e88

Browse files
authored
Merge pull request #4154 from Ankitasw/bump-capi
Bump CAPI to v1.4.1
2 parents 5467efe + 8aa634e commit d0d0e88

37 files changed

+216
-216
lines changed

api/v1beta2/awsclustercontrolleridentity_webhook_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func TestAWSClusterControllerIdentityDefault(t *testing.T) {
266266
ObjectMeta: metav1.ObjectMeta{
267267
Name: "default",
268268
Labels: map[string]string{
269-
clusterv1.ClusterctlMoveHierarchyLabelName: "",
269+
clusterv1.ClusterctlMoveHierarchyLabel: "",
270270
},
271271
},
272272
},
@@ -277,15 +277,15 @@ func TestAWSClusterControllerIdentityDefault(t *testing.T) {
277277
ObjectMeta: metav1.ObjectMeta{
278278
Name: "default",
279279
Labels: map[string]string{
280-
clusterv1.ClusterctlMoveHierarchyLabelName: "abc",
280+
clusterv1.ClusterctlMoveHierarchyLabel: "abc",
281281
},
282282
},
283283
},
284284
afterAWSClusterControllerIdentity: &AWSClusterControllerIdentity{
285285
ObjectMeta: metav1.ObjectMeta{
286286
Name: "default",
287287
Labels: map[string]string{
288-
clusterv1.ClusterctlMoveHierarchyLabelName: "abc",
288+
clusterv1.ClusterctlMoveHierarchyLabel: "abc",
289289
},
290290
},
291291
},
@@ -298,7 +298,7 @@ func TestAWSClusterControllerIdentityDefault(t *testing.T) {
298298
awsClusterControllerIdentity := tt.beforeAWSClusterControllerIdentity.DeepCopy()
299299
g.Expect(testEnv.Create(ctx, awsClusterControllerIdentity)).To(Succeed())
300300
g.Expect(len(awsClusterControllerIdentity.ObjectMeta.Labels)).To(Not(Equal(0)))
301-
g.Expect(awsClusterControllerIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabelName]).To(Equal(tt.afterAWSClusterControllerIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabelName]))
301+
g.Expect(awsClusterControllerIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabel]).To(Equal(tt.afterAWSClusterControllerIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabel]))
302302
g.Expect(testEnv.Delete(ctx, awsClusterControllerIdentity)).To(Succeed())
303303
})
304304
}

api/v1beta2/awsclusterroleidentity_webhook_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func TestAWSClusterRoleIdentityDefault(t *testing.T) {
249249
ObjectMeta: metav1.ObjectMeta{
250250
Name: "default",
251251
Labels: map[string]string{
252-
clusterv1.ClusterctlMoveHierarchyLabelName: "",
252+
clusterv1.ClusterctlMoveHierarchyLabel: "",
253253
},
254254
},
255255
Spec: AWSClusterRoleIdentitySpec{
@@ -266,7 +266,7 @@ func TestAWSClusterRoleIdentityDefault(t *testing.T) {
266266
ObjectMeta: metav1.ObjectMeta{
267267
Name: "default",
268268
Labels: map[string]string{
269-
clusterv1.ClusterctlMoveHierarchyLabelName: "abc",
269+
clusterv1.ClusterctlMoveHierarchyLabel: "abc",
270270
},
271271
},
272272
Spec: AWSClusterRoleIdentitySpec{
@@ -280,7 +280,7 @@ func TestAWSClusterRoleIdentityDefault(t *testing.T) {
280280
ObjectMeta: metav1.ObjectMeta{
281281
Name: "default",
282282
Labels: map[string]string{
283-
clusterv1.ClusterctlMoveHierarchyLabelName: "abc",
283+
clusterv1.ClusterctlMoveHierarchyLabel: "abc",
284284
},
285285
},
286286
Spec: AWSClusterRoleIdentitySpec{
@@ -299,7 +299,7 @@ func TestAWSClusterRoleIdentityDefault(t *testing.T) {
299299
awsClusterRoleIdentity := tt.beforeAWSClusterRoleIdentity.DeepCopy()
300300
g.Expect(testEnv.Create(ctx, awsClusterRoleIdentity)).To(Succeed())
301301
g.Expect(len(awsClusterRoleIdentity.ObjectMeta.Labels)).To(Not(Equal(0)))
302-
g.Expect(awsClusterRoleIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabelName]).To(Equal(tt.afterAWSClusterRoleIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabelName]))
302+
g.Expect(awsClusterRoleIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabel]).To(Equal(tt.afterAWSClusterRoleIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabel]))
303303
g.Expect(testEnv.Delete(ctx, awsClusterRoleIdentity)).To(Succeed())
304304
})
305305
}

api/v1beta2/awsclusterstaticidentity_webhook_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func TestAWSClusterStaticIdentityDefault(t *testing.T) {
222222
ObjectMeta: metav1.ObjectMeta{
223223
Name: "default",
224224
Labels: map[string]string{
225-
clusterv1.ClusterctlMoveHierarchyLabelName: "",
225+
clusterv1.ClusterctlMoveHierarchyLabel: "",
226226
},
227227
},
228228
Spec: AWSClusterStaticIdentitySpec{
@@ -238,7 +238,7 @@ func TestAWSClusterStaticIdentityDefault(t *testing.T) {
238238
ObjectMeta: metav1.ObjectMeta{
239239
Name: "default",
240240
Labels: map[string]string{
241-
clusterv1.ClusterctlMoveHierarchyLabelName: "abc",
241+
clusterv1.ClusterctlMoveHierarchyLabel: "abc",
242242
},
243243
},
244244
Spec: AWSClusterStaticIdentitySpec{
@@ -251,7 +251,7 @@ func TestAWSClusterStaticIdentityDefault(t *testing.T) {
251251
ObjectMeta: metav1.ObjectMeta{
252252
Name: "default",
253253
Labels: map[string]string{
254-
clusterv1.ClusterctlMoveHierarchyLabelName: "abc",
254+
clusterv1.ClusterctlMoveHierarchyLabel: "abc",
255255
},
256256
},
257257
Spec: AWSClusterStaticIdentitySpec{
@@ -269,7 +269,7 @@ func TestAWSClusterStaticIdentityDefault(t *testing.T) {
269269
awsClusterStaticIdentity := tt.beforeAWSClusterStaticIdentity.DeepCopy()
270270
g.Expect(testEnv.Create(ctx, awsClusterStaticIdentity)).To(Succeed())
271271
g.Expect(len(awsClusterStaticIdentity.ObjectMeta.Labels)).To(Not(Equal(0)))
272-
g.Expect(awsClusterStaticIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabelName]).To(Equal(tt.afterAWSClusterStaticIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabelName]))
272+
g.Expect(awsClusterStaticIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabel]).To(Equal(tt.afterAWSClusterStaticIdentity.ObjectMeta.Labels[clusterv1.ClusterctlMoveHierarchyLabel]))
273273
g.Expect(testEnv.Delete(ctx, awsClusterStaticIdentity)).To(Succeed())
274274
})
275275
}

api/v1beta2/defaults.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func SetDefaults_Labels(obj *metav1.ObjectMeta) { //nolint:golint,stylecheck
7676
// Defaults to set label if no labels have been set
7777
if obj.Labels == nil {
7878
obj.Labels = map[string]string{
79-
clusterv1.ClusterctlMoveHierarchyLabelName: ""}
79+
clusterv1.ClusterctlMoveHierarchyLabel: ""}
8080
}
8181
}
8282

bootstrap/eks/controllers/eksconfig_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func (r *EKSConfigReconciler) ClusterToEKSConfigs(o client.Object) []ctrl.Reques
366366
selectors := []client.ListOption{
367367
client.InNamespace(c.Namespace),
368368
client.MatchingLabels{
369-
clusterv1.ClusterLabelName: c.Name,
369+
clusterv1.ClusterNameLabel: c.Name,
370370
},
371371
}
372372

@@ -393,7 +393,7 @@ func (r *EKSConfigReconciler) createBootstrapSecret(ctx context.Context, cluster
393393
Name: config.Name,
394394
Namespace: config.Namespace,
395395
Labels: map[string]string{
396-
clusterv1.ClusterLabelName: cluster.Name,
396+
clusterv1.ClusterNameLabel: cluster.Name,
397397
},
398398
OwnerReferences: []metav1.OwnerReference{
399399
{

bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func newMachine(cluster *clusterv1.Cluster, name string) *clusterv1.Machine {
260260
if cluster != nil {
261261
machine.Spec.ClusterName = cluster.Name
262262
machine.ObjectMeta.Labels = map[string]string{
263-
clusterv1.ClusterLabelName: cluster.Name,
263+
clusterv1.ClusterNameLabel: cluster.Name,
264264
}
265265
}
266266
return machine
@@ -294,7 +294,7 @@ func newMachinePool(cluster *clusterv1.Cluster, name string) *v1beta1.MachinePoo
294294
if cluster != nil {
295295
mp.Spec.ClusterName = cluster.Name
296296
mp.ObjectMeta.Labels = map[string]string{
297-
clusterv1.ClusterLabelName: cluster.Name,
297+
clusterv1.ClusterNameLabel: cluster.Name,
298298
}
299299
}
300300
return mp

config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ spec:
815815
description: The machine address.
816816
type: string
817817
type:
818-
description: Machine address type, one of Hostname, ExternalIP
819-
or InternalIP.
818+
description: Machine address type, one of Hostname, ExternalIP,
819+
InternalIP, ExternalDNS or InternalDNS.
820820
type: string
821821
required:
822822
- address
@@ -2233,8 +2233,8 @@ spec:
22332233
description: The machine address.
22342234
type: string
22352235
type:
2236-
description: Machine address type, one of Hostname, ExternalIP
2237-
or InternalIP.
2236+
description: Machine address type, one of Hostname, ExternalIP,
2237+
InternalIP, ExternalDNS or InternalDNS.
22382238
type: string
22392239
required:
22402240
- address

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ spec:
425425
description: The machine address.
426426
type: string
427427
type:
428-
description: Machine address type, one of Hostname, ExternalIP
429-
or InternalIP.
428+
description: Machine address type, one of Hostname, ExternalIP,
429+
InternalIP, ExternalDNS or InternalDNS.
430430
type: string
431431
required:
432432
- address
@@ -1303,8 +1303,8 @@ spec:
13031303
description: The machine address.
13041304
type: string
13051305
type:
1306-
description: Machine address type, one of Hostname, ExternalIP
1307-
or InternalIP.
1306+
description: Machine address type, one of Hostname, ExternalIP,
1307+
InternalIP, ExternalDNS or InternalDNS.
13081308
type: string
13091309
required:
13101310
- address

config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachines.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ spec:
387387
description: The machine address.
388388
type: string
389389
type:
390-
description: Machine address type, one of Hostname, ExternalIP
391-
or InternalIP.
390+
description: Machine address type, one of Hostname, ExternalIP,
391+
InternalIP, ExternalDNS or InternalDNS.
392392
type: string
393393
required:
394394
- address
@@ -894,8 +894,8 @@ spec:
894894
description: The machine address.
895895
type: string
896896
type:
897-
description: Machine address type, one of Hostname, ExternalIP
898-
or InternalIP.
897+
description: Machine address type, one of Hostname, ExternalIP,
898+
InternalIP, ExternalDNS or InternalDNS.
899899
type: string
900900
required:
901901
- address

controllers/awsmachine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ func (r *AWSMachineReconciler) requeueAWSMachinesForUnpausedCluster(log logger.W
988988
}
989989

990990
func (r *AWSMachineReconciler) requestsForCluster(log logger.Wrapper, namespace, name string) []ctrl.Request {
991-
labels := map[string]string{clusterv1.ClusterLabelName: name}
991+
labels := map[string]string{clusterv1.ClusterNameLabel: name}
992992
machineList := &clusterv1.MachineList{}
993993
if err := r.Client.List(context.TODO(), machineList, client.InNamespace(namespace), client.MatchingLabels(labels)); err != nil {
994994
log.Error(err, "Failed to get owned Machines, skipping mapping.")

0 commit comments

Comments
 (0)