Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kubectl config set in struct pointer failure #92685

Closed

Conversation

zhouya0
Copy link
Contributor

@zhouya0 zhouya0 commented Jul 1, 2020

What type of PR is this?
/kind bug

What this PR does / why we need it:
When having a ptr type in config, like inAuthInfo we have AuthProvider and Exec:

AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`

Exec *ExecConfig `json:"exec,omitempty"`

It's impossible to set values in these fields by using kubectl config set.

Before this PR:

[root@master ~]# kubectl config set users.test3.exec.command testcommand
error: unable to parse one or more field values of users.test3.exec.command

After this PR:

[root@master ~]# ./kubectl-config config set users.test3.exec.command testcommand
Property "users.test3.exec.command" set.

Which issue(s) this PR fixes:

Fixes #92629

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix kubectl config set in struct pointer failure.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 1, 2020
@zhouya0 zhouya0 force-pushed the fix_kubectl_config_set_ptr branch from 82416cf to 28bf67b Compare July 1, 2020 07:16
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 1, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zhouya0
To complete the pull request process, please assign brendandburns
You can assign the PR to them by writing /assign @brendandburns in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. labels Jul 1, 2020
@zhouya0
Copy link
Contributor Author

zhouya0 commented Jul 1, 2020

/hold

@zhouya0
Copy link
Contributor Author

zhouya0 commented Jul 1, 2020

#29312
kubernetes/kubectl#415
#79000
Seems this behave is not a bug. Waiting for more evidence.

@k8s-ci-robot
Copy link
Contributor

@zhouya0: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-bazel-test 28bf67b link /test pull-kubernetes-bazel-test
pull-kubernetes-e2e-kind-ipv6 28bf67b link /test pull-kubernetes-e2e-kind-ipv6
pull-kubernetes-e2e-gce-100-performance 28bf67b link /test pull-kubernetes-e2e-gce-100-performance
pull-kubernetes-verify 28bf67b link /test pull-kubernetes-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@zhouya0
Copy link
Contributor Author

zhouya0 commented Jul 2, 2020

/close
Close it for now.

@zhouya0 zhouya0 closed this Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubectl config set error
2 participants