Skip to content

Instantly share code, notes, and snippets.

@fragolinux
Last active April 25, 2025 13:05
Show Gist options
  • Select an option

  • Save fragolinux/f0c918ae7dad09f169dfe50759fe322f to your computer and use it in GitHub Desktop.

Select an option

Save fragolinux/f0c918ae7dad09f169dfe50759fe322f to your computer and use it in GitHub Desktop.

Revisions

  1. fragolinux revised this gist Mar 15, 2022. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion plugin.yml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # $XDG_CONFIG_HOME/.config/k9s/plugin.yml
    # $XDG_CONFIG_HOME/k9s/plugin.yml
    # check your env, XDG_CONFIG_HOME should be defined as ~/.config
    # move selected line to chosen resource in K9s, then:
    # Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume
    # Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
  2. fragolinux revised this gist Mar 15, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion plugin.yml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # $XDG_CONFIG_HOME/k9s/plugin.yml
    # $XDG_CONFIG_HOME/.config/k9s/plugin.yml
    # move selected line to chosen resource in K9s, then:
    # Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume
    # Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
  3. fragolinux revised this gist Mar 5, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion plugin.yml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # $HOME/.k9s/plugin.yml
    # $XDG_CONFIG_HOME/k9s/plugin.yml
    # move selected line to chosen resource in K9s, then:
    # Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume
    # Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
  4. fragolinux revised this gist Jul 17, 2021. 1 changed file with 35 additions and 0 deletions.
    35 changes: 35 additions & 0 deletions plugin.yml
    Original file line number Diff line number Diff line change
    @@ -69,3 +69,38 @@ plugin:
    args:
    - -c
    - "kubectl get all -n $NAME | less"
    velero-describe:
    shortCut: Shift-D
    confirm: false
    description: Describe Velero Backup
    scopes:
    - backups
    command: sh
    background: false
    args:
    - -c
    - "velero backup describe $NAME --details --colorized true --features=EnableCSI | less"
    velero-logs:
    shortCut: Shift-L
    confirm: false
    description: Logs Velero Backup
    scopes:
    - backups
    command: sh
    background: false
    args:
    - -c
    - "velero backup logs $NAME --colorized true --features=EnableCSI | less"

    # neat-em-all:
    # shortCut: Shift-N
    # confirm: false
    # description: Neatly export a resource
    # scopes:
    # - all
    # command: sh
    # background: false
    # args:
    # - -c
    # - "kubectl get all -n $NAME | less"
    # kubectl get pod kube-prometheus-node-exporter-v78xp -o yaml |k neat
  5. fragolinux revised this gist Jun 25, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions plugin.yml
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ plugin:
    background: false
    args:
    - -c
    - "flux reconcile helmrelease -n $NAMESPACE $NAME | less"
    - "flux reconcile helmrelease -n $NAMESPACE $NAME --with-source | less"
    reconcile-ks:
    shortCut: Shift-R
    confirm: false
    @@ -57,7 +57,7 @@ plugin:
    background: false
    args:
    - -c
    - "flux reconcile kustomization -n $NAMESPACE $NAME | less"
    - "flux reconcile kustomization -n $NAMESPACE $NAME --with-source | less"
    getall-ns:
    shortCut: Shift-G
    confirm: false
  6. fragolinux revised this gist Jun 17, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion plugin.yml
    Original file line number Diff line number Diff line change
    @@ -61,7 +61,7 @@ plugin:
    getall-ns:
    shortCut: Shift-G
    confirm: false
    description: Get All Resource in NS
    description: Get All Resources in NS
    scopes:
    - namespaces
    command: sh
  7. fragolinux revised this gist Jun 17, 2021. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions plugin.yml
    Original file line number Diff line number Diff line change
    @@ -58,3 +58,14 @@ plugin:
    args:
    - -c
    - "flux reconcile kustomization -n $NAMESPACE $NAME | less"
    getall-ns:
    shortCut: Shift-G
    confirm: false
    description: Get All Resource in NS
    scopes:
    - namespaces
    command: sh
    background: false
    args:
    - -c
    - "kubectl get all -n $NAME | less"
  8. fragolinux revised this gist May 16, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion plugin.yml
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ plugin:
    confirm: true
    scopes:
    - kustomizations
    description: Toggle to suspend or resume a HelmRelease
    description: Toggle to suspend or resume a Kustomization
    command: sh
    background: false
    args:
  9. fragolinux revised this gist May 16, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion plugin.yml
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # $HOME/.k9s/plugin.yml
    # move selected line to chosen resource in K9s, then:
    # Shift-T (with confirmation) to toggle helm releases or kustomizations
    # Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume
    # Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
    plugin:
    toggle-helmrelease:
  10. fragolinux created this gist May 16, 2021.
    60 changes: 60 additions & 0 deletions plugin.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,60 @@
    # $HOME/.k9s/plugin.yml
    # move selected line to chosen resource in K9s, then:
    # Shift-T (with confirmation) to toggle helm releases or kustomizations
    # Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
    plugin:
    toggle-helmrelease:
    shortCut: Shift-T
    confirm: true
    scopes:
    - helmreleases
    description: Toggle to suspend or resume a HelmRelease
    command: sh
    background: false
    args:
    - -c
    - "flux $([ $(kubectl get helmreleases -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1) = \"true\" ] && echo \"resume\" || echo \"suspend\") helmrelease -n $NAMESPACE $NAME | less"
    toggle-kustomization:
    shortCut: Shift-T
    confirm: true
    scopes:
    - kustomizations
    description: Toggle to suspend or resume a HelmRelease
    command: sh
    background: false
    args:
    - -c
    - "flux $([ $(kubectl get kustomizations -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1) = \"true\" ] && echo \"resume\" || echo \"suspend\") kustomization -n $NAMESPACE $NAME | less"
    reconcile-git:
    shortCut: Shift-R
    confirm: false
    description: Flux reconcile
    scopes:
    - gitrepositories
    command: sh
    background: false
    args:
    - -c
    - "flux reconcile source git -n $NAMESPACE $NAME | less"
    reconcile-hr:
    shortCut: Shift-R
    confirm: false
    description: Flux reconcile
    scopes:
    - helmreleases
    command: sh
    background: false
    args:
    - -c
    - "flux reconcile helmrelease -n $NAMESPACE $NAME | less"
    reconcile-ks:
    shortCut: Shift-R
    confirm: false
    description: Flux reconcile
    scopes:
    - kustomizations
    command: sh
    background: false
    args:
    - -c
    - "flux reconcile kustomization -n $NAMESPACE $NAME | less"