Skip to content

Kubernetes client-side plugin to slowly restart pods by namespace

License

Notifications You must be signed in to change notification settings

LifeWay/kubectl-roll-plugin

Repository files navigation

kubectl-roll-plugin

Purpose

kubectl roll is a Kubernetes client-side plugin that will "roll" through deleting a target namespace's pods by targeting the StatefulSets, DaemonSets, and Deployments in that namespace. Any standalone pods in the namespace will be ignored and a warning will display to notify the user of the number of pods in the namespace that were not restarted.

Installation

Requires kubectl v1.12 or higher

  1. Clone repo or copy the 2 files from this repo into the same folder on your computer
  2. Run ./install from the repo directory

Note: Only tested on macOS Mojave

Usage

kubectl roll -n {namespace}

Ex.

kubectl roll -n api-prod

  • You are required to provide the target namespace name.
  • Your current kubeconfig context will be used for the plugin's execution.
  • You can also use --namespace in place of -n.

Semantic Releases

This plugin follows SemVer. The semantic-release library is used to manage version numbers, cut GitHub releases, and create/update the changelog. The commit message format determines the release number and is enforced with a pre-commit hook (implemented via husky). Commit messages must adhere to the guidlines outlined by the Angular project. Here is an example of the release type that will be created based on the commit message:

Commit message Release type
fix(pencil): stop graphite breaking when too much pressure applied Patch Release
feat(pencil): add 'graphiteWidth' option Minor Feature Release
perf(pencil): remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed.
The default graphite width of 10mm is always used for performance reasons.
Major Breaking Release

About

Kubernetes client-side plugin to slowly restart pods by namespace

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages