Code Monkey home page Code Monkey logo

csi-quickstart's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on Go, Kubernetes, AWS
  • ๐ŸŒฑ Iโ€™m currently learning about and working with Kubernetes Operators & Controllers, gRPC, Protobufs

๐Ÿ‘ท Check out what I'm currently working on

๐Ÿ‘จโ€๐Ÿ’ป Repositories I created recently

๐Ÿš€ Latest releases I've contributed to

๐Ÿƒ๐Ÿป My GitHub streak

GitHub Streak GitHub Streak

csi-quickstart's People

Contributors

mbtamuli avatar

Stargazers

 avatar

Watchers

 avatar

csi-quickstart's Issues

Add GitHub Actions CI scripts to build, test and publish any artifacts.

Goals

  • Create separate GitHub Actions workflow to
    • Build the plugin and Docker image
    • Test the plugin against a cluster running in the pipeline
    • Publish the Docker image to GitHub Container Registry

Approach

  • After #12 is done, this will be pretty straightforward as the workflows can just invoke the scripts.

Implement logging

Goals

  • Implement logging for the plugin
    • Use structured logging
    • Implement gRPC logging to log request/response in debug level
  • Update Decisions and any relevant documentation

Implement the actual methods for the plugin

Goals

  • Implement code for these methods in the service interfaces
    • CSI Identity Service
    • CSI Node service
  • Verify whether these methods are needed and implement if necessary
    • CSI Identity Service
      • GetPluginCapabilities method
      • Probe method
  • Update documentation if required

Update

These are not mandatory.

  • GetPluginCapabilities method
  • Probe method

Basic tests for `emptyDirClone` volume against local cluster

Goals

  • Add test to successfully create a Pod using emptyDirClone volume
  • Add test to successfully read and write, to a path within the volume, from a single container in a Pod
  • Add test to successfully read and write, to a path within the volume, from a multiple containers in a Pod
  • Document steps to run all or selection of tests

Approach

Related to #11

  • After adding tests, write empty methods to check tests failing
  • After setting up the workflow with tests and empty methods added, continue with action implementation

Code to pass basic tests

Goals

  • Implement Setup skeleton code for these methods in the service interfaces
    • CSI Identity Service
      • GetPluginInfo method
      • GetPluginCapabilities method
      • Probe method
    • CSI Node service
      • NodePublishVolume method
      • NodeUnpublishVolume method
  • Update documentation with steps to build and run manually

Approach

  • Setup skeleton of the CSI plugin
  • Add empty methods and deploy to check failing tests. Refer #10 and #12
  • Go thoroughly through the Required Reading section
  • Use csc to test any implemented method before trying to deploy on cluster

Manual testing steps

  1. Running locally > Build and Deploy
  2. Running tests

What is the official/conventional way of creating the volumes in a CSI plugin?

Goal

  • Find out what is the official/conventional way to create the volumes
    • same volume as CSI
    • separate volume

Background

Ref: #25 (comment)

  • A volume mounted from the host in both the plugin container and the node-driver-registrar container, which is used primarily for the CSI socket
    spec:
      template:
        spec:
          containers:
            - volumeMounts:
                - mountPath: /csi
                  name: plugin-dir
          volumes:
            - hostPath:
                path: /var/lib/kubelet/plugins/emptydirclone.mriyam.dev
                type: DirectoryOrCreate
              name: plugin-dir
  • The plugin creating a volume, that gets mounted at the target path as requested by kubelet. Now the path that the plugin uses for creating the volume lives under the path /csi
     // getVolumePath returns the canonical path for emptydirclone volume
     func getVolumePath(volName string) string {
     	return filepath.Join("/csi/data", volName)
     }

Although this works, the pattern I've seen is,

  • A volume separate from the one used for the CSI socket mounted from the host in both the plugin container and the node-driver-registrar container
    spec:
      template:
        spec:
          containers:
            - volumeMounts:
              - mountPath: /csi-data-dir
                name: csi-data-dir
        volumes:
          - hostPath:
              path: /var/lib/csi-emptydirclone.mriyam.dev-data/
              type: DirectoryOrCreate
            name: csi-data-dir
  • The plugin uses the volume /csi-data-dir/ to create all volumes within that path.

Document requirements of a basic CSI plugin

Goal

  • Should the basic CSI plugin emulate emptyDir or hostPath volume. - Update ./README.md with decision and reasoning. - #5
  • Clear requirements for a <TBD type> CSI plugin simulating emptyDir. - #6
  • Any additional diagram or commentary explaining unclear parts of Specification. - #6

Approach

.

Testing of creation of issue via quick link provided by GitHub. Can be ignored.

Add a Readme

Add a README defining the goal/scope of the project

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.