mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue. 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>. kubectl resource builder to use versioned list Switch to using a versioned listed when return an object from the resource builder. This is necessary to allow cli's built outside the kubernetes/kubernetes repo to vendor the resource builder logic without vendoring all of Kubernetes. The following commands call the modified function. (identified by changing the function name and recompiling) - [x] `attach` - pkg/kubectl/cmd/attach.go:155: builder.Do().Object - passes to `AttachablePodForObject` which does not support Lists of any kind - [x] `get` - pkg/kubectl/cmd/get.go:251: r.Object - [x] check if isList with `IsListType` -> `GetItemsPtr` -> check for presence of `Items` field - [x] pass to `ResourceVersion` -> `CommonAccessor` -> checks for `metav1.ListInterface` (which this PR introduces a compile time check to ensure v1.List implements this) - [x] pass to `ExtractList` -> checks if items implement `runtime.RawExtension` - [x] `rolling_update` - pkg/kubectl/cmd/rollingupdate.go:207: request.Object - only accepts lists of length 1. updated in PR to support both api.List and v1.List - [x] `rollout_status` - pkg/kubectl/cmd/rollout/rollout_status.go:107: r.Object - passes to `ResourceVersion` -> `CommonAccessor` -> checks for `metav1.ListInterface` ```release-note NONE ``` Closes kubernetes/kubectl#81 |
||
---|---|---|
.. | ||
auth | ||
config | ||
rollout | ||
set | ||
templates | ||
testdata/edit | ||
testing | ||
util | ||
BUILD | ||
alpha.go | ||
annotate.go | ||
annotate_test.go | ||
apiversions.go | ||
apply.go | ||
apply_edit_last_applied.go | ||
apply_set_last_applied.go | ||
apply_test.go | ||
apply_view_last_applied.go | ||
attach.go | ||
attach_test.go | ||
autoscale.go | ||
certificates.go | ||
clusterinfo.go | ||
clusterinfo_dump.go | ||
clusterinfo_dump_test.go | ||
cmd.go | ||
cmd_test.go | ||
completion.go | ||
convert.go | ||
cp.go | ||
cp_test.go | ||
create.go | ||
create_clusterrole.go | ||
create_clusterrole_test.go | ||
create_clusterrolebinding.go | ||
create_clusterrolebinding_test.go | ||
create_configmap.go | ||
create_configmap_test.go | ||
create_deployment.go | ||
create_deployment_test.go | ||
create_namespace.go | ||
create_namespace_test.go | ||
create_pdb.go | ||
create_pdb_test.go | ||
create_quota.go | ||
create_quota_test.go | ||
create_role.go | ||
create_role_test.go | ||
create_rolebinding.go | ||
create_rolebinding_test.go | ||
create_secret.go | ||
create_secret_test.go | ||
create_service.go | ||
create_service_test.go | ||
create_serviceaccount.go | ||
create_serviceaccount_test.go | ||
create_test.go | ||
delete.go | ||
delete_test.go | ||
describe.go | ||
describe_test.go | ||
drain.go | ||
drain_test.go | ||
edit.go | ||
edit_test.go | ||
exec.go | ||
exec_test.go | ||
explain.go | ||
expose.go | ||
expose_test.go | ||
get.go | ||
get_test.go | ||
help.go | ||
label.go | ||
label_test.go | ||
logs.go | ||
logs_test.go | ||
options.go | ||
patch.go | ||
patch_test.go | ||
plugin.go | ||
plugin_test.go | ||
portforward.go | ||
portforward_test.go | ||
proxy.go | ||
replace.go | ||
replace_test.go | ||
rollingupdate.go | ||
rollingupdate_test.go | ||
run.go | ||
run_test.go | ||
scale.go | ||
taint.go | ||
taint_test.go | ||
top.go | ||
top_node.go | ||
top_node_test.go | ||
top_pod.go | ||
top_pod_test.go | ||
top_test.go | ||
version.go |