plugins.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # $XDG_CONFIG_HOME/k9s/plugin.yml
  2. # check your env, XDG_CONFIG_HOME should be defined as ~/.config
  3. # move selected line to chosen resource in K9s, then:
  4. # Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume
  5. # Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
  6. plugins:
  7. toggle-helmrelease:
  8. shortCut: Shift-T
  9. confirm: true
  10. scopes:
  11. - helmreleases
  12. description: Toggle to suspend or resume a HelmRelease
  13. command: sh
  14. background: false
  15. args:
  16. - -c
  17. - "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"
  18. toggle-kustomization:
  19. shortCut: Shift-T
  20. confirm: true
  21. scopes:
  22. - kustomizations
  23. description: Toggle to suspend or resume a Kustomization
  24. command: sh
  25. background: false
  26. args:
  27. - -c
  28. - "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"
  29. reconcile-git:
  30. shortCut: Shift-R
  31. confirm: false
  32. description: Flux reconcile
  33. scopes:
  34. - gitrepositories
  35. command: sh
  36. background: false
  37. args:
  38. - -c
  39. - "flux reconcile source git -n $NAMESPACE $NAME | less"
  40. reconcile-hr:
  41. shortCut: Shift-R
  42. confirm: false
  43. description: Flux reconcile
  44. scopes:
  45. - helmreleases
  46. command: sh
  47. background: false
  48. args:
  49. - -c
  50. - "flux reconcile helmrelease -n $NAMESPACE $NAME --with-source | less"
  51. reconcile-ks:
  52. shortCut: Shift-R
  53. confirm: false
  54. description: Flux reconcile
  55. scopes:
  56. - kustomizations
  57. command: sh
  58. background: false
  59. args:
  60. - -c
  61. - "flux reconcile kustomization -n $NAMESPACE $NAME --with-source | less"
  62. getall-ns:
  63. shortCut: Shift-G
  64. confirm: false
  65. description: Get All Resources in NS
  66. scopes:
  67. - namespaces
  68. command: sh
  69. background: false
  70. args:
  71. - -c
  72. - "kubectl get all -n $NAME | less"
  73. # velero-describe:
  74. # shortCut: Shift-D
  75. # confirm: false
  76. # description: Describe Velero Backup
  77. # scopes:
  78. # - backups
  79. # command: sh
  80. # background: false
  81. # args:
  82. # - -c
  83. # - "velero backup describe $NAME --details --colorized true --features=EnableCSI | less"
  84. # velero-logs:
  85. # shortCut: Shift-L
  86. # confirm: false
  87. # description: Logs Velero Backup
  88. # scopes:
  89. # - backups
  90. # command: sh
  91. # background: false
  92. # args:
  93. # - -c
  94. # - "velero backup logs $NAME --colorized true --features=EnableCSI | less"
  95. # neat-em-all:
  96. # shortCut: Shift-N
  97. # confirm: false
  98. # description: Neatly export a resource
  99. # scopes:
  100. # - all
  101. # command: sh
  102. # background: false
  103. # args:
  104. # - -c
  105. # - "kubectl get all -n $NAME | less"
  106. # kubectl get pod kube-prometheus-node-exporter-v78xp -o yaml |k neat