Skip to content

Latest commit

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

oc-plugins

Travis CIcontainer-oc Build

A collection of plugins for the OKD / Kubernetes CLI client.

  1. cleanup: Clean up excessive (stale) resources

Usage

oc plugin <plugin-name> --help

cleanup

Cleanup removes stale image stream tags that are tagged with a commit SHA of a specific repository (e.g. when you automatically tag built images with the related Git commit hash). Due to a bug you have to explicitly specify the local Git repository with an absolute path.

oc plugin cleanup my-image -p /path/to/git-repository/

Example: (using Docker)

$ docker run --rm -it -v $(pwd):/app appuio/oc:v3.9 oc plugin cleanup --helpClean up excessive (stale) image tags, images and related resources.Usage: oc plugin cleanup [options]Examples: oc plugin cleanup IMAGE --git-repo-path $PWDOptions: -f, --force='n': don't ask for confirmation to delete image tags (use: y) -l, --git-commit-limit='100': only look at the first <n> commits to compare with tags -p, --git-repo-path='': absolute path to Git repository (for current dir use: $PWD) -k, --keep='10': keep most current <n> imagesUse "oc options" for a list of global command-line options (applies to all commands).

Installation

See Installing Plug-ins in the official documentation.

Prerequisites

The image or infrastructure using this plugin collection must meet the following requirements for the commands to work.

cleanup

  1. Bash v4+
  2. Git

Development

# configure plugins path for developmentexport KUBECTL_PLUGINS_PATH=$(pwd)# list all plugins, print usage
oc plugin

About

A collection of plugins for the OKD / Kubernetes CLI client

Topics

Resources

Stars

2 stars

Watchers

11 watching

Forks

Releases

Packages

Contributors

Languages