Commit Graph

62 Commits

Author SHA1 Message Date
Antoine
0bcd0d5dd5
fix some ci enhancement (#435)
* fix(release): customize goreleaser config file, by adding json schema and fixing configuration version

* fix(go): rename invalid comment format

* fix(ci): made release workflow work again

replace goreleaser --rm-dist flag by --clean
increment go version for release pipeline
fetch previous tags use by goreleaser
give release workflow content write permissions to publish release
2025-01-07 12:25:01 -08:00
Suleiman Dibirov
b5daf2cef7
feat(kubens): added force flag to switch namespaces even if it doesn'… (#416)
* feat(kubens): added force flag to switch namespaces even if it doesn't exist

* Merged lines

* fixed README.md and flags.go

* updated flags.go, flags_test.go
2024-07-09 21:38:40 -07:00
pullmerge
4997a261dc
Fix some comments (#418) 2024-04-15 09:31:07 -07:00
Yankee
58a5c4693e
Add interactive delete op (#304) 2021-07-07 11:48:32 -07:00
Ahmet Alp Balkan
34e9024835
add -V/--version flag to go implementations (#295)
Uses goreleaser to pass ldflags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2021-04-09 09:43:48 -07:00
Andrey Viktorov
9b4aea3b59
Bump up go-client to fix auth plugin panic (#281) 2021-02-02 15:38:27 -08:00
Jeff MAURY
767218a9a6
Check correct variable after current namespace retrieval (#287) 2021-01-31 17:48:35 -08:00
Ahmet Alp Balkan
1e49c336fc
Add license headers for 2021
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-12-29 13:38:42 -08:00
Jason Harmon
8c323c5653
Fix color in kubens success message when using fzf (#228) 2020-11-16 09:01:28 -08:00
Sedat Gökcen
1db00a20d9
Structural refactoring for multiple kubeconfig support (#219) 2020-06-02 13:04:13 -07:00
Ahmet Alp Balkan
170233bffd
query namespace exists with GET Namespace (#236)
More efficient ns switches with kubens by querying only the namespace (instead
of listing all namespaces).

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-05-31 15:32:44 -07:00
Ahmet Alp Balkan
0141ee19d2
handle ctxs with ':' in the name for windows (#235)
For windows, if the ctx name for kubens state file
contains a colon ':' (EKS), we replace it with __ (both while reading/writing).

It doesn't break existing users (as it didn't work in the first place).

Other characters remain unhandled, hoping it won't happen again.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-05-31 14:24:01 -07:00
Jason Harmon
401188fefd
Fix color output on Windows (#220) 2020-05-15 15:26:00 -07:00
Ahmet Alp Balkan
956d5953c2
kubens: fix interactive switch messages
Fixes #209.

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
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
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
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
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