kubeswitch icon indicating copy to clipboard operation
kubeswitch copied to clipboard

FR: Support post-picking hooks

Open hinricht opened this issue 11 months ago • 0 comments

It seems from reading the hook docs that

Hooks are executed prior to the fuzzy search via $ switch or can be called directly via $ switch hooks --hook-name=.

I'd like to call a hook immediately after I picked the context. I.e. setting the right gcloud config depending on the k8s context.

Is this sth that could be easily implemented ?

i.e. adding a type key to execution ?

 kind: SwitchConfig
hooks:
  - name: inline
    type: InlineCommand
    type: Executable
    path: "/home/hinricht/bin/gcloud-config.sh"
    execution:
      type: post

hinricht avatar Jul 28 '23 13:07 hinricht