From 885d2645a025d3a84251ec9033a7e040991b1d1a Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sun, 12 Jan 2025 15:57:04 -0500 Subject: [PATCH] feat(taskfile): add node-shell task Signed-off-by: Devin Buhl --- .taskfiles/kubernetes/Taskfile.yaml | 11 +++++++++++ .taskfiles/workstation/Taskfile.yaml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.taskfiles/kubernetes/Taskfile.yaml b/.taskfiles/kubernetes/Taskfile.yaml index 7767c31e04e63..bdb3a20a5ecbb 100644 --- a/.taskfiles/kubernetes/Taskfile.yaml +++ b/.taskfiles/kubernetes/Taskfile.yaml @@ -35,6 +35,17 @@ tasks: - kubectl browse-pvc --version - which kubectl + node-shell: + desc: Open a shell to a node [NODE=required] + interactive: true + cmd: kubectl node-shell -n kube-system -x {{.NODE}} + requires: + vars: [NODE] + preconditions: + - kubectl get nodes {{.NODE}} + - kubectl node-shell --version + - which kubectl + sync-secrets: desc: Sync all ExternalSecrets cmds: diff --git a/.taskfiles/workstation/Taskfile.yaml b/.taskfiles/workstation/Taskfile.yaml index e5cf245d453dc..c5d3ddf1adb62 100644 --- a/.taskfiles/workstation/Taskfile.yaml +++ b/.taskfiles/workstation/Taskfile.yaml @@ -23,7 +23,7 @@ tasks: desc: Set up Krew tools deps: [brew] cmds: - - kubectl krew install cert-manager cnpg browse-pvc rook-ceph view-secret + - kubectl krew install cert-manager cnpg browse-pvc node-shell rook-ceph view-secret preconditions: - kubectl krew version - which kubectl