Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a787602
Clean up unused vars, funcs and types
ialidzhikov Aug 10, 2021
43f6169
Clean up .travis.yml
ialidzhikov Aug 10, 2021
9f270db
Merge pull request #325 from ialidzhikov/cleanup/travis-file
k8s-ci-robot Aug 11, 2021
c4cfca3
Merge pull request #324 from ialidzhikov/cleanup/unused
k8s-ci-robot Aug 11, 2021
46eede0
Squashed 'release-tools/' changes from c0a4fb1d..5489de6e
mauriciopoppe Sep 10, 2021
411e15a
Merge commit 'e8fd520aacfbdcc044d7e1de56f461a911566455' into prow-upd…
mauriciopoppe Sep 10, 2021
509145e
Merge pull request #327 from mauriciopoppe/prow-update-master
k8s-ci-robot Sep 10, 2021
4c9f7a9
Squashed 'release-tools/' changes from 5489de6e..5b9a1e06
pohly Oct 15, 2021
0ec19a6
Merge commit 'bf13487a4001bcd56be31ac5d26f16e1dc3d80a8' into prow-upd…
pohly Oct 15, 2021
de1e070
Merge pull request #329 from pohly/prow-update-master
k8s-ci-robot Oct 15, 2021
bd9f876
Squashed 'release-tools/' changes from 5b9a1e06..a6a1a797
pohly Nov 16, 2021
1c52188
Merge commit 'f779f8accaa66e60f17c08ba46a03d4eeba4f2aa' into prow-upd…
pohly Nov 16, 2021
631c3aa
Merge pull request #333 from pohly/prow-update-master
k8s-ci-robot Nov 16, 2021
f1f9dc5
Fix get nodeid from va.annotation directly
mowangdk Nov 29, 2021
85488bd
Skip processing of ManagedFields changes
uzuku Dec 8, 2021
1bc8fa1
Merge pull request #336 from mowangdk/fix_annotations
k8s-ci-robot Dec 9, 2021
d0930e9
Merge pull request #338 from uzuku/dec-fix-retry-interval
k8s-ci-robot Dec 9, 2021
499006b
Update kube and dependencies to 1.23 version
humblec Dec 13, 2021
33f208a
Merge pull request #339 from humblec/release-1.23
k8s-ci-robot Dec 13, 2021
876f273
Add CHANGELOG for v3.4
jsafrane Dec 20, 2021
87efa4e
Merge pull request #340 from jsafrane/changelog-3.4
k8s-ci-robot Dec 20, 2021
d030506
Merge tag 'v3.4.0' into rebase-v3.4.0
RomanBednar Jan 21, 2022
cbd5899
bump build image golang version to 1.17
RomanBednar Jan 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Clean up unused vars, funcs and types
Signed-off-by: ialidzhikov <[email protected]>
  • Loading branch information
ialidzhikov committed Aug 10, 2021
commit a787602a5e5d5af64b01d6ed2e2b36dad240b1f9
7 changes: 0 additions & 7 deletions cmd/csi-attacher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ const (

// Default timeout of short CSI calls like GetPluginInfo
csiTimeout = time.Second

leaderElectionTypeLeases = "leases"
)

// Command line flags
Expand Down Expand Up @@ -82,11 +80,6 @@ var (
version = "unknown"
)

type leaderElection interface {
Run() error
WithNamespace(namespace string)
}

func main() {
klog.InitFlags(nil)
flag.Set("logtostderr", "true")
Expand Down
11 changes: 0 additions & 11 deletions pkg/attacher/attacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ import (
"context"

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"

"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/klog/v2"
)

// Attacher implements attach/detach operations against a remote CSI driver.
Expand Down Expand Up @@ -85,15 +83,6 @@ func (a *attacher) Detach(ctx context.Context, volumeID string, nodeID string, s
return err
}

func logGRPC(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
klog.V(5).Infof("GRPC call: %s", method)
klog.V(5).Infof("GRPC request: %s", protosanitizer.StripSecrets(req))
err := invoker(ctx, method, req, reply, cc, opts...)
klog.V(5).Infof("GRPC response: %s", protosanitizer.StripSecrets(reply))
klog.V(5).Infof("GRPC error: %v", err)
return err
}

// isFinished returns true if given error represents final error of an
// operation. That means the operation has failed completely and cannot be in
// progress. It returns false, if the error represents some transient error
Expand Down
4 changes: 0 additions & 4 deletions pkg/attacher/attacher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ import (
"google.golang.org/grpc/status"
)

const (
driverName = "foo/bar"
)

type pbMatcher struct {
x proto.Message
}
Expand Down
9 changes: 0 additions & 9 deletions pkg/controller/csi_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,6 @@ func (h *csiHandler) prepareVANodeID(va *storage.VolumeAttachment, nodeID string
return clone, true
}

func (h *csiHandler) saveVA(va *storage.VolumeAttachment, patch []byte) (*storage.VolumeAttachment, error) {
newVA, err := h.client.StorageV1().VolumeAttachments().Patch(context.TODO(), va.Name, types.MergePatchType, patch, metav1.PatchOptions{})
if err != nil {
return va, err
}
klog.V(4).Infof("VolumeAttachment %q updated with finalizer and/or NodeID annotation", va.Name)
return newVA, nil
}

func (h *csiHandler) addPVFinalizer(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) {
finalizerName := GetFinalizerName(h.attacherName)
for _, f := range pv.Finalizers {
Expand Down
5 changes: 2 additions & 3 deletions pkg/controller/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ func markAsDetached(client kubernetes.Interface, va *storage.VolumeAttachment) (
}

const (
defaultFSType = "ext4"
csiVolAttribsAnnotationKey = "csi.volume.kubernetes.io/volume-attributes"
vaNodeIDAnnotation = "csi.alpha.kubernetes.io/node-id"
defaultFSType = "ext4"
vaNodeIDAnnotation = "csi.alpha.kubernetes.io/node-id"
)

// SanitizeDriverName sanitizes provided driver name.
Expand Down
4 changes: 0 additions & 4 deletions pkg/controller/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ import (
v1 "k8s.io/api/core/v1"
)

const (
driverName = "foo/bar"
)

func createBlockCapability(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability {
return &csi.VolumeCapability{
AccessType: &csi.VolumeCapability_Block{
Expand Down