oc CLI plugin to interact with Helm features provided by the OpenShift Console

oc helm

OpenShift CLI plugin to integrate with platform capabilities supporting Helm.

Overview

OpenShift provides support for managing the lifecycle of Helm charts. This capability is limited primarily to the Web Console. This plugin enables the management of Helm charts similar to using the standalone Helm CLI while offloading much of the work to OpenShift.

Capabilities

The following capabilities are provides by this plugin

  • Discovering Helm Charts and Repositories registered on the platform
  • Chart lifecycle
    • Show
    • Install
    • Upgrade
    • Rollback
    • History
    • List
    • Uninstall

Prerequisites

The following prerequisites must be met prior to using the plugin:

  1. OpenShift CLI
  2. OpenShift environment
    1. You must be logged in using the OpenShift CLI or have a valid environment and OAuth token

Installing

Perform the following steps to setup and configure the plugin on your machine:

  1. Download the latest release for your operating system from the Release Page

  2. Extract the compressed archive and move the resulting binary to your path

Walkthrough

The following provides an example of some of the features provided by the plugin.

Assuming all prerequisites have been met, first list all repositories and their associated charts using the oc helm index command:

oc helm index

REPOSITORY              NAME                            LATEST VERSION
redhat-helm-repo        ibm-b2bi-prod                   2.0.0
redhat-helm-repo        ibm-cpq-prod                    4.0.1
redhat-helm-repo        ibm-mongodb-enterprise-helm     0.1.0
redhat-helm-repo        ibm-object-storage-plugin       2.0.7
redhat-helm-repo        ibm-oms-ent-prod                6.0.0
redhat-helm-repo        ibm-oms-pro-prod                6.0.0
redhat-helm-repo        ibm-operator-catalog-enablement 1.1.0
redhat-helm-repo        ibm-sfg-prod                    2.0.0
redhat-helm-repo        nodejs                          0.0.1
redhat-helm-repo        nodejs-ex-k                     0.2.1
redhat-helm-repo        quarkus                         0.0.3

Next, create a new project for this walkthrough called oc-helm-test

oc new-project oc-helm-test

Next, install the quarkus chart from the redhat-helm repository and provide quarkus as the release name:

oc helm install quarkus redhat-helm-repo/quarkus

NAME: quarkus
NAMESPACE: oc-helm-test
LAST DEPLOYED: Mon Apr 26 05:35:55 2021
STATUS: deployed
REVISION: 1

A new build will be started and in a few moments, the resulting container will be deployed.

By default, the Build will make use of the jvm mode of Quarkus. Native compilation can be enabled by setting the build.mode value to native. Upgrade the chart to modify the build mode:

oc helm upgrade quarkus redhat-helm-repo/quarkus --set build.mode=native

NAME: quarkus
NAMESPACE: oc-helm-test
LAST DEPLOYED: Mon Apr 26 05:44:50 2021
STATUS: deployed
REVISION: 2

The quarkus BuildConfig will now be updated with native compilation enabled.

Revert the changes by rolling back to the prior revision

oc helm rollback quarkus

Rollback was a success! Happy Helming!

Review the history of the release

oc helm history quarkus

REVISION        UPDATED                         STATUS          CHART           APP VERSION     DESCRIPTION
1               Mon Apr 26 05:35:55 2021        superseded      quarkus-0.0.3                   Install complete
2               Mon Apr 26 05:44:50 2021        superseded      quarkus-0.0.3                   Upgrade complete
3               Mon Apr 26 05:48:40 2021        deployed        quarkus-0.0.3                   Rollback to 1

Finally, uninstall the chart

oc helm uninstall quarkus

release "quarkus" uninstalled

Development

  1. Clone the repository and navigate to the project directory:
git clone https://github.com/sabre1041/oc-helm
cd oc-helm
  1. Build the plugin
make build

The binary will be placed in the bin folder

  1. Install the binary to your path
make install
  1. Confirm the installation of the plugin
oc helm

OpenShift Command Line tool to interact with Helm capabilities.

Usage:
  oc-helm [command]
...
Owner
Andrew Block
Distinguished Architect at Red Hat
Andrew Block
Similar Resources

Console progress bar for Golang

Terminal progress bar for Go Installation go get github.com/cheggaaa/pb/v3 Documentation for v1 bar available here Quick start package main import (

Jan 9, 2023

Utilities to prettify console output of tables, lists, progress-bars, text, etc.

Utilities to prettify console output of tables, lists, progress-bars, text, etc.

go-pretty Utilities to prettify console output of tables, lists, progress-bars, text, etc. Table Pretty-print tables into ASCII/Unicode strings.

Dec 29, 2022

Disk usage analyzer with console interface written in Go

Disk usage analyzer with console interface written in Go

Gdu is intended primarily for SSD disks where it can fully utilize parallel processing. However HDDs work as well, but the performance gain is not so huge.

Jan 7, 2023

Integrated console application library, using Go structs as commands, with menus, completions, hints, history, Vim mode, $EDITOR usage, and more ...

Integrated console application library, using Go structs as commands, with menus, completions, hints, history, Vim mode, $EDITOR usage, and more ...

Gonsole - Integrated Console Application library This package rests on a readline console library, (giving advanced completion, hint, input and histor

Nov 20, 2022

Simple console formatting library for Go

Simple console formatting library for Go

flair Simple console formatting library for Go Motivation There are definitely a bunch of other libraries like this, but I wanted one I knew would be

Aug 30, 2021

Use Golang to achieve better console backend services

Use Golang to achieve better console backend services

Dec 7, 2021

Basic timestamped console printing.

loglines Basic timestamped console printing. What This is a very simple package with three functions: NowString() returns a string with the current ti

Nov 20, 2021

Windows API to hide console window by golang

Doge-Hide windows API to hide console window by golang ShowWindow ShowWindowAsy

Nov 7, 2022

mlp is a comman line tool responsible for creating, updating and deleting kubernetes resources based on files generated by Mia-Platform Console.

mlp is a comman line tool responsible for creating, updating and deleting kubernetes resources based on files generated by Mia-Platform Console.

Apr 28, 2022
Related tags
This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an encoded polyline with the locations found in the log file.
This is a Go Cli app that receives an string path to a log file, and based on it generates  and prints in console an encoded polyline with the locations found in the log file.

GEOENCODE GO CLI APP DESCRIPTION This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an e

Oct 1, 2021
This is a cli to watch anime using the console/terminal.
 This is a cli to watch anime using the console/terminal.

monas-chinas-cli Este un un cli para ver anime usando la consola/terminal. This is a cli to watch anime using the console/terminal. ⚠️ AVISO ⚠️ Los an

Dec 8, 2022
CLI program for SEO 301 & 302 url rewrites in fastly with more magento features soon to come

Magento-Fastly Table of Contents Magento-Fastly Development & Testing Install fastly cli Features Installation Usage Development & Testing To test thi

Oct 29, 2021
Template repository for testing CLI features of applications written in Go

Go CLI testing example This repository provides a template on how to create a testable CLI applications in Go language. As an example, this applicatio

Sep 8, 2022
There is a certain amount of work to be done before you can implement the features of your Go powered CLI app

go-project-template-cli There is a certain amount of work to be done before you can implement the features of your Go powered CLI app. A few of those

Jan 23, 2022
📈 A command-line utility to interact with TradingView

tvctl ?? A command-line utility to interact with TradingView. This utility aims to improve usability of tedius and repetative tasks, such as watchlist

Oct 18, 2022
kcli: command line interface tool to interact with K8trics API server as well as manage its lifecycle
kcli: command line interface tool to interact with K8trics API server as well as manage its lifecycle

K8trics CLI (kcli) kcli is command line interface tool to interact with K8trics API server as well as manage its lifecycle. kcli can provision and dep

Dec 15, 2021
Podman-tui - A Terminal User Interface to interact with the podman (v3.x)
Podman-tui - A Terminal User Interface to interact with the podman (v3.x)

podman-tui podman-tui is a Terminal User Interface to interact with the podman (

Dec 23, 2022
An os/exec like interface for running a command in a container, and being able to easily interact with stdin, stdout, and other adjustments

dockerexec An "os/exec" like interface for running a command in a container, and being able to easily interact with stdin, stdout, and other adjustmen

Jul 14, 2022
Console-based JVM monitoring tool
Console-based JVM monitoring tool

jvm-mon Console based JVM monitoring - when you just want to SSH into a server and see what's going on. jvm-top lets you monitor your JVM server appli

Jan 2, 2023