Skip to content

Commit

Permalink
Upd k8s utils (#300)
Browse files Browse the repository at this point in the history
* nolint for "k8s.io/utils/pointer" is deprecated

* Upd k8s utils
  • Loading branch information
l0kix2 authored Jun 27, 2024
1 parent 4c04071 commit 85832ef
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion api/v1/ytsaurus_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/apimachinery/pkg/util/yaml"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
Expand Down
2 changes: 1 addition & 1 deletion controllers/remoteexecnodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
k8s.io/api v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
sigs.k8s.io/controller-runtime v0.16.5
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ=
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.16.5 h1:yr1cEJbX08xsTW6XEIzT13KHHmIyX8Umvme2cULvFZw=
sigs.k8s.io/controller-runtime v0.16.5/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
Expand Down
2 changes: 1 addition & 1 deletion pkg/components/exec_node_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path"

corev1 "k8s.io/api/core/v1"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

ytv1 "github.com/ytsaurus/yt-k8s-operator/api/v1"

Expand Down
8 changes: 5 additions & 3 deletions pkg/components/microservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ package components
import (
"context"

ptr "k8s.io/utils/pointer" //nolint:staticcheck

ytv1 "github.com/ytsaurus/yt-k8s-operator/api/v1"
ptr "k8s.io/utils/pointer"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"

"github.com/ytsaurus/yt-k8s-operator/pkg/apiproxy"
"github.com/ytsaurus/yt-k8s-operator/pkg/labeller"
"github.com/ytsaurus/yt-k8s-operator/pkg/resources"
"github.com/ytsaurus/yt-k8s-operator/pkg/ytconfig"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
)

// microservice manages common resources of YTsaurus service component
Expand Down
2 changes: 1 addition & 1 deletion pkg/components/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path"

"k8s.io/apimachinery/pkg/util/intstr"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/components/ytsaurus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"go.ytsaurus.tech/yt/go/yt"
"go.ytsaurus.tech/yt/go/yt/ythttp"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

ytv1 "github.com/ytsaurus/yt-k8s-operator/api/v1"
"github.com/ytsaurus/yt-k8s-operator/pkg/apiproxy"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package testutil
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

ytv1 "github.com/ytsaurus/yt-k8s-operator/api/v1"
"github.com/ytsaurus/yt-k8s-operator/pkg/consts"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/spec_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

ytv1 "github.com/ytsaurus/yt-k8s-operator/api/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ytconfig/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path"

corev1 "k8s.io/api/core/v1"
ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

"go.ytsaurus.tech/yt/go/yson"

Expand Down
5 changes: 3 additions & 2 deletions pkg/ytconfig/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (

"go.ytsaurus.tech/yt/go/yson"

ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

"k8s.io/apimachinery/pkg/api/resource"

corev1 "k8s.io/api/core/v1"

ytv1 "github.com/ytsaurus/yt-k8s-operator/api/v1"
"github.com/ytsaurus/yt-k8s-operator/pkg/consts"
corev1 "k8s.io/api/core/v1"
)

type NodeFlavor string
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"
"time"

ptr "k8s.io/utils/pointer"
ptr "k8s.io/utils/pointer" //nolint:staticcheck

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down

0 comments on commit 85832ef

Please sign in to comment.