Coder Social home page Coder Social logo

mabojars / linode-cosi-driver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linode/linode-cosi-driver

0.0 0.0 0.0 102 KB

A Kubernetes Container Object Storage Interface (COSI) Driver for Linode

License: Apache License 2.0

Shell 0.25% Go 91.92% Makefile 2.89% Smarty 2.96% Dockerfile 1.98%

linode-cosi-driver's Introduction

Linode COSI Driver

GitHub Go Report Card Static Badge

The Linode COSI Driver is an implementation of the Kubernetes Container Object Storage Interface (COSI) standard. COSI provides a consistent and unified way to expose object storage to containerized workloads running in Kubernetes. This driver specifically enables integration with Linode Object Storage service, making it easier for Kubernetes applications to interact with Linode's scalable and reliable object storage infrastructure.

Getting Started

Follow these steps to get started with Linode COSI Driver:

  1. Prerequisites:

    1. Install COSI Custom Resource Definitions.
    kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-api
    1. Install COSI Controller.
    kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-controller
  2. Installation:

    1. Create new API token in Akamai Cloud Manager. The token must be configured with the following permissions:

      • Object Storage - Read/Write
    2. Install Linode COSI Driver using Helm.

    helm install linode-cosi-driver \
        ./helm/linode-cosi-driver/ \
        --set=apiToken=<YOUR_LINODE_API_TOKEN> \
        --namespace=linode-cosi-driver \
        --create-namespace
  3. Usage:

    1. Create Bucket Class (see the example.BucketClass.yaml).
    kubectl create -f ./examples/example.BucketClass.yaml
    1. Create Bucket Access Class (see the example.BucketAccessClass.yaml).
    kubectl create -f ./examples/example.BucketAccessClass.yaml
    1. Create Bucket Claim (see the example.BucketClaim.yaml).
    kubectl create -f ./examples/example.BucketClaim.yaml
    1. Create Bucket Access Class (see the example.BucketAccess.yaml).
    kubectl create -f ./examples/example.BucketAccess.yaml
    1. Use the example-secret secret in your workload, e.g. in deployment:
    spec:
      template:
        spec:
          containers:
            - volumeMounts:
                - mountPath: /conf
                  name: BucketInfo
          volumes:
            - name: example-secret-vol
              secret:
                name: example-secret
                items:
                  - key: BucketInfo
                    path: BucketInfo.json

Testing

Integration tests

Prerequisites

Before running the integration tests, ensure the following prerequisites are met:

  • Linode Account: You need a valid Linode account with access to the Linode API.
  • Linode Token: Set the LINODE_TOKEN environment variable with your Linode API token.
  • Environment Variables: Additional environment variables, such as LINODE_API_URL and LINODE_API_VERSION, can be set as needed.

Test Execution

To run the integration tests, execute the following:

go test -tags=integration ./...

The tests cover various operations such as creating a bucket, granting and revoking bucket access, and deleting a bucket. These operations are performed multiple times to ensure idempotency.

Configuration

The test suite provides configurable parameters through environment variables:

  • LINODE_TOKEN: Linode API token.
  • LINODE_API_URL: Linode API URL.
  • LINODE_API_VERSION: Linode API version.
  • IDEMPOTENCY_ITERATIONS: Number of times to run idempotent operations (default is 2).

Test Cases

Happy Path Test

The TestHappyPath function executes a series of idempotent operations on the Linode COSI driver, covering bucket creation, access granting and revoking, and bucket deletion. The test validates the driver's functionality under normal conditions.

Suite Structure

The test suite is organized into a suite struct, providing a clean separation of concerns for different test operations. The suite includes methods for creating, deleting, granting access to, and revoking access from a bucket. These methods are called in an idempotent loop to ensure the driver's robustness.

License

Linode COSI Driver is licensed under the Apache 2.0 terms. Please review it before using or contributing to the project.

Support

For any issues, questions, or support, please create an issue.

Contributing

We welcome contributions! If you have ideas, bug reports, or want to contribute code, please check out our Contribution Guidelines.

linode-cosi-driver's People

Contributors

shanduur avatar dependabot[bot] avatar

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.