Giter VIP home page Giter VIP logo

ibm-powervs-block-csi-driver's Introduction

IBM PowerVS Block CSI Driver

CSI Driver for IBM® Power Systems™ Virtual Servers

Overview

The IBM Power Virtual Systems Container Storage Interface (CSI) Driver provides a CSI interface used by Container Orchestrators to manage the lifecycle of Power Virtual System volumes.

CSI Specification Compatibility Matrix

PowerVS CSI Driver \ CSI Version v1.5.0
main branch yes

Features

The following CSI gRPC calls are implemented:

  • Controller Service: CreateVolume, DeleteVolume, ControllerPublishVolume,ControllerUnpublishVolume, ControllerGetCapabilities, ValidateVolumeCapabilities
  • Node Service: NodeStageVolume, NodeUnstageVolume, NodePublishVolume, NodeUnpublishVolume, NodeGetCapabilities, NodeGetInfo
  • Identity Service: GetPluginInfo, GetPluginCapabilities

CreateVolume Parameters

There are several optional parameters that could be passed into CreateVolumeRequest.parameters map, these parameters can be configured in StorageClass, see example:

Parameters Values Default Description
"csi.storage.k8s.io/fstype" xfs, ext2, ext3, ext4 ext4 File system type that will be formatted during volume creation. This parameter is case sensitive!

Driver Options

There are couple driver options that can be passed as arguments when starting driver container.

Option argument value sample default Description
endpoint tcp://127.0.0.1:10000/ unix:///var/lib/csi/sockets/pluginproxy/csi.sock added to all volumes, for checking if a given volume was already created so that ControllerPublish/CreateVolume is idempotent.
volume-attach-limit 1,2,3 ... -1 Value for the maximum number of volumes attachable per node. If specified, the limit applies to all nodes. If not specified, the value is approximated from the instance type.
debug true false if true, driver will enable the debug log level

IBM PowerVS Block CSI Driver on Kubernetes

Following sections are Kubernetes specific. If you are Kubernetes user, use followings for driver features, installation steps and examples.

Kubernetes Version Compatibility Matrix

PowerVS CSI Driver \ Kubernetes Version v1.22
main branch yes

Features

  • Static Provisioning - create a new or migrating existing PowerVS volumes, then create persistence volume (PV) from the PowerVS volume and consume the PV from container using persistence volume claim (PVC).
  • Dynamic Provisioning - uses persistence volume claim (PVC) to request the Kuberenetes to create the PowerVS volume on behalf of user and consumes the volume from inside container.
  • Mount Option - mount options could be specified in persistence volume (PV) to define how the volume should be mounted.
  • Volume Resizing - expand the volume size. The corresponding CSI feature (ExpandCSIVolumes) is beta since Kubernetes 1.16.

Prerequisites

  • If you are managing PowerVS volumes using static provisioning, get yourself familiar with Power Virtual Servers.
  • Get yourself familiar with how to setup Kubernetes on IBM Cloud and have a working Kubernetes cluster:
    • Enable flag --allow-privileged=true for kubelet and kube-apiserver
    • Enable kube-apiserver feature gates --feature-gates=CSINodeInfo=true,CSIDriverRegistry=true,CSIBlockVolume=true
    • Enable kubelet feature gates --feature-gates=CSINodeInfo=true,CSIDriverRegistry=true,CSIBlockVolume=true

Installation

Set up driver permission

  • Using secret object - Generate IBMCLOUD_APIKEY from the UI, put that user's credentials in secret manifest, then deploy the secret
curl https://raw.githubusercontent.com/kubernetes-sigs/ibm-powervs-block-csi-driver/main/deploy/kubernetes/secret.yaml > secret.yaml
# Edit the IBMCLOUD_API_KEY
# Edit the secret with user credentials
kubectl apply -f secret.yaml

Deploy driver

Please see the compatibility matrix above before you deploy the driver

To deploy the CSI driver:

kubectl apply -k "https://github.com/kubernetes-sigs/ibm-powervs-block-csi-driver/deploy/kubernetes/overlays/stable"

Verify driver is running:

kubectl get pods -n kube-system

Deploy driver with debug mode

To view driver debug logs, run the CSI driver with -v=5 command line option

To enable powervs debug logs, run the CSI driver with debug=true command line option.

Examples

Make sure you follow the Prerequisites before the examples:

Development

Please go through CSI Spec and General CSI driver development guideline to get some basic understanding of CSI driver before you start.

Requirements

  • Golang 1.17.+
  • Ginkgo in your PATH for integration testing and end-to-end testing
  • Docker 20.10+ for releasing

Dependency

Dependencies are managed through go module. To build the project, first turn on go mod using export GO111MODULE=on, then build the project using: make

Testing

  • To create binary, run: make bin/ibm-powervs-block-csi-driver
  • To build image, run: make image
  • To push image, run: make push

ibm-powervs-block-csi-driver's People

Contributors

dependabot[bot] avatar dharaneeshvrd avatar k8s-ci-robot avatar mkumatag avatar mrbobbytables avatar ppc64le-cloud-bot avatar prajyot-parab avatar rcmadhankumar 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.