diff --git a/plugins/README.md b/plugins/README.md index 1c9536e6..71034fb1 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -10,6 +10,7 @@ Following is an example of some plugin files in this directory. Other files are | argocd.yaml | Perform argocd operation quickly | applications | Shift-r | [ArgoCD](https://argo-cd.readthedocs.io/en/stable/getting_started/) | | debug-container.yaml | Add [ephemeral debug container](1)
([nicolaka/netshoot](2)) | containers | Shift-d | | | dive.yaml | Dive image layers | containers | d | [Dive](https://github.com/wagoodman/dive) | +| dup.yaml | Duplicate, edit and Debug resources | all | Shift-d/e/v | [dup](https://github.com/vash/dup) | | external-secrets.yaml | Refresh external/push-secrets | externalsecrets/pushsecrets | Shift-R | | | get-all.yaml | get all resources in a namespace | all | g | [Krew](https://krew.sigs.k8s.io/), [ketall](https://github.com/corneliusweig/ketall/) | | helm-diff.yaml | Diff with previous revision / current revision | helm/history | Shift-D/Q | [helm-diff](https://github.com/databus23/helm-diff) | diff --git a/plugins/dup.yaml b/plugins/dup.yaml new file mode 100644 index 00000000..0d1988e8 --- /dev/null +++ b/plugins/dup.yaml @@ -0,0 +1,84 @@ +plugins: + dup: + shortCut: Shift-D + description: Duplicate + scopes: + - all + command: bash + background: false + confirm: true + args: + - -c + - "kubectl dup -k $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT" + dup_edit: + # Prompted to edit a new duplicate resource + shortCut: Shift-E + description: Duplicate + Edit + scopes: + - all + command: bash + background: false + confirm: true + args: + - -c + - "kubectl dup $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT" + dup_debug_pods: + # Spawn a resource with no readiness probes and infinite running command. + shortCut: Shift-V + description: Debug + scopes: + - pods + command: bash + background: true + confirm: true + args: + - -c + - "kubectl dup -kdl $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT" + dup_debug_deploy: + # Spawn a resource with no readiness probes and infinite running command. + shortCut: Shift-V + description: Debug + scopes: + - deployments + command: bash + background: true + confirm: true + args: + - -c + - "kubectl dup -kdl $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT" + dup_debug_sts: + # Spawn a resource with no readiness probes and infinite running command. + shortCut: Shift-V + description: Debug + scopes: + - statefulsets + command: bash + background: true + confirm: true + args: + - -c + - "kubectl dup -kdl $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT" + dup_debug_cronjob: + # Spawn a resource with no readiness probes and infinite running command. + shortCut: Shift-V + description: Debug + scopes: + - cronjobs + command: bash + background: true + confirm: true + args: + - -c + - "kubectl dup -kdl $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT" + dup_debug_jobs: + # Spawn a resource with no readiness probes and infinite running command. + shortCut: Shift-V + description: Debug + scopes: + - jobs + command: bash + background: true + confirm: true + args: + - -c + - "kubectl dup -kdl $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT"