Git Product home page Git Product logo

kconf's Introduction

banner

๐Ÿš€ Hi, I'm Zdenko Vrabel, an engineer and consultant from Slovakia.

I'm ordinary engineer who is constantly jumping between code and infrastructures. I like to be in both boots - SWE and SRE. Most of my life I spent as programmer - with touching the code. But also I was always very close to cloud and on-prem infrastructures, Kubernetes and containers. After years of C/C++ and Java I jumped into Go lang bandwagon. And I'm more than happy with this language.

I have passion for container internals, for Kubernetes and networking of containers. In my spare time, I'm blogging on (https://okontajneroch.sk) and speaking about containers on meetups for our local tech community in Kosice. Also I'm spamming technical content on LinkedIn, and trying to make LI more interesting place for tech people.

I'm big believer in platform as a product idea as next step in DevOps evolution. I believe we need more product thinking in infrastructure platform domain. This leads me to self-study of a product design. Yes, I'm big fan of Marty Cagan.

My CV is available here

ย ย 

Zdenko's Twitter ย ย  Zdenko's LinkedIn

kconf's People

Contributors

abtris avatar sn3d avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

abtris

kconf's Issues

Renaming context during importing

Time to time I would like to import multiple contexts but with same name. I would like to have some feature for renaming imported context name. Something like:

kconf import --name new-context << EOF
...
EOF

Subcommand for creating user

Having subcommand useradd (like in linux) would be helpful. The command will create certificate for user and group (CN and O), sign it by CertificateSigningRequest and build Kubeconfig for it.

Set of changing commands

Would be great to have set of ch* commands, same like chgrp, chown in Linux, we can use for editing contexts/servers/users.

E.g. would be great to have something like:

kconf chsrv some-server --ip=123.123.123.123

kconf chusr some-user --token=xxxx

kconf chctx some-context --user=some-user --server=some-server

segmentation violation when run cc

When I run kconf cc, I've got

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x104a2b73c]

goroutine 1 [running]:
github.com/sn3d/kconf/pkg/tui.ShowContextList({0x14000030e80, 0x20}, {0x1400020e400, 0x37}, 0x1400000e978)
	/home/runner/work/kconf/kconf/pkg/tui/context_list.go:69 +0x14c
github.com/sn3d/kconf/cmd/kconf/cc.showList(...)
	/home/runner/work/kconf/kconf/cmd/kconf/cc/cc.go:51
github.com/sn3d/kconf/cmd/kconf/cc.glob..func1(0x1400010d680)
	/home/runner/work/kconf/kconf/cmd/kconf/cc/cc.go:33 +0xbc
github.com/urfave/cli/v2.(*Command).Run(0x1050207e0, 0x1400010d680, {0x14000177190, 0x1, 0x1})
	/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:273 +0x75c
github.com/urfave/cli/v2.(*Command).Run(0x1400011ef20, 0x1400010d540, {0x1400001e040, 0x2, 0x2})
	/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:266 +0x97c
github.com/urfave/cli/v2.(*App).RunContext(0x1400019a3c0, {0x104c5a978?, 0x1400002a0c8}, {0x1400001e040, 0x2, 0x2})
	/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:332 +0x604
github.com/urfave/cli/v2.(*App).Run(...)
	/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:309

This is caused in kubeconf file when context is refering to cluster which is not existing in YAML

Implementing fzf

Would be great having fzf implemented when user type e.g. chns without any argument. To offer user list of possible options.

Changing default namespace

Would be great to have some way how I can quickly change the default namespace for context. The idea is to having:

kconf chns my-context some-namepace

The command above will change the default namespace for my-context

Separated TUI for each item

Currently Kconf is using generic TUI list for all items like ctx, usr, ns or clst. Would be better to have dedicated TUI lists for each item, to add special functionality related to each item (e.g. key d might delete context). With generic list, the code is complex and adding new feature is about "how it will break other lists"

Get list of namespaces

Currently the cc without any argument show you nice list of all contexts and you can pick some context which will be set as default.

Would be great to have same functionality for chns and namespaces. But this require getting namespaces from cluster via k8s API.

Ensure order in list

The list rendered by kconf cc is not ordered. Usually it should be not problem, but what is annoying is the each invocation of kconf cc could render list with different ordering.

The list of contexts is not showing pagination

When you have 17 contexts, the list will show only first 16. Rest of the contexts are on another page. It's because pagination is not visible and people are not aware there are more contexts

Better subcommands

Currently we have cc and chns etc or commands like usrmod and clustermod. The subcommands are bit inconsistent and the subcomand naming is not very user friendly.

I've propose to keep subcommands like export and import as they are and create 3 majos subcommands:

  • ctx
  • usr
  • clst
  • ns

The subcommand ctx will do change of current context same as cc. Same usr as chusr but also having a subcommand mod, you can use for modifying. Instead of usrmod you will execute usr mod. Also mv will be replaced by ctx rename or rm by ctx rm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.