From cf8b85d1d91ae85925bc7b1584c9856ec7a1e7f1 Mon Sep 17 00:00:00 2001 From: Evy Bongers Date: Thu, 24 Jun 2021 10:50:26 +0200 Subject: [PATCH] feat(kubectl): add aliases for `kubectl rollout restart` --- plugins/kubectl/README.md | 4 +++- plugins/kubectl/kubectl.plugin.zsh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md index f6651c8cd..018b66077 100644 --- a/plugins/kubectl/README.md +++ b/plugins/kubectl/README.md @@ -70,6 +70,7 @@ plugins=(... kubectl) | kdd | `kubectl describe deployment` | Describe deployment resource in detail | | kdeld | `kubectl delete deployment` | Delete the deployment | | ksd | `kubectl scale deployment` | Scale a deployment | +| krrd | `kubectl rollout restart deployment` | Rollout restart a deployment | | krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment | | kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime | | | | **Rollout management** | @@ -105,7 +106,8 @@ plugins=(... kubectl) | kdss | `kubectl describe statefulset` | Describe statefulset resource in detail | | kdelss | `kubectl delete statefulset` | Delete the statefulset | | ksss | `kubectl scale statefulset` | Scale a statefulset | -| krsss | `kubectl rollout status statefulset`| Check the rollout status of a deployment | +| krrss | `kubectl rollout restart statefulset` | Rollout restart a statefulset | +| krsss | `kubectl rollout status statefulset`| Check the rollout status of a statefulset | | | | **Service Accounts management** | | kdsa | `kubectl describe sa` | Describe a service account in details | | kdelsa | `kubectl delete sa` | Delete the service account | diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index 3630facaa..9de4c3303 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -96,6 +96,7 @@ alias ked='kubectl edit deployment' alias kdd='kubectl describe deployment' alias kdeld='kubectl delete deployment' alias ksd='kubectl scale deployment' +alias krrd='kubectl rollout restart deployment' alias krsd='kubectl rollout status deployment' kres(){ kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S) @@ -115,6 +116,7 @@ alias kess='kubectl edit statefulset' alias kdss='kubectl describe statefulset' alias kdelss='kubectl delete statefulset' alias ksss='kubectl scale statefulset' +alias krrss='kubectl rollout restart statefulset' alias krsss='kubectl rollout status statefulset' # Port forwarding