Commit Graph

256 Commits

Author SHA1 Message Date
Ahmet Alp Balkan
4425628f91 Remove changelog
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-30 07:36:21 -07:00
Curro Rodriguez
f2021bb08b changed help in kubens, return had a typo (#210) 2020-04-30 07:34:06 -07:00
Ahmet Alp Balkan
d603c7dada Release v0.9.0 v0.9.0 2020-04-29 13:52:03 -07:00
Ahmet Alp Balkan
ba79bdb0f8 Update readme to talk about Go rewrite
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 13:51:19 -07:00
Ahmet Alp Balkan
fc21b8c522 Update readme, update bats setup
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 13:45:40 -07:00
Ahmet Alp Balkan
e5024778a9 Add integration tests to CI workflow
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 13:40:11 -07:00
Ahmet Alp Balkan
d669862436 Update CI workflow name
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 13:30:55 -07:00
Ahmet Alp Balkan
7f3f0699b3 Extend CI workflow with gofmt
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 13:28:12 -07:00
Ahmet Alp Balkan
3c9c44842c Extend CI workflow by adding tests
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 13:22:42 -07:00
Ahmet Alp Balkan
0491ac552e Add goreleaser and github workflows
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 13:18:14 -07:00
Ahmet Alp Balkan
5348d7aa7e kubens add a short-circuit to bypass API call for tests
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
04689f571e ns list: increase page size to 500
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
1881107d55 Load namespaces using client-go
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
52bbf5c786 fix compile error
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
4bbe0fad79 deprecation msgs for KUBECTX_CURRENT_{BG,FG}COLOR
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
5b745727c3 Add interactive switching to kubens
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
fc2e1c6b08 Fix bug about where cur ns was stored in yaml
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
2915103e3d kubens: implement namespace switching
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
6c3977d574 kubens: Add facility to store state file
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
de2867a622 Implement list (via exec kubectl), clearer color settings
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
c4252b5795 Move kubeconfig loader utils to cmdutil pkg
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
1982becb15 kubens: Start implementing stubs
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
342d21683b Create test utils for crafting kubeconfig strings
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
62d8dad7d5 extract kubeconfig test utils to a type
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
68b842f39b do not fail on non-existing kubeconfig files
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
0e50f15393 Better success msgs, handle -d without args
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
f4f558004a Tidy up colors, help msgs, TODOs
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
7598c4d4dd Create printer pkg, fix color force enable/disable
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
bef0a4cca7 Move kubeconfig utility to a shared pkg
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:56 -07:00
Ahmet Alp Balkan
d5546f062d Extend test coverage
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
bf5b715798 Fix UnsupportedOp tests through custom comparer
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
a01db6ecde Re-introduce DEBUG env var stack traces
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
280fcec765 Update tests for homeDir and kubeconfigPath()
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
c82e299daa Unify errors from kubeconfig.Parse
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
5aaccdf801 Extract env vars to a file + test
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
936964dde5 Support for fzf, color ignore/force knobs
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
1f4eed962a Move all yaml logic to pkg/kubeconfig
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
492e3e7053 Move ctx-related YAML parse methods to pkg
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
7013899503 Use kubeconfig pkg for parsing utils
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
7f3e441ff2 kubeconfig pkg for loading/parsing
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
bb95141fc5 add printSuccess, pass writers to print funcs
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
28051b1fd7 define Run(stdout,stderr) method on **Ops
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
5b3796ba1c add some TODOs
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
1284b822a5 Fix bugs for test pass, update tests
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
cb103701ac Add support for renaming contexts
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
5eabeab47e Support for -d (deleting contexts)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
c5f17b83e7 Add support for -u/--unset
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
94e8d3b4c7 Add support for -c/--current
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:55 -07:00
Ahmet Alp Balkan
ff6326c122 Integrate ctx swap, check for wrong ctx names
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:54 -07:00
Ahmet Alp Balkan
8aaefb8a94 Save last context name in state file
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-04-29 12:52:54 -07:00