ocm-workon

command module
v0.0.0-...-2b7e141 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

OCM Workon

A utility to help people working on multiple OpenShift clusters--potentially at the same time.

Building

Build with make.

make clean build

This will create a file ./bin/ocm-workon. Copy this onto your $PATH to run it.

ocm workon

Configuration

Most arguments can be read from environment variables or via a configuration file located in ${$XDG_CONFIG_DIR:-$HOME/.config}/ocm/workon.yaml. While not required, direnv is highly recommended. Other useful additions are asdf and asdf-direnv.

This is a good starting point if you have zsh installed at /bin/zsh.

cluster_base_directory: /home/geowa4/Clusters
cluster_use_direnv: true

If you only ever work on production clusters, set cluster_production: true as well.

Usage

Before running any other commands it is recommended you initialize the base directory where cluster configurations will be stored. In this directory will be a .zshrc file that you can use to run certain commands when you start working on a cluster.

ocm workon init

Supply one of the ID, external ID, or name of the cluster and a zsh shell will

ocm workon cluster geowa4-test

This will record that you have worked on this cluster in a SQLite database in your cluster base directory. To query that, run the list command.

ocm workon recent

TODO

  • command to note that the cluster I'm working on should generate a compliance alert
  • search for recent clusters worked that I expected to have generated a compliance alert
  • truncate clusters worked more than ago and delete their directories
  • add options to recent command

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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