Skip to content

Commit

Permalink
Moved plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontes11 committed May 11, 2024
1 parent 2afd79d commit 7e7409e
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .k9s/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
k9s:
ui:
skin: nord
File renamed without changes.
124 changes: 124 additions & 0 deletions .k9s/plugins/flux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# k9s flux plugin by mmontes11. See: https://github.com/mmontes11/k8s-scripts/tree/main/plugins
plugin:
#--- Create debug container for selected pod in current namespace
# See https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container
debug:
shortCut: Shift-D
description: Add debug container
dangerous: true
scopes:
- containers
command: bash
background: false
confirm: true
args:
- -c
- "kubectl debug -it --context $CONTEXT -n=$NAMESPACE $POD --target=$NAME --image=nicolaka/netshoot:v0.12 --share-processes -- bash"
toggle-helmrelease:
shortCut: Shift-T
confirm: true
scopes:
- helmreleases
description: Toggle to suspend or resume a HelmRelease
command: bash
background: false
args:
- -c
- >-
suspended=$(kubectl --context $CONTEXT get helmreleases -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1); verb=$([ $suspended = "true" ] && echo "resume" || echo "suspend"); flux $verb helmrelease --context $CONTEXT -n $NAMESPACE $NAME | less -K
toggle-kustomization:
shortCut: Shift-T
confirm: true
scopes:
- kustomizations
description: Toggle to suspend or resume a Kustomization
command: bash
background: false
args:
- -c
- >-
suspended=$(kubectl --context $CONTEXT get kustomizations -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1); verb=$([ $suspended = "true" ] && echo "resume" || echo "suspend"); flux $verb kustomization --context $CONTEXT -n $NAMESPACE $NAME | less -K
reconcile-git:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- gitrepositories
command: bash
background: false
args:
- -c
- >-
flux reconcile source git --context $CONTEXT -n $NAMESPACE $NAME | less -K
reconcile-hr:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- helmreleases
command: bash
background: false
args:
- -c
- >-
flux reconcile helmrelease --context $CONTEXT -n $NAMESPACE $NAME | less -K
reconcile-helm-repo:
shortCut: Shift-Z
description: Flux reconcile
scopes:
- helmrepositories
command: bash
background: false
confirm: false
args:
- -c
- >-
flux reconcile source helm --context $CONTEXT -n $NAMESPACE $NAME | less -K
reconcile-oci-repo:
shortCut: Shift-Z
description: Flux reconcile
scopes:
- ocirepositories
command: bash
background: false
confirm: false
args:
- -c
- >-
flux reconcile source oci --context $CONTEXT -n $NAMESPACE $NAME | less -K
reconcile-ks:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- kustomizations
command: bash
background: false
args:
- -c
- >-
flux reconcile kustomization --context $CONTEXT -n $NAMESPACE $NAME | less -K
reconcile-ir:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- imagerepositories
command: sh
background: false
args:
- -c
- >-
flux reconcile image repository --context $CONTEXT -n $NAMESPACE $NAME | less -K
reconcile-iua:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- imageupdateautomations
command: sh
background: false
args:
- -c
- >-
flux reconcile image update --context $CONTEXT -n $NAMESPACE $NAME | less -K
File renamed without changes.
13 changes: 0 additions & 13 deletions plugins/flux.yaml

This file was deleted.

0 comments on commit 7e7409e

Please sign in to comment.