kube-object-storage / lib-bucket-provisioner

Library for the dynamic provisioning of object store buckets to be used by object store providers.
Apache License 2.0
20 stars 22 forks source link

Update k8s modules to support projects using ks8 v0.18 and up #196

Closed dannyzaken closed 3 years ago

dannyzaken commented 3 years ago

k8s modules such as client-go changed the API for many functions used by lib-bucket-provisioner. when trying to build a provisioner that imports these newer versions the build fails.

we are hitting it now for noobaa-operator and rook-ceph (@aruniiird) when trying to update dependencies.

e.g:

# github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/helpers.go:111:42: not enough arguments in call to c.CoreV1().ConfigMaps(ns).Get
    have (string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
    want (context.Context, string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/helpers.go:124:39: not enough arguments in call to c.CoreV1().Secrets(ns).Get
    have (string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
    want (context.Context, string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/helpers.go:182:50: not enough arguments in call to c.StorageV1().StorageClasses().Get
    have (string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
    want (context.Context, string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/helpers.go:198:50: not enough arguments in call to c.StorageV1().StorageClasses().Get
    have (string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
    want (context.Context, string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/resourcehandlers.go:140:57: not enough arguments in call to c.CoreV1().Secrets(obc.ObjectMeta.Namespace).Create
    have (*"k8s.io/api/core/v1".Secret)
    want (context.Context, *"k8s.io/api/core/v1".Secret, "k8s.io/apimachinery/pkg/apis/meta/v1".CreateOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/resourcehandlers.go:163:63: not enough arguments in call to c.CoreV1().ConfigMaps(obc.ObjectMeta.Namespace).Create
    have (*"k8s.io/api/core/v1".ConfigMap)
    want (context.Context, *"k8s.io/api/core/v1".ConfigMap, "k8s.io/apimachinery/pkg/apis/meta/v1".CreateOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/resourcehandlers.go:185:51: not enough arguments in call to c.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Get
    have (string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
    want (context.Context, string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/resourcehandlers.go:191:54: not enough arguments in call to c.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Update
    have (*"k8s.io/api/core/v1".ConfigMap)
    want (context.Context, *"k8s.io/api/core/v1".ConfigMap, "k8s.io/apimachinery/pkg/apis/meta/v1".UpdateOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/resourcehandlers.go:206:50: not enough arguments in call to c.CoreV1().Secrets(sec.ObjectMeta.Namespace).Get
    have (string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
    want (context.Context, string, "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions)
vendor/github.com/kube-object-storage/lib-bucket-provisioner/pkg/provisioner/resourcehandlers.go:212:53: not enough arguments in call to c.CoreV1().Secrets(sec.ObjectMeta.Namespace).Update
    have (*"k8s.io/api/core/v1".Secret)
    want (context.Context, *"k8s.io/api/core/v1".Secret, "k8s.io/apimachinery/pkg/apis/meta/v1".UpdateOptions)
dannyzaken commented 3 years ago

@jeffvance @guymguym

jeffvance commented 3 years ago

I think your choices are to pin client-go, and possibly other deps, to the previous versions, or to update the lib to use the newest version. @copejon

copejon commented 3 years ago

Has this been fixed by #197 ?

dannyzaken commented 3 years ago

fixed with #197