onmetal-csi-driver

module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: Apache-2.0

README

OnMetal CSI Driver

Go Report Card Test PRs Welcome GitHub License

This document provides an overview of the OnMetal CSI Driver, its components, and usage instructions.

Overview

The OnMetal CSI Driver is a Kubernetes storage plugin that enables the management of OnMetal volumes as Kubernetes Persistent Volumes (PVs). The driver supports dynamic provisioning, mounting, and management of OnMetal volumes.

Table of Contents

Table of Contents

Prerequisites

  • Kubernetes cluster v1.20 or later
  • Go 1.16 or later for building the driver

Installation

To install the OnMetal CSI Driver, clone the repository and build the binary using the following command:

git clone https://github.com/onmetal/onmetal-csi-driver.git
cd onmetal-csi-driver
go build -o onmetal-csi-driver ./cmd

Configuration

The driver can be configured through environment variables and command-line flags.

Environment Variables
  • X_CSI_MODE: Set the CSI driver mode. Supported modes are node and controller.
  • KUBE_NODE_NAME: Set the Kubernetes node name when the driver is running in node mode.
  • VOLUME_NS: Set the OnMetal driver namespace when the driver is running in controller mode.
Command-Line Flags
  • --target-kubeconfig: Path pointing to the target kubeconfig.
  • --onmetal-kubeconfig: Path pointing to the OnMetal kubeconfig.
  • --driver-name: Override the default driver name. Default value is driver.CSIDriverName.

Usage

  1. Run the OnMetal CSI Driver as a controller:
export X_CSI_MODE=controller
export VOLUME_NS=my-driver-namespace
./onmetal-csi-driver --target-kubeconfig=/path/to/target/kubeconfig --onmetal-kubeconfig=/path/to/onmetal/kubeconfig
  1. Run the OnMetal CSI Driver as a node:
export X_CSI_MODE=node
export KUBE_NODE_NAME=my-node-name
./onmetal-csi-driver --target-kubeconfig=/path/to/target/kubeconfig --onmetal-kubeconfig=/path/to/onmetal/kubeconfig

Development

To contribute to the development of the OnMetal CSI Driver, follow these steps:

  1. Fork the repository and clone your fork:
git clone https://github.com/yourusername/onmetal-csi-driver.git
cd onmetal-csi-driver
  1. Create a new branch for your changes:
$ git checkout -b my-new-feature
  1. Make your changes and commit them to your branch.

  2. Push your branch to your fork:

$ git push origin my-new-feature
  1. Create a pull request against the original repository.

Remember to keep your fork and branch up-to-date with the original repository before submitting a pull request.

Feedback and Support

Feedback and contributions are always welcome!

Please report bugs, suggestions or post questions by opening a Github issue.

License

Apache License 2.0

Directories

Path Synopsis
cmd
pkg
utils/mount
Code generated by MockGen.
Code generated by MockGen.
utils/os
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL