kube-cron-rollout-restart

command module
v2.0.0-...-cc5b34b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 8 Imported by: 0

README

kube-cron-rollout-restart

The kube-cron-rollout-restart is used to restart workloads in a kubernetes cluster base on CRON Schedules set with annotations. Useful for eg. development environments that need to run latest version of containers (targeting latest or a mutable tag).

Usage

Launch Parameters
  --kubeconfig
        use kubeconfig (default is in-cluster)
  --kubeconfig-path
        path to kubeconfig (default "<HOME>/.kube/config")
  --alertmanager-url
        url to alertmanager (default "http://alertmanager:80")
Annotations

Use these annotations on the workload

Name Value Description
cron.rollout.restart/schedule <cron-schedule> Full CRON Schedule. Eg. "0 12 * * 1-5" will restart the workload every weekday at 12:00 (https://crontab.guru/#0_12_*_*_1-5)
cron.rollout.restart/alertmanager-silence-enabled true|false Enable/Disable Alertmanager Silence for workload. Default is "false"
cron.rollout.restart/alertmanager-silence-duration <duration> Duration in minutes. (Default "15")
cron.rollout.restart/alertmanager-silence-labels <labels> Comma separated silence matching labels, eg. "key1=value1,key2=value2"
cron.rollout.restart/alertmanager-silence-comment <comment> Comment for the silence. (Default "kube-cron-rollout-restart")
RBAC
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kube-cron-rollout-restart
rules:
- apiGroups: ["apps"]
  resources: ["deployments", "statefulsets", "daemonsets"]
  verbs: ["list", "get", "patch"]

Parts of alertmanager code got from https://github.com/snigdhasambitak/alertmanager-silence-cli

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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