kubernetes-sigs / container-object-storage-interface-controller

Container Object Storage Interface (COSI) controller responsible to manage lifecycle of COSI objects. NOTE: The content of this repo has been moved to https://github.com/kubernetes-sigs/container-object-storage-interface.
Apache License 2.0
94 stars 28 forks source link

Controller uses out of date API #39

Closed YiannisGkoufas closed 3 years ago

YiannisGkoufas commented 3 years ago

Bug Report

What happened:

Deployed all the COSI components and the sample provisioner for Minio. Created a BucketClass and a Bucket Request. Got the error:

E0225 15:06:33.702088       1 bucketrequest.go:85] error getting bucketclass: [&{{BucketClass objectstorage.k8s.io/v1alpha1} {my-bucketclass    98a672fd-dd77-4a04-9e06-0d3cbaf7c851 17330 1 2021-02-25 15:06:28 +0000 UTC <nil>  map[] map[] [] []  [{kubectl-create Update objectstorage.k8s.io/v1alpha1 2021-02-25 15:06:28 +0000 UTC FieldsV1 {"f:isDefaultBucketClass":{},"f:protocol":{".":{},"f:name":{},"f:s3":{".":{},"f:bucketName":{},"f:endpoint":{},"f:region":{}}},"f:provisioner":{},"f:retentionPolicy":{}}}]} false []  {false false false false}  map[] }] v1alpha1.BucketClass.Protocol: ReadString: expects " or n, but found {, error found in #10 byte of ...|rotocol":{"name":"s3|..., bigger context ...|8a672fd-dd77-4a04-9e06-0d3cbaf7c851"},"protocol":{"name":"s3","s3":{"bucketName":"my-bucket","endpoi|...
I0225 15:06:33.702173       1 bucketrequest.go:47] BucketClass specified does not exist while processing BucketRequest bucket-request.

I believe this happens because the image hosted on quay.io/containerobjectstorage/objectstorage-controller is old.

What you expected to happen:

To create a Bucket object

How to reproduce this bug (as minimally and precisely as possible):

Install all COSI components and sample provisioner:

kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-api
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-csi-adapter
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-controller
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar

Create the BucketClass and the BucketRequest:

apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketClass
metadata:
  name: my-bucketclass
provisioner: "sample-provisioner.objectstorage.k8s.io-dev"
protocol:
  name: "s3"
  s3:
    endpoint: "minio-service.minio-ns:9000"
    bucketName: "my-bucket"
    region: ""
---
apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketRequest
metadata:
  name: bucket-request
spec:
  bucketPrefix: "cosi"
  bucketClassName: "my-bucketclass"

Environment:

Minikube

krishchow commented 3 years ago

/close

Fixed via #48

k8s-ci-robot commented 3 years ago

@krishchow: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/container-object-storage-interface-controller/issues/39#issuecomment-832964319): >/close > >Fixed via #48 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.