Giter VIP home page Giter VIP logo

container-object-storage-interface-controller's Introduction

Container Object Storage Controller

Container Object Storage Interface (COSI) controller is responsible to manage lifecycle of COSI objects. Specifically, this controller monitors the lifecycle of the user-facing CRDs:

  • BucketRequest - Represents a request to provision a Bucket
  • BucketAccessRequest - Represents a request to access a Bucket

and generates the associated CRDs:

  • Bucket - Represents a Bucket or its equivalent in the storage backend
  • BucketAccess - Represents a access token or service account in the storage backend

Developer Guide

Before diving into the code of this repo, we suggest that you familiarize yourself with:

A good starting point towards understanding the functionality of this repo would be to study the tests:

Build and Test

In order to build and generate a Docker image execute:

make container

In order to run the tests execute:

make test

References

Community, discussion, contribution, and support

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

container-object-storage-interface-controller's People

Contributors

aarongalang avatar animeshk08 avatar blaineexe avatar brahmaroutu avatar cpanato avatar cyb70289 avatar darkowlzz avatar ddebroy avatar gnufied avatar k8s-ci-robot avatar krishchow avatar mengjiao-liu avatar mkumatag avatar msau42 avatar mucahitkurt avatar mukhoakash avatar namrata-ibm avatar nicolast avatar nikhita avatar pengzhisun avatar pensu avatar pohly avatar saad-ali avatar shanduur avatar spiffxp avatar tparikh avatar windayski avatar wlan0 avatar wozniakjan avatar yiannisgkoufas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

container-object-storage-interface-controller's Issues

06/03/21 - Controller errors for sequential update requests

Bug Report

What happened:

For the BAR and BR controller - after updating the finalizers, the update request for the status would intermittently error.

What you expected to happen:

The expected behavior was that both the finalizer and status would be updated without any errors.

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

Run the controller, and create a BR. The bucket will be created, but the bucketrequest will not be updated with the status. This means future requests will receive an incomplete BR, and they will consequently error.

Anything else relevant for this bug report?:

Environment:

  • Kubernetes version (use kubectl version), please list client and server:
  • Controller version (provide the release tag or commit hash):
  • Provisoner name and version (provide the release tag or commit hash):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

[2023-11-12] - ARM support

Bug Report

What happened:
I wanted to test-drive COSI and tried to deploy it into my Kubernetes cluster using the github.com/kubernetes-sigs/container-object-storage-interface-controller kustomization. Pod was unable to start: exec /controller-manager: exec format error

My cluster is running on ARM machines, not x86.

What you expected to happen:

Get the COSI controller running.

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

  • Deploy a Kubernetes cluster on ARM
  • Deploy github.com/kubernetes-sigs/container-object-storage-interface-controller

Anything else relevant for this bug report?:

  • As ARM is getting more and more popular, not only on-prem but also in the cloud, please consider to provide multiarch images for at least x86_64 and arm64.
  • I'd happy to help or create a PR, as I built many multiarch containers myself. But I've no idea about the Kubernetes image build and release pipelines and processes.

Environment:

  • Kubernetes version (use kubectl version), please list client and server:
Client Version: v1.28.3
Server Version: v1.28.2+k3s1
  • Controller version (provide the release tag or commit hash):
    commit 7e7b773
  • Provisoner name and version (provide the release tag or commit hash):
    n/a
  • Cloud provider or hardware configuration:
    ARM64 HW
  • OS (e.g: cat /etc/os-release):
PRETTY_NAME="Ubuntu 23.04"
NAME="Ubuntu"
VERSION_ID="23.04"
VERSION="23.04 (Lunar Lobster)"
VERSION_CODENAME=lunar
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=lunar
LOGO=ubuntu-logo
  • Kernel (e.g. uname -a):
    Linux tpi-node1 6.2.0-1016-raspi #18-Ubuntu SMP PREEMPT Thu Oct 12 13:26:36 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

[26-04-2022] - Helm Chart support for COSI controller

Enhancement

Add support for helm installation for COSI
Is your feature request related to a problem?/Why is this needed

Currently, COSI controller can be installed via Kubectl, but in k8s world, most apps are deployed via helm
Describe the solution you'd like in detail

Describe alternatives you've considered

Additional context

In further the apis and server may be integrate with core K8s codespace which will be available with k8s images, but currently it is not present

Update README.md

The current readme.md is out of date, and does not give guidelines for new persons interested in the project to easily get started and contribute.

Bucket prefix not being added

Bug Report

What happened:
What the bucket was created by the controller, the prefixing logic was not correct.

What you expected to happen:
The logic should follow this pattern:

if br.prefix is set, then bucketname is "{{br.prefix}}-{{br.uid}}"
if not it is “br-{{br.uid}}”

How to reproduce this bug (as minimally and precisely as possible):
Try to create a bucket with no prefix

Anything else relevant for this bug report?:
N/A

Environment:
N/A

05/04/24 - Single namespace installation

Enhancement

Is your feature request related to a problem?/Why is this needed
I want to deploy multiple instances of this controller in different namespaces

Describe the solution you'd like in detail
per namespace installation, Id like the controller to watch resources in the namespace it installed in

Describe alternatives you've considered
maybe a list of allowed namespaces

Controller uses out of date API

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

[DATE] - User "s │ │ ystem:serviceaccount:default:objectstorage-controller-sa" cannot list resource "bucketaccessrequests" in API group "objectstorage.k8s.io" at the cluster scope

It looks the default configuration doesn't setup correctly the service account permission at the cluster scope.

After the default deployment, I got the following error :

E1011 13:13:55.028830 1 reflector.go:127] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:156: Failed to watch *v1alpha1.BucketAccessRequest: failed to list *v1alpha1.BucketAccessRequest: bucketaccessrequests.objectstorage.k8s.io is forbidden: User "system:serviceaccount:default:objectstorage-controller-sa" cannot list resource "bucketaccessrequests" in API group "objectstorage.k8s.io" at the cluster scope

finalizers for BR and BAR

We need to create finalizers for the BR and BAR to ensure that the B and BA must be deleted before the BR/BAR is removed.

This will ensure there are no dangling BRs that do not Bs and the same applies to the BAR.

Add deployment documentation

Now that kustomize files have been added to the root of the project, we need a getting started guide which explains how to deploy and concerns around it. The deployment step itself is a single command now:

  kubectl create -k github.com/kubernetes-sigs/container-object-storage-controller

kubectl apply -k does not work with current customization.yaml base

Bug Report

As described in title.

Environment:

  • Kubernetes version (use kubectl version), please list client and server:
  • Controller version (provide the release tag or commit hash):
  • Provisoner name and version (provide the release tag or commit hash):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.