mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-14 03:45:39 +00:00
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. pkg/printers: Support base64 decode in kubectl get go-template **What this PR does / why we need it**: Adds a `base64decode` function to templates in `kubectl` so that it's possible to extract secret data in plaintext instead of base64 without requiring a separate executable to do the decode. Sample usage: ```sh kubectl get secret SECRET -o go-template='{{ .data.KEY | base64decode }}' ``` **Which issue(s) this PR fixes**: Fixes kubernetes/kubernetes#45293. **Special notes for your reviewer**: **Release note**: ```release-note You can now use the `base64decode` function in kubectl go templates to decode base64-encoded data, for example `kubectl get secret SECRET -o go-template='{{ .data.KEY | base64decode }}'`. ```