k3s/pkg
bjhaid 44bed94f0e Opt out of chowning and chmoding from kubectl cp.
`kubectl cp` relies on tar to extract the copied file/directory in the
container, tar by default attempts to chown/chmod the extracted file
after extraction if the user is the "superuser"(root)

```
--same-owner
try extracting files with the same ownership as exists in the archive
(default for superuser)
-p, --preserve-permissions, --same-permissions
extract information about file permissions (default for superuser)
```

This fails in environment where the container runs as root but is not
granted the OWNER or CHOWN capability.

Before this patch below was the behavior of `kubectl cp`

```
kubectl cp README.md foo-67b6fcbd4c-qjlt6:/tmp
tar: README.md: Cannot change ownership to uid 1000, gid 1000: Operation
not permitted
tar: Exiting with failure status due to previous errors
command terminated with exit code 2
kubectl exec -it foo-67b6fcbd4c-qjlt6 -- ls -l /tmp/README.md
-rw------- 1 1000 1000 3179 Oct  7 22:00 /tmp/README.md
```

After this patch

```
kubectl cp -x a foo-67b6fcbd4c-qjlt6:/
kubectl exec -it foo-67b6fcbd4c-qjlt6 -- ls -l /tmp/README.md
-rw-r--r-- 1 root root 3179 Oct  7 22:00 /tmp/README.md
```
2018-10-18 14:16:06 +00:00
..
api Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
apis Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
auth
capabilities
client Remove unused chaosclient 2018-09-26 08:43:01 +08:00
cloudprovider Merge pull request #69386 from cblecker/go-1.11 2018-10-05 17:35:51 -07:00
controller Merge pull request #69386 from cblecker/go-1.11 2018-10-05 17:35:51 -07:00
credentialprovider Remove dependency on docker daemon for core credential types 2018-09-07 16:36:14 -04:00
features Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
fieldpath Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
generated Merge pull request #68195 from luxas/consolidate_componentconfig_code_standards 2018-09-07 11:19:40 -07:00
kubeapiserver Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
kubectl Opt out of chowning and chmoding from kubectl cp. 2018-10-18 14:16:06 +00:00
kubelet Merge pull request #69386 from cblecker/go-1.11 2018-10-05 17:35:51 -07:00
kubemark autogenerated 2018-08-29 20:21:17 +03:00
master cloud-controller-manager: enable secure ports 10258, deprecate insecure port 2018-08-31 20:52:22 +02:00
printers Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
probe
proxy Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
quota Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
registry Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
routes
scheduler Merge pull request #68403 from wgliang/master.deprecate-Parallelize 2018-10-06 09:40:07 -07:00
security Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
securitycontext ProcMount: add api options and feature gate 2018-08-30 11:40:02 -04:00
serviceaccount add a test case which check secret's type 2018-09-26 09:21:36 +08:00
ssh
util Merge pull request #68945 from gnufied/fix-mount-options 2018-10-01 09:27:54 -07:00
version *: Remove comment tags in GoDoc 2018-09-13 20:27:32 -07:00
volume Merge pull request #69451 from justinsb/sort_bind_options 2018-10-06 21:29:51 -07:00
watch/json
windows/service
.import-restrictions
BUILD Remove unused chaosclient 2018-09-26 08:43:01 +08:00
OWNERS