Skip to content

Updated Kubernetes dependency to v1.15 and fixed all dep errors #310

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

Merged
merged 1 commit into from
Jun 21, 2019
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
  •  
  •  
  •  
760 changes: 165 additions & 595 deletions Gopkg.lock

Large diffs are not rendered by default.

76 changes: 39 additions & 37 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,65 +24,67 @@
# go-tests = true
# unused-packages = true

[[constraint]]
name = "cloud.google.com/go"
version = "0.34.0"
# WARNING: IF YOU ARE GETTING WEIRD DEP ERRORS MAKE SURE TO
# rm -rf test/k8s-integration/src
# AS IT MAY CONTAIN A PULLED IN KUBERNETES

[[constraint]]
name = "github.com/container-storage-interface/spec"
version = "1.1.0"
[prune]
go-tests = true
unused-packages = true
non-go = true

# Transitive dependency of CSI Spec
[[override]]
name = "github.com/golang/protobuf"
version = "1.1.0"
[[constraint]]
name = "cloud.google.com/go"
version = "0.40.0"

[[constraint]]
branch = "master"
name = "github.com/golang/glog"

#[[constraint]]
# name = "github.com/stretchr/testify"
# version = "1.2.1"
name = "golang.org/x/oauth2"

[[constraint]]
branch = "master"
name = "golang.org/x/net"
name = "google.golang.org/api"

[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"
name = "github.com/kubernetes-csi/csi-test"
version = "v1.0.0"

[[constraint]]
branch = "master"
name = "google.golang.org/api"
name = "k8s.io/test-infra"

###
### Kubernetes Dependencies
###

[[constraint]]
name = "google.golang.org/grpc"
version = "1.10.0"
version = "v1.15.0"
name = "k8s.io/kubernetes"

[[constraint]]
branch = "release-1.11"
version = "kubernetes-1.15.0"
name = "k8s.io/apimachinery"

###
### CSI Spec Dependencies
###

[[constraint]]
branch = "master"
name = "k8s.io/utils"
name = "github.com/container-storage-interface/spec"
version = "1.1.0"

[prune]
go-tests = true
unused-packages = true
non-go = true
[[override]]
name = "google.golang.org/grpc"
version = "1.10.0"

[[constraint]]
name = "github.com/kubernetes-csi/csi-test"
version = "v1.0.0-rc2"
[[override]]
name = "github.com/golang/protobuf"
version = "1.1.0"

[[constraint]]
branch = "master"
name = "k8s.io/test-infra"
###
### Crazy Stuff
###

# Transitive dependency of k8s.io/kubernetes/pkg/util/parsers
[[override]]
branch = "master"
name = "github.com/docker/distribution"
name = "gopkg.in/fsnotify.v1"
source = "https://github.com/fsnotify/fsnotify.git"
16 changes: 10 additions & 6 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"time"

"github.com/golang/glog"
"k8s.io/klog"

gce "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/compute"
metadataservice "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/metadata"
Expand All @@ -42,6 +42,10 @@ const (
driverName = "pd.csi.storage.gke.io"
)

func init() {
klog.InitFlags(flag.CommandLine)
}

func main() {
flag.Parse()
rand.Seed(time.Now().UnixNano())
Expand All @@ -51,29 +55,29 @@ func main() {

func handle() {
if vendorVersion == "" {
glog.Fatalf("vendorVersion must be set at compile time")
klog.Fatalf("vendorVersion must be set at compile time")
}
glog.V(4).Infof("Driver vendor version %v", vendorVersion)
klog.V(4).Infof("Driver vendor version %v", vendorVersion)

gceDriver := driver.GetGCEDriver()

//Initialize GCE Driver (Move setup to main?)
cloudProvider, err := gce.CreateCloudProvider(vendorVersion, *gceConfigFilePath)
if err != nil {
glog.Fatalf("Failed to get cloud provider: %v", err)
klog.Fatalf("Failed to get cloud provider: %v", err)
}

mounter := mountmanager.NewSafeMounter()
deviceUtils := mountmanager.NewDeviceUtils()

ms, err := metadataservice.NewMetadataService()
if err != nil {
glog.Fatalf("Failed to set up metadata service: %v", err)
klog.Fatalf("Failed to set up metadata service: %v", err)
}

err = gceDriver.SetupGCEDriver(cloudProvider, mounter, deviceUtils, ms, driverName, vendorVersion)
if err != nil {
glog.Fatalf("Failed to initialize GCE CSI Driver: %v", err)
klog.Fatalf("Failed to initialize GCE CSI Driver: %v", err)
}

gceDriver.Run(*endpoint)
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/overlays/dev/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ patches:
images:
# Replace this with your private image names and tags
- name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver
newName: gcr.io/REPLACEME/gcp-compute-persistent-disk-csi-driver
newName: gcr.io/dyzz-csi-staging/csi/gce-pd-driver
newTag: "latest"
2 changes: 1 addition & 1 deletion pkg/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"strings"

"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce/cloud/meta"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"reflect"
"testing"

"k8s.io/kubernetes/pkg/cloudprovider/providers/gce/cloud/meta"
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions pkg/gce-cloud-provider/compute/fake-gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ limitations under the License.
package gcecloudprovider

import (
"context"
"fmt"
"strconv"
"strings"

"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
csi "github.com/container-storage-interface/spec/lib/go/csi"
"github.com/golang/glog"
"golang.org/x/net/context"
computebeta "google.golang.org/api/compute/v0.beta"
compute "google.golang.org/api/compute/v1"
"google.golang.org/api/googleapi"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce/cloud/meta"
"k8s.io/klog"
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/common"
)

Expand Down Expand Up @@ -184,7 +184,7 @@ func (cloud *FakeCloudProvider) ValidateExistingDisk(ctx context.Context, resp *
return fmt.Errorf("disk already exists with incompatible type. Need %v. Got %v",
diskType, respType[len(respType)-1])
}
glog.V(4).Infof("Compatible disk already exists")
klog.V(4).Infof("Compatible disk already exists")
return nil
}

Expand Down Expand Up @@ -384,7 +384,7 @@ func (cloud *FakeCloudProvider) ValidateExistingSnapshot(resp *compute.Snapshot,
return status.Error(codes.AlreadyExists, fmt.Sprintf("snapshot already exists with same name but with a different disk source %s, expected disk source %s", diskSource, resp.SourceDisk))
}
// Snapshot exists with matching source disk.
glog.V(4).Infof("Compatible snapshot already exists. Reusing existing.")
klog.V(4).Infof("Compatible snapshot already exists. Reusing existing.")
return nil
}

Expand Down
Loading