summaryrefslogtreecommitdiffstats
path: root/kubectl-getsecret
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2024-02-14 12:16:44 +0100
committerFlorian Pritz <bluewind@xinu.at>2024-07-02 12:59:23 +0200
commit492b47bbd55527ad8d9ff403b17b02a1e37c5c53 (patch)
treefc259dbd16ac5040a0ecf2179b4d8a24b1125c7c /kubectl-getsecret
parent3e07493625a14353e737567503801cc24336a866 (diff)
downloadbin-492b47bbd55527ad8d9ff403b17b02a1e37c5c53.tar.gz
bin-492b47bbd55527ad8d9ff403b17b02a1e37c5c53.tar.xz
add kubectl helpers
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'kubectl-getsecret')
-rwxr-xr-xkubectl-getsecret3
1 files changed, 3 insertions, 0 deletions
diff --git a/kubectl-getsecret b/kubectl-getsecret
new file mode 100755
index 0000000..745d36d
--- /dev/null
+++ b/kubectl-getsecret
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec kubectl get secret -o go-template='{{range $k,$v := .data}}{{printf "%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{"\n"}}{{end}}' "$@"