Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Zimin <[email protected]>
  • Loading branch information
AleksZimin committed Jan 27, 2025
1 parent cab97bc commit 02645ca
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
1 change: 1 addition & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ linters-settings:
- standard
- default
- prefix(d8-controller)
- prefix(csi-nfs-scheduler-extender)
- prefix(webhooks)

linters:
Expand Down
7 changes: 4 additions & 3 deletions images/csi-nfs-scheduler-extender/src/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ import (
"syscall"
"time"

"csi-nfs-scheduler-extender/pkg/kubutils"
"csi-nfs-scheduler-extender/pkg/logger"
"csi-nfs-scheduler-extender/pkg/scheduler"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
storagev1 "k8s.io/api/storage/v1"
Expand All @@ -38,6 +35,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/yaml"

"csi-nfs-scheduler-extender/pkg/kubutils"
"csi-nfs-scheduler-extender/pkg/logger"
"csi-nfs-scheduler-extender/pkg/scheduler"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions images/csi-nfs-scheduler-extender/src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ module csi-nfs-scheduler-extender
go 1.23.4

require (
github.com/deckhouse/csi-nfs/api v0.0.0-00010101000000-000000000000
github.com/deckhouse/csi-nfs/api v0.0.0-20250116103144-d23aedd591a3
github.com/go-logr/logr v1.4.2
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0
github.com/onsi/ginkgo/v2 v2.21.0
github.com/onsi/gomega v1.35.1
github.com/spf13/cobra v1.8.1
Expand All @@ -26,6 +25,7 @@ require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions images/csi-nfs-scheduler-extender/src/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0 h1:Q3jQ1NkFqv5o+F8dMmHd8SfEmlcwNeo1immFApntEwE=
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0/go.mod h1:E3vdYxHj2C2q6qo8/Da4g7P+IcwqRZyy3gJBzYybV9Y=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
Expand Down
6 changes: 3 additions & 3 deletions images/csi-nfs-scheduler-extender/src/pkg/scheduler/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"net/http"
"slices"

"csi-nfs-scheduler-extender/pkg/consts"
"csi-nfs-scheduler-extender/pkg/logger"

corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

"csi-nfs-scheduler-extender/pkg/consts"
"csi-nfs-scheduler-extender/pkg/logger"
)

func (s *scheduler) Filter(w http.ResponseWriter, r *http.Request) {
Expand Down
4 changes: 2 additions & 2 deletions images/csi-nfs-scheduler-extender/src/pkg/scheduler/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
"context"
"fmt"

"csi-nfs-scheduler-extender/pkg/logger"

v1alpha1 "github.com/deckhouse/csi-nfs/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
storagev1 "k8s.io/api/storage/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

"csi-nfs-scheduler-extender/pkg/logger"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (
"context"
"testing"

"csi-nfs-scheduler-extender/pkg/logger"

corev1 "k8s.io/api/core/v1"
storagev1 "k8s.io/api/storage/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

"csi-nfs-scheduler-extender/pkg/logger"
)

func TestShouldProcessPod(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package scheduler
import (
"testing"

"csi-nfs-scheduler-extender/pkg/logger"
"github.com/stretchr/testify/assert"

"csi-nfs-scheduler-extender/pkg/logger"
)

func TestPrioritize(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions images/csi-nfs-scheduler-extender/src/pkg/scheduler/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"fmt"
"net/http"

"csi-nfs-scheduler-extender/pkg/logger"

"sigs.k8s.io/controller-runtime/pkg/client"

"csi-nfs-scheduler-extender/pkg/logger"
)

type scheduler struct {
Expand Down

0 comments on commit 02645ca

Please sign in to comment.