Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vendor dependencies #221

Merged
merged 5 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ require (
github.com/container-storage-interface/spec v1.2.0
github.com/davecgh/go-spew v1.1.1
github.com/evanphx/json-patch v4.5.0+incompatible
github.com/golang/mock v1.2.0
github.com/golang/protobuf v1.3.2
github.com/imdario/mergo v0.3.7 // indirect
github.com/golang/mock v1.4.3
github.com/golang/protobuf v1.3.5
github.com/imdario/mergo v0.3.9 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.7.0
github.com/kubernetes-csi/csi-test v2.0.0+incompatible
google.golang.org/grpc v1.26.0
k8s.io/api v0.17.0
k8s.io/apimachinery v0.17.1-beta.0
k8s.io/client-go v0.17.0
k8s.io/csi-translation-lib v0.17.0
github.com/kubernetes-csi/csi-test/v3 v3.1.0
google.golang.org/grpc v1.28.0
k8s.io/api v0.18.0
k8s.io/apimachinery v0.18.0
k8s.io/client-go v0.18.0
k8s.io/csi-translation-lib v0.18.0
k8s.io/klog v1.0.0
)

Expand Down
71 changes: 65 additions & 6 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/attacher/attacher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/csi-test/driver"
"github.com/kubernetes-csi/csi-test/v3/driver"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
11 changes: 5 additions & 6 deletions pkg/controller/csi_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
"sync"
"time"

"k8s.io/klog"

"github.com/kubernetes-csi/external-attacher/v2/pkg/attacher"
v1 "k8s.io/api/core/v1"
storage "k8s.io/api/storage/v1beta1"
Expand All @@ -35,6 +33,7 @@ import (
corelisters "k8s.io/client-go/listers/core/v1"
storagelisters "k8s.io/client-go/listers/storage/v1beta1"
"k8s.io/client-go/util/workqueue"
"k8s.io/klog"
)

type AttacherCSITranslator interface {
Expand Down Expand Up @@ -313,7 +312,7 @@ func (h *csiHandler) prepareVANodeID(va *storage.VolumeAttachment, nodeID string
}

func (h *csiHandler) saveVA(va *storage.VolumeAttachment, patch []byte) (*storage.VolumeAttachment, error) {
newVA, err := h.client.StorageV1beta1().VolumeAttachments().Patch(va.Name, types.MergePatchType, patch)
newVA, err := h.client.StorageV1beta1().VolumeAttachments().Patch(context.TODO(), va.Name, types.MergePatchType, patch, metav1.PatchOptions{})
if err != nil {
return va, err
}
Expand Down Expand Up @@ -667,7 +666,7 @@ func (h *csiHandler) getCredentialsFromPV(csiSource *v1.CSIPersistentVolumeSourc
return nil, nil
}

secret, err := h.client.CoreV1().Secrets(secretRef.Namespace).Get(secretRef.Name, metav1.GetOptions{})
secret, err := h.client.CoreV1().Secrets(secretRef.Namespace).Get(context.TODO(), secretRef.Name, metav1.GetOptions{})
if err != nil {
return nil, fmt.Errorf("failed to load secret \"%s/%s\": %s", secretRef.Namespace, secretRef.Name, err)
}
Expand Down Expand Up @@ -716,7 +715,7 @@ func (h *csiHandler) patchVA(va, clone *storage.VolumeAttachment) (*storage.Volu
return va, err
}

newVa, err := h.client.StorageV1beta1().VolumeAttachments().Patch(va.Name, types.MergePatchType, patch)
newVa, err := h.client.StorageV1beta1().VolumeAttachments().Patch(context.TODO(), va.Name, types.MergePatchType, patch, metav1.PatchOptions{})
if err != nil {
return va, err
}
Expand All @@ -729,7 +728,7 @@ func (h *csiHandler) patchPV(pv, clone *v1.PersistentVolume) (*v1.PersistentVolu
return pv, err
}

newPV, err := h.client.CoreV1().PersistentVolumes().Patch(pv.Name, types.MergePatchType, patch)
newPV, err := h.client.CoreV1().PersistentVolumes().Patch(context.TODO(), pv.Name, types.MergePatchType, patch, metav1.PatchOptions{})
if err != nil {
return pv, err
}
Expand Down
6 changes: 4 additions & 2 deletions pkg/controller/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package controller

import (
"context"
"encoding/json"
"errors"
"fmt"
Expand All @@ -26,6 +27,7 @@ import (
jsonpatch "github.com/evanphx/json-patch"
v1 "k8s.io/api/core/v1"
storage "k8s.io/api/storage/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/klog"
Expand All @@ -41,7 +43,7 @@ func markAsAttached(client kubernetes.Interface, va *storage.VolumeAttachment, m
if err != nil {
return va, err
}
newVA, err := client.StorageV1beta1().VolumeAttachments().Patch(va.Name, types.MergePatchType, patch)
newVA, err := client.StorageV1beta1().VolumeAttachments().Patch(context.TODO(), va.Name, types.MergePatchType, patch, metav1.PatchOptions{})
if err != nil {
return va, err
}
Expand Down Expand Up @@ -83,7 +85,7 @@ func markAsDetached(client kubernetes.Interface, va *storage.VolumeAttachment) (
if err != nil {
return va, err
}
newVA, err := client.StorageV1beta1().VolumeAttachments().Patch(va.Name, types.MergePatchType, patch)
newVA, err := client.StorageV1beta1().VolumeAttachments().Patch(context.TODO(), va.Name, types.MergePatchType, patch, metav1.PatchOptions{})
if err != nil {
return va, err
}
Expand Down
2 changes: 2 additions & 0 deletions vendor/github.com/gogo/protobuf/proto/encode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions vendor/github.com/gogo/protobuf/proto/lib.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 41 additions & 30 deletions vendor/github.com/gogo/protobuf/proto/properties.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions vendor/github.com/gogo/protobuf/proto/table_marshal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions vendor/github.com/gogo/protobuf/proto/table_merge.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions vendor/github.com/gogo/protobuf/proto/table_unmarshal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions vendor/github.com/gogo/protobuf/proto/text.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading