Skip to content

Commit ed6bbfc

Browse files
committed
f
1 parent 31d7b7f commit ed6bbfc

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

api/internal/clients/kube.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ import (
2222
var localSchemeBuilder = runtime.NewSchemeBuilder(
2323
apiextensionsv1.AddToScheme,
2424
embeddedclusterv1beta1.AddToScheme,
25-
autopilotv1beta2.Install,
26-
k0sv1beta1.Install,
27-
k0shelmv1beta1.Install,
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+
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
28+
k0sv1beta1.AddToScheme,
29+
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
30+
k0shelmv1beta1.AddToScheme,
2831
velerov1.AddToScheme,
2932
)
3033

operator/pkg/cli/migratev2/k0s_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +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.Install(scheme)
91+
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
92+
err := k0sv1beta1.AddToScheme(scheme)
9293
require.NoError(t, err)
93-
err = k0shelmv1beta1.Install(scheme)
94+
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
95+
err = k0shelmv1beta1.AddToScheme(scheme)
9496
require.NoError(t, err)
9597

9698
cli := fake.NewClientBuilder().

pkg-new/upgrade/upgrade_test.go

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

3131
scheme := runtime.NewScheme()
32-
require.NoError(t, k0sv1beta1.Install(scheme))
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))
3334

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

pkg/kubeutils/client.go

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

2525
func init() {
2626
utilruntime.Must(embeddedclusterv1beta1.AddToScheme(Scheme))
27-
utilruntime.Must(autopilotv1beta2.Install(Scheme))
28-
utilruntime.Must(k0sv1beta1.Install(Scheme))
29-
utilruntime.Must(k0shelmv1beta1.Install(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+
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
30+
utilruntime.Must(k0sv1beta1.AddToScheme(Scheme))
31+
//nolint:staticcheck // SA1019 we are using the deprecated scheme for backwards compatibility, we can remove this once we stop supporting k0s v1.30
32+
utilruntime.Must(k0shelmv1beta1.AddToScheme(Scheme))
3033
utilruntime.Must(velerov1.AddToScheme(Scheme))
3134
}
3235

0 commit comments

Comments
 (0)