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 new plugin "konfig" #122

Merged
merged 2 commits into from May 14, 2019

Conversation

Projects
None yet
5 participants
@corneliusweig
Copy link
Contributor

commented Mar 31, 2019

This is a small wrapper script around the kubectl config view command. It is intended as a way spread knowledge about this command with sane defaults. Users who know their way around kubectl config view do not need this.

Home: https://github.com/corneliusweig/konfig-merge
Initial release: https://github.com/corneliusweig/konfig-merge/releases/tag/v0.1.0


Checklist for plugin developers:

  • Read the Plugin Naming Guide (for new plugins)
  • Verify the installation from URL or a local archive works (kubectl krew install --manifest=[...] --archive=[...])
@corneliusweig

This comment has been minimized.

Copy link
Contributor Author

commented Mar 31, 2019

This is similar to #73, however this implementation relies on the standard kubectl config view command to do the merging.

@corneliusweig corneliusweig force-pushed the corneliusweig:config-merge branch from 0e50eb1 to 3ee73ff Apr 8, 2019

@ahmetb

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

Thanks for your new plugin contribution.

This basically doesn't provide any new functionality, it just makes the functionality existing in kubectl config command a bit more discoverable.

As a matter of fact, I wrote a blog post about these kubectl features because they aren't very discoverable and/or not widely known: https://medium.com/@ahmetb/mastering-kubeconfig-4e447aa32c75

So far we've been cautious about accepting such plugins and been putting them on hold until we come up with an acceptance among as the community. Accepting a plugin then removing it later right now has consequences, so we've been a little more careful lately.

@juanvallejo what are your thoughts on such plugins that provide a light shim over kubectl that don’t add new functionality but make existing functionality more discoverable?

@ahmetb

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

/assign
/hold

@corneliusweig

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

@ahmetb Yeah, that's absolutely fine. I kind of had the same stance against the config-merge in go #73. However, I realized that I had written such a kubectl wrapper for myself, because I rarely needed config-merge, but when I did, I had forgotten how to do it. Therefore I think it could be helpful for others too.
Anyway, I appreciate that you want to keep the list of plugins short :)

Btw, I took your nice article as reference ;)

@kairen

This comment has been minimized.

Copy link

commented Apr 25, 2019

@corneliusweig I have closed my PR because of this is better than #73.

@corneliusweig

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

@kairen Well, it seems as if this doesn't go into the index anyway. But if you have any idea how to improve this tool, we can collaborate on this. 🙇

@ahmetb

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2019

We might take this in if users are finding it useful.
BTW isn't this kind off odd: kubectl config-merge --extract, the name says "merge", but the flag says "extract", so technically plugin doesn't always do "merge"?

@corneliusweig

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

Well.. this is a bit odd. Other names I can come up with:

  • config-tool: sounds awfully generic though
  • config-mixer / config-blender: I kind of like that :).

I also plan to extend the tool to extract a kubeconfig for several contexts from any number of input kubeconfig files. That means option 2 may be more suited after all. WDYT?

I'll be away for a few days, so don't expect updates soon.

@ahmetb

This comment has been minimized.

Copy link
Contributor

commented Apr 28, 2019

🤔 Sounds like a bit of swiss-army knife of kubeconfig utilities really.

I wonder if this could be designed like

  • x merge
  • x split (or export)
  • x import

Where x is an original name like kubectl configutil, kubectl konfig, kubectl cfg or something like that.

@corneliusweig corneliusweig force-pushed the corneliusweig:config-merge branch from 3ee73ff to 9ae7445 May 11, 2019

Add new plugin "konfig"
This is a small wrapper script around the `kubectl config view` command.
It has three subcommands:
 - import
 - export/split
 - merge

Home: https://github.com/corneliusweig/konfig
Release notes: https://github.com/corneliusweig/konfig/releases/tag/v0.2.0

Signed-off-by: Cornelius Weig <cornelius.weig@gmail.com>

@corneliusweig corneliusweig force-pushed the corneliusweig:config-merge branch from 9ae7445 to 83b8ef6 May 11, 2019

@corneliusweig

This comment has been minimized.

Copy link
Contributor Author

commented May 11, 2019

@ahmetb I finally found time to revise the tool. It's now called just "konfig" and has the subcommands as suggested. Do you think this is now appropriate for the index?

@corneliusweig corneliusweig changed the title Add new plugin "config-merge" Add new plugin "konfig" May 12, 2019

@ahmetb

This comment has been minimized.

Copy link
Contributor

commented May 14, 2019

Looks great, thanks.
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label May 14, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link

commented May 14, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, corneliusweig

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

The pull request process is described 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

@corneliusweig

This comment has been minimized.

Copy link
Contributor Author

commented May 14, 2019

@ahmetb apparently, somebody needs to remove the "hold" label if it should be merged.

@ahmetb

This comment has been minimized.

Copy link
Contributor

commented May 14, 2019

/hold cancel

@k8s-ci-robot k8s-ci-robot merged commit 396f840 into kubernetes-sigs:master May 14, 2019

2 of 3 checks passed

tide Not mergeable.
Details
cla/linuxfoundation corneliusweig authorized
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.