plugin:
  # dive image layers
  dive:
    shortCut: d
    confirm: false
    description: "Dive image"
    scopes:
      - containers
    command: dive
    background: false
    args:
      - $COL-IMAGE
  # get all resources in a namespace using the krew get-all plugin
  get-all:
    shortCut: g
    confirm: false
    description: get-all
    scopes:
      - all
    command: sh
    background: false
    args:
      - -c
      - "kubectl get-all -n $NAMESPACE | less"
  edit-secret:
    shortCut: Ctrl-X
    confirm: false
    description: "Edit Decoded Secret"
    scopes:
      - secrets
    command: kubectl
    background: false
    args:
      - modify-secret
      - --namespace
      - $NAMESPACE
      - --context
      - $CONTEXT
      - $NAME
  # View resource logs using stern
  stern:
    shortCut: Ctrl-L
    confirm: false
    description: "Logs <Stern>"
    scopes:
      - pods
    command: stern
    background: false
    args:
      - --tail
      - 50
      - $FILTER
      - -n
      - $NAMESPACE
      - --context
      - $CONTEXT
  # watch events on selected resources
  # requires linux "watch" command
  # change '-n' to adjust refresh time in seconds
  watch-events:
    shortCut: Shift-E
    confirm: false
    description: Get Events
    scopes:
      - all
    command: sh
    background: false
    args:
      - -c
      - "watch -n 5 kubectl get events --context $CONTEXT --namespace $NAMESPACE --field-selector involvedObject.name=$NAME"
