Back to the ridge
05/The col/open source/2021

openebsctl

OpenEBS is the CNCF container-attached storage layer — 9.8k stars, 208 committers. A Linux Foundation mentorship spent building the part of its CLI nobody volunteers for: upgrades.
9.8k
stars on OpenEBS, a CNCF project
2
storage engines given an upgrade path
1 of 500
Linux Foundation scholarship winners worldwide

Context

OpenEBS is the container-attached storage layer that gives a Kubernetes cluster its persistent volumes; openebsctl is how an operator inspects and moves it from a terminal. I worked on it through the Linux Foundation's LFX mentorship programme in 2021.

What I did

Built the upgrade path. Upgrading storage is the operation everyone postpones, because the failure mode is data, so the CLI has to make it boring: I added the Kubernetes jobs that carry Jiva volumes and CSPC pools from one version to the next, and then streamed their logs back to the terminal so an operator can watch an upgrade happen rather than wait and hope.

Around it, the usability work a CLI lives or dies on — auto-determining the OpenEBS namespace, taking a kubeconfig from an argument, reporting the installed version of every component, telling you plainly when there is nothing to show — and extending list and describe to local-hostpath alongside the other storage engines.

Underneath, I broke the Kubernetes client monolith into smaller components and wrapped its constructor for error handling, so the rest of the CLI became testable.

Outcome

Eleven pull requests merged across the mentorship, and a CLI that can upgrade the storage under a running cluster. The same year I was one of 500 Linux Foundation scholarship recipients selected worldwide.

$ kubectl openebskubectl openebs is a a kubectl plugin for interacting with OpenEBS storage components such as storage(zfspools, volumegroups), volumes, pvcs.Find out more about OpenEBS on https://openebs.io/ Usage:  openebs [command] Available Commands:  cluster-info Show component version, status and running components for each installed engine  completion   Outputs shell completion code for the specified shell (bash or zsh)  describe     Provide detailed information about an OpenEBS resource  get          Provides fetching operations related to a Volume/Storage  help         Help about any command  version      Shows openebs kubectl plugin's version Flags:  -h, --help                help for openebs  -c, --kubeconfig string   path to config file  -v, --version             version for openebs Use "openebs [command] --help" for more information about a command.
kubectl openebs/The plugin's own help output

In public

Selected pull requests. Every one of them can be read.