k3s/pkg/printers
Kubernetes Submit Queue 1365ce3419
Merge pull request #60755 from glb/support-b64dec-in-templates
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 }}'`.
```
2018-03-21 23:44:19 -07:00
..
internalversion Merge pull request #61252 from dixudx/fix_describe_toleration 2018-03-21 20:23:17 -07:00
storage Promote v1alpha1 meta to v1beta1 2018-02-02 14:00:45 -05:00
.import-restrictions Restrict imports for printers 2017-02-23 00:28:31 -05:00
BUILD pkg/printers: Support base64 decode in kubectl go-template 2018-03-13 19:33:47 -04:00
OWNERS Add pkg/printers OWNERS 2017-03-07 22:28:27 -05:00
customcolumn.go outputs <none> for colums not found 2017-09-27 11:27:55 -07:00
customcolumn_test.go pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
humanreadable.go --show-all is inert in v1.11 2018-03-21 09:13:21 +08:00
humanreadable_test.go Promote v1alpha1 meta to v1beta1 2018-02-02 14:00:45 -05:00
interface.go consolidate printer OutputOpts w PrintOpts 2017-11-20 14:49:23 -05:00
json.go Denote if a printer is generic. 2017-05-31 13:02:23 +05:30
jsonpath.go Denote if a printer is generic. 2017-05-31 13:02:23 +05:30
name.go collapse printing paths 2018-02-21 08:15:22 -05:00
printers.go update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
tabwriter.go
template.go pkg/printers: Support base64 decode in kubectl go-template 2018-03-13 19:33:47 -04:00
template_test.go pkg/printers: Support base64 decode in kubectl go-template 2018-03-13 19:33:47 -04:00
versioned.go collapse printing paths 2018-02-21 08:15:22 -05:00