Skip to content

Commit

Permalink
steal more tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
joryirving committed Mar 6, 2024
1 parent f10254f commit ac43e0a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .taskfiles/Kubernetes/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,26 @@ tasks:
claim: '{{ or .claim (fail "Argument (claim) is required") }}'
preconditions:
- { msg: "PVC not found", sh: "kubectl --context {{.cluster}} -n {{.ns}} get persistentvolumeclaim {{.claim}}" }

browse-pvc:
desc: Browse PersistentVolumeClaims
summary: |
Args:
cluster: Cluster to run command against (required)
ns: Namespace to browse PersistentVolumeClaims in (default: default)
claim: PersistentVolumeClaim to browse (required)
interactive: true
cmd: kubectl browse-pvc --context {{.cluster}} --namespace {{.ns}} {{.claim}}
requires:
vars: ["cluster", "claim"]

delete-failed-pods:
desc: Deletes pods with a fucked status
summary: |
Args:
cluster: Cluster to run command against (required)
cmds:
- for: ["Evicted", "Failed", "Succeeded"]
cmd: kubectl --context {{.cluster}} delete pods --field-selector status.phase={{.ITEM}} -A --ignore-not-found=true
requires:
vars: ["cluster"]

0 comments on commit ac43e0a

Please sign in to comment.