Skip to content

Commit 79b93ea

Browse files
committed
f
1 parent a8f7d86 commit 79b93ea

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

api/internal/clients/kube.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import (
2222
var localSchemeBuilder = runtime.NewSchemeBuilder(
2323
apiextensionsv1.AddToScheme,
2424
embeddedclusterv1beta1.AddToScheme,
25-
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
26-
autopilotv1beta2.AddToScheme,
27-
k0sv1beta1.AddToScheme,
28-
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
29-
k0shelmv1beta1.AddToScheme,
25+
// we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
26+
autopilotv1beta2.Install,
27+
k0sv1beta1.Install,
28+
// we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
29+
k0shelmv1beta1.Install,
3030
velerov1.AddToScheme,
3131
)
3232

operator/pkg/cli/migratev2/k0s_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ func TestNeedsK0sChartCleanup(t *testing.T) {
8888
for _, tt := range tests {
8989
t.Run(tt.name, func(t *testing.T) {
9090
scheme := runtime.NewScheme()
91-
err := k0sv1beta1.AddToScheme(scheme)
91+
// we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
92+
err := k0sv1beta1.Install(scheme)
9293
require.NoError(t, err)
93-
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
94-
err = k0shelmv1beta1.AddToScheme(scheme)
94+
// we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
95+
err = k0shelmv1beta1.Install(scheme)
9596
require.NoError(t, err)
9697

9798
cli := fake.NewClientBuilder().

pkg-new/upgrade/upgrade_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ func TestUpdateClusterConfig(t *testing.T) {
2929
logger.SetLevel(logrus.ErrorLevel)
3030

3131
scheme := runtime.NewScheme()
32-
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
33-
require.NoError(t, k0sv1beta1.AddToScheme(scheme))
32+
require.NoError(t, k0sv1beta1.Install(scheme))
3433

3534
// We need to disable telemetry in a backwards compatible way with k0s v1.30 and v1.29
3635
// See - https://github.com/k0sproject/k0s/pull/4674/files#diff-eea4a0c68e41d694c3fd23b4865a7b28bcbba61dc9c642e33c2e2f5f7f9ee05d

pkg/kubeutils/client.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ var (
2424

2525
func init() {
2626
utilruntime.Must(embeddedclusterv1beta1.AddToScheme(Scheme))
27-
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
28-
utilruntime.Must(autopilotv1beta2.AddToScheme(Scheme))
29-
utilruntime.Must(k0sv1beta1.AddToScheme(Scheme))
30-
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
31-
utilruntime.Must(k0shelmv1beta1.AddToScheme(Scheme))
27+
// we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
28+
utilruntime.Must(autopilotv1beta2.Install(Scheme))
29+
// we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
30+
utilruntime.Must(k0sv1beta1.Install(Scheme))
31+
// we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
32+
utilruntime.Must(k0shelmv1beta1.Install(Scheme))
3233
utilruntime.Must(velerov1.AddToScheme(Scheme))
3334
}
3435

0 commit comments

Comments
 (0)