Skip to content

Commit 7047cc5

Browse files
committed
🌱 Add alias to GenericProviderReconciler type
1 parent 6b72fcd commit 7047cc5

File tree

8 files changed

+43
-22
lines changed

8 files changed

+43
-22
lines changed

.golangci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
run:
22
timeout: 5m
33
go: "1.23"
4-
skip-files:
5-
- "zz_generated.*\\.go$"
64
allow-parallel-runners: true
75

86
linters:
@@ -145,6 +143,8 @@ issues:
145143
# supported will be caught by the default case in the switches.
146144
- "missing cases in switch of type v1.PlatformType: (\\.*)"
147145
exclude-use-default: false
146+
exclude-files:
147+
- "zz_generated.*\\.go$"
148148
exclude-rules:
149149
- linters:
150150
- staticcheck

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ GOTESTSUM_VER := v1.11.0
9090
GOTESTSUM_BIN := gotestsum
9191
GOTESTSUM := $(TOOLS_BIN_DIR)/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER)
9292

93-
GINKGO_VER := v2.20.1
93+
GINKGO_VER := v2.22.2
9494
GINKGO_BIN := ginkgo
9595
GINKGO := $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)
9696

api/v1alpha2/conditions_consts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ const (
2929
// IncorrectVersionFormatReason documents that the provider version is in the incorrect format.
3030
IncorrectVersionFormatReason = "IncorrectVersionFormat"
3131

32-
// IncorrectCoreProviderNameReason documents that the provider name is incorrect.
32+
// IncorrectCoreProviderNameReason documents that the Core provider name is incorrect.
3333
IncorrectCoreProviderNameReason = "IncorrectCoreProviderNameReason"
3434

3535
// EmptyVersionReason documents that the provider version is in the incorrect format.
3636
EmptyVersionReason = "EmptyVersionReason"
3737

38-
// FetchConfigValidationError documents that the FetchConfig is configured incorrectly.
38+
// FetchConfigValidationErrorReason documents that the FetchConfig is configured incorrectly.
3939
FetchConfigValidationErrorReason = "FetchConfigValidationError"
4040

4141
// UnknownProviderReason documents that the provider name is not the name of a known provider.

cmd/plugin/cmd/init_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
"sigs.k8s.io/cluster-api-operator/util"
3636
)
3737

38-
func TestCheckCAPIOpearatorAvailability(t *testing.T) {
38+
func TestCheckCAPIOperatorAvailability(t *testing.T) {
3939
tests := []struct {
4040
name string
4141
want bool
@@ -425,7 +425,7 @@ func getGenericProvider(ctx context.Context, client ctrlclient.Client, providerK
425425
}
426426

427427
return provider, nil
428-
case "RuntimExtensionProvider":
428+
case "RuntimeExtensionProvider":
429429
provider := &operatorv1.RuntimeExtensionProvider{}
430430
if err := client.Get(ctx, types.NamespacedName{Name: providerName, Namespace: providerNamespace}, provider); err != nil {
431431
return nil, err

controller/alias.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Copyright 2025 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package controller
18+
19+
import providercontroller "sigs.k8s.io/cluster-api-operator/internal/controller"
20+
21+
type GenericProviderReconciler = providercontroller.GenericProviderReconciler

test/e2e/air_gapped_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
102102
HaveStatusCondition(&coreProvider.Status.Conditions, operatorv1.ProviderInstalledCondition),
103103
), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
104104

105-
By("Waiting for status.IntalledVersion to be set")
105+
By("Waiting for status.InstalledVersion to be set")
106106
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(func() bool {
107107
return ptr.Equal(coreProvider.Status.InstalledVersion, ptr.To(coreProvider.Spec.Version))
108108
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -129,7 +129,7 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
129129
HaveStatusCondition(&coreProvider.Status.Conditions, operatorv1.ProviderInstalledCondition),
130130
), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
131131

132-
By("Waiting for status.IntalledVersion to be set")
132+
By("Waiting for status.InstalledVersion to be set")
133133
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(func() bool {
134134
return ptr.Equal(coreProvider.Status.InstalledVersion, ptr.To(coreProvider.Spec.Version))
135135
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

test/e2e/compressed_manifests_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
6767
HaveStatusCondition(&coreProvider.Status.Conditions, operatorv1.ProviderInstalledCondition),
6868
), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
6969

70-
By("Waiting for status.IntalledVersion to be set")
70+
By("Waiting for status.InstalledVersion to be set")
7171
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(func() bool {
7272
return ptr.Equal(coreProvider.Status.InstalledVersion, ptr.To(coreProvider.Spec.Version))
7373
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -94,7 +94,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
9494
HaveStatusCondition(&infraProvider.Status.Conditions, operatorv1.ProviderInstalledCondition),
9595
), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
9696

97-
By("Waiting for status.IntalledVersion to be set")
97+
By("Waiting for status.InstalledVersion to be set")
9898
WaitFor(ctx, For(infraProvider).In(bootstrapCluster).ToSatisfy(func() bool {
9999
return ptr.Equal(infraProvider.Status.InstalledVersion, ptr.To(infraProvider.Spec.Version))
100100
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -168,7 +168,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
168168
HaveStatusCondition(&infraProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
169169
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
170170

171-
By("Waiting for status.IntalledVersion to be set")
171+
By("Waiting for status.InstalledVersion to be set")
172172
WaitFor(ctx, For(infraProvider).In(bootstrapCluster).ToSatisfy(func() bool {
173173
return ptr.Equal(infraProvider.Status.InstalledVersion, ptr.To(infraProvider.Spec.Version))
174174
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

test/e2e/minimal_configuration_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ metadata:
112112
HaveStatusCondition(&coreProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
113113
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
114114

115-
By("Waiting for status.IntalledVersion to be set")
115+
By("Waiting for status.InstalledVersion to be set")
116116
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(func() bool {
117117
return ptr.Equal(coreProvider.Status.InstalledVersion, &coreProvider.Spec.Version)
118118
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -154,7 +154,7 @@ metadata:
154154
HaveStatusCondition(&bootstrapProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
155155
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
156156

157-
By("Waiting for status.IntalledVersion to be set")
157+
By("Waiting for status.InstalledVersion to be set")
158158
WaitFor(ctx, For(bootstrapProvider).In(bootstrapCluster).ToSatisfy(func() bool {
159159
return ptr.Equal(bootstrapProvider.Status.InstalledVersion, &bootstrapProvider.Spec.Version)
160160
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -189,7 +189,7 @@ metadata:
189189
HaveStatusCondition(&cpProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
190190
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
191191

192-
By("Waiting for status.IntalledVersion to be set")
192+
By("Waiting for status.InstalledVersion to be set")
193193
WaitFor(ctx, For(cpProvider).In(bootstrapCluster).ToSatisfy(func() bool {
194194
return ptr.Equal(cpProvider.Status.InstalledVersion, &cpProvider.Spec.Version)
195195
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -224,7 +224,7 @@ metadata:
224224
HaveStatusCondition(&infraProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
225225
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
226226

227-
By("Waiting for status.IntalledVersion to be set")
227+
By("Waiting for status.InstalledVersion to be set")
228228
WaitFor(ctx, For(infraProvider).In(bootstrapCluster).ToSatisfy(func() bool {
229229
return ptr.Equal(infraProvider.Status.InstalledVersion, &infraProvider.Spec.Version)
230230
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -266,7 +266,7 @@ metadata:
266266
HaveStatusCondition(&addonProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
267267
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
268268

269-
By("Waiting for status.IntalledVersion to be set")
269+
By("Waiting for status.InstalledVersion to be set")
270270
WaitFor(ctx, For(addonProvider).In(bootstrapCluster).ToSatisfy(func() bool {
271271
return ptr.Equal(addonProvider.Status.InstalledVersion, &addonProvider.Spec.Version)
272272
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -310,7 +310,7 @@ metadata:
310310
HaveStatusCondition(&ipamProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
311311
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
312312

313-
By("Waiting for status.IntalledVersion to be set")
313+
By("Waiting for status.InstalledVersion to be set")
314314
WaitFor(ctx, For(ipamProvider).In(bootstrapCluster).ToSatisfy(func() bool {
315315
return ptr.Equal(ipamProvider.Status.InstalledVersion, &ipamProvider.Spec.Version)
316316
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -426,7 +426,7 @@ metadata:
426426
HaveStatusCondition(&provider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
427427
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
428428

429-
By("Waiting for status.IntalledVersion to be set")
429+
By("Waiting for status.InstalledVersion to be set")
430430
WaitFor(ctx, For(provider).In(bootstrapCluster).ToSatisfy(func() bool {
431431
return ptr.Equal(provider.Status.InstalledVersion, &provider.Spec.Version)
432432
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -513,7 +513,7 @@ metadata:
513513
HaveStatusCondition(&provider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
514514
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
515515

516-
By("Waiting for status.IntalledVersion to be set")
516+
By("Waiting for status.InstalledVersion to be set")
517517
WaitFor(ctx, For(provider).In(bootstrapCluster).ToSatisfy(func() bool {
518518
return ptr.Equal(provider.Status.InstalledVersion, &provider.Spec.Version)
519519
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -600,7 +600,7 @@ metadata:
600600
HaveStatusCondition(&provider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
601601
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
602602

603-
By("Waiting for status.IntalledVersion to be set")
603+
By("Waiting for status.InstalledVersion to be set")
604604
WaitFor(ctx, For(provider).In(bootstrapCluster).ToSatisfy(func() bool {
605605
return ptr.Equal(provider.Status.InstalledVersion, &provider.Spec.Version)
606606
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
@@ -609,7 +609,7 @@ metadata:
609609
provider.Spec.Version = "v0.0.2"
610610
Expect(bootstrapCluster.Update(ctx, provider)).To(Succeed())
611611

612-
By("Waiting for status.IntalledVersion to be set")
612+
By("Waiting for status.InstalledVersion to be set")
613613
WaitFor(ctx, For(provider).In(bootstrapCluster).ToSatisfy(func() bool {
614614
return ptr.Equal(provider.Status.InstalledVersion, &provider.Spec.Version)
615615
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

0 commit comments

Comments
 (0)