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

Add the ability to edit fields within a config map. #38445

Merged
merged 1 commit into from
Jan 23, 2017

Conversation

brendandburns
Copy link
Contributor

@brendandburns brendandburns commented Dec 9, 2016

Addresses part of #36222

Example command:

$ kubectl edit configmap foo --config-map-data=bar

Will open the data element named bar in the ConfigMap named foo in $EDITOR, the edited contents are then updated back to the config map.

@kubernetes/sig-cli

Add a special purpose tool for editing individual fields in a ConfigMap with kubectl

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 9, 2016
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Dec 9, 2016
@fabianofranz
Copy link
Contributor

@brendandburns does edit configmap being a subcommand breaks the RESOURCE/NAME syntax (with slash)? Like in $ kubectl edit configmap/foo.

@brendandburns
Copy link
Contributor Author

@fabianofranz it won't break it, but it will make this particular command not work...

Subcommand seemed cleaner than a type-specific hack in edit.go but I'm open to other ideas.

@juanvallejo
Copy link
Contributor

@brendandburns would pkg/kubectl/cmd/edit_configmap.go benefit from having a RunEditConfigmap function? RunEdit could also be called from there, and the command's Run: func(... might instead look something like:

Run: func(cmd *cobra.Command, args []string) {
   cmdutil.CheckErr(RunEditConfigmap(args))
}

This might make this file a bit easier to read

@brendandburns
Copy link
Contributor Author

@juanvallejo done.

@fabianofranz any chance for another look at this?

Thanks!
--brendan

@k8s-ci-robot
Copy link
Contributor

Jenkins Kubemark GCE e2e failed for commit 7ce1cae17f80e55ca6322e4722234eadd4f45641. Full PR test history.

The magic incantation to run this job again is @k8s-bot kubemark e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE e2e failed for commit 7ce1cae17f80e55ca6322e4722234eadd4f45641. Full PR test history.

The magic incantation to run this job again is @k8s-bot cvm gce e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCI GCE e2e failed for commit 7ce1cae17f80e55ca6322e4722234eadd4f45641. Full PR test history.

The magic incantation to run this job again is @k8s-bot gci gce e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE etcd3 e2e failed for commit 7ce1cae17f80e55ca6322e4722234eadd4f45641. Full PR test history.

The magic incantation to run this job again is @k8s-bot gce etcd3 e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 18, 2016
@k8s-ci-robot
Copy link
Contributor

Jenkins verification failed for commit 7ce1cae17f80e55ca6322e4722234eadd4f45641. Full PR test history.

The magic incantation to run this job again is @k8s-bot verify test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GKE smoke e2e failed for commit 37c09377a0daa47774a1cf2589d6369f1c0cdf3b. Full PR test history.

The magic incantation to run this job again is @k8s-bot cvm gke e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@brendandburns
Copy link
Contributor Author

@k8s-bot gci gke e2e test this.

@brendandburns
Copy link
Contributor Author

@k8s-bot cvm gke e2e test this

@brendandburns
Copy link
Contributor Author

@k8s-bot unit test this

1 similar comment
@brendandburns
Copy link
Contributor Author

@k8s-bot unit test this

@k8s-ci-robot
Copy link
Contributor

Jenkins Bazel Build failed for commit b54f1b6c5a185b8a672071264b4bf7bddd650911. Full PR test history.

The magic incantation to run this job again is @k8s-bot bazel test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@fabianofranz
Copy link
Contributor

@k8s-bot unit test this

@k8s-ci-robot
Copy link
Contributor

Jenkins unit/integration failed for commit bd2dd8ae75319aecd812948ea4b8a9dd7424c099. Full PR test history.

The magic incantation to run this job again is @k8s-bot unit test this. Please help us cut down flakes by linking to an open flake 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.

@brendandburns
Copy link
Contributor Author

@k8s-bot gci gke e2e test this

1 similar comment
@brendandburns
Copy link
Contributor Author

@k8s-bot gci gke e2e test this

@k8s-ci-robot
Copy link
Contributor

Jenkins GCI GKE smoke e2e failed for commit 0d264659230deb989235384fea1add884f9dd177. Full PR test history. cc @brendandburns

The magic incantation to run this job again is @k8s-bot gci gke e2e test this. Please help us cut down flakes by linking to an open flake 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.

@brendandburns
Copy link
Contributor Author

@fabianofranz I think this is ready to go...

Thanks!

@fabianofranz
Copy link
Contributor

@brendandburns Mind adding a release note? I think this is worth one, tks!

@brendandburns brendandburns added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Jan 21, 2017
@brendandburns
Copy link
Contributor Author

@fabianofranz release note added.

Thanks

@fabianofranz
Copy link
Contributor

Tks!

@fabianofranz
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 23, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 38445, 40292)

@k8s-github-robot k8s-github-robot merged commit 1f1f369 into kubernetes:master Jan 23, 2017
@@ -100,12 +100,20 @@ func NewCmdEdit(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command {
Long: editLong,
Example: fmt.Sprintf(editExample),
Run: func(cmd *cobra.Command, args []string) {
args = append([]string{"configmap"}, args...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this breaks edit for all other resources

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ kubectl edit serviceaccount default
Error from server (NotFound): configmaps "serviceaccount" not found

@liggitt
Copy link
Member

liggitt commented Jan 25, 2017

this broke edit for all resources other than configmaps, @fabianofranz can you investigate how this passed kubectl tests?

also, edit is a generic command, we can't add subcommands that claim the configmap space

reverting in #40421

k8s-github-robot pushed a commit that referenced this pull request Jan 25, 2017
Automatic merge from submit-queue (batch tested with PRs 38905, 40421)

Revert "Add the ability to edit fields within a config map."

Fixes #40396 
This reverts commit 31eca37.

#38445 broke edit for all resources other than configmaps:
```
$ kubectl edit serviceaccount default
Error from server (NotFound): configmaps "serviceaccount" not found
```
also, `edit` is a generic command, we can't add subcommands that claim the `configmap` space and mess with the things resourcebuilder accepts
@mengqiy
Copy link
Member

mengqiy commented Mar 22, 2017

Since this PR has been reverted in #40421.
/release-note-none

@k8s-ci-robot
Copy link
Contributor

@ymqytw: you can only set release notes if you are the author or an assignee.

In response to this comment:

Since this PR has been reverted in #40421.
/release-note-none

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.

@mengqiy
Copy link
Member

mengqiy commented Mar 22, 2017

/assign @ymqytw

@mengqiy
Copy link
Member

mengqiy commented Mar 22, 2017

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Mar 22, 2017
@KIVagant
Copy link

@brendandburns , any chance to get this feature back? It would be very useful.

@juanvallejo
Copy link
Contributor

@KIVagant there is currently a proposal (needs a KEP opened) that discusses a few approaches for adding this feature back

@jose-fmeyer
Copy link

jose-fmeyer commented Sep 2, 2019

Any chance we can revisit this feature? It would be quite useful to have...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants