Comments (4)
Hey @dhrp, thanks for reporting this! I fixed the bug with the hyphens in filenames, but I cannot reproduce your second issue (the one you added lateron). Can you please run as
DEBUG=yes kubectl konfig ...
This will show what commands are actually run and may give a clue as to what is going on.
Glad you like the tool :)
PS: you can hot-patch your installation with
sed -i '89celif [[ "${1}" =~ ^-(.*) ]]; then' `which kubectl-konfig`
I would like to resolve your issue completely before publishing a new release.
from konfig.
Thanks for the quick response..
Unfortunately, it seems this does not resolve the issue, and I've now actually spend more time than I would have thought to have needed digging into the situation. Turns out that I have bash 3.2, which is the default on Mac OS (still).
And it doesn't play nice with passing arrays as arguments to functions. More specifically, because you set the IFS to not contain space, the arrays will be passed as a single word, not an array. Notice the quotes around error: unrecognized flag "-s ingresscluster.yaml"
Now, I thought I could send you a patch or PR, but I don't quite understand why you change the IFS in the first place, though removing it does make the tests fail.
Oatcake:.kube thatcher$ DEBUG=yes kubectl konfig import -s ingresscluster
+ set -eou pipefail
+ IFS=':
'
+ TMPFILES=()
+ declare -a TMPFILES
+ trap cleanup EXIT
+ main import -s ingresscluster
+ hash kubectl
+ KUBECTL=kubectl
+ [[ 3 -eq 0 ]]
+ case "$1" in
+ import_ctx '-s ingresscluster'
+ local tmpcfg
+ local out=
+ [[ -s ingresscluster = \-\-\s\a\v\e ]]
+ [[ -s ingresscluster = \-\s ]]
+ [[ -s ingresscluster =~ -(.*) ]]
+ error 'unrecognized flag "-s ingresscluster"'
+ echo 'error: unrecognized flag "-s ingresscluster"'
error: unrecognized flag "-s ingresscluster"
+ exit 1
+ cleanup
+ [[ 0 -gt 0 ]]
from konfig.
Hey @dhrp, thanks for investing so much into the analysis here! I use IFS
to expand the list of kubeconfigs to konfig1:konfig2:konfig3
such that I can set the env var KUBECONFIG=konfig1:konfig2:...
.
I'll have to see if I can find another way to achieve the same goal.
I'm so sorry that this has cost you more time than it will probably save you :( But I'm extremely grateful that you have reported this and helped in finding a solution.
PS: After you applied the hot-patch you will probably have problems with krew
. When you are done with debugging konfig
and want to continue using krew
, please do rm -i $(which kubectl-konfig)
and at your convenience you can re-install konfig
via krew
. I only found out about this glitch after I left the previous comment.
from konfig.
@dhrp Thanks to your help I could reproduce the issue and found a fix (#9). I'll publish the fixed version asap, so that it will be available in krew
.
from konfig.
Related Issues (20)
- Fix extract subcommand name in the doc HOT 2
- split fails: error: write /dev/stdout: permission denied HOT 7
- Feature Request - Add option to remove configs too HOT 2
- Use github tarball for krew installations
- Not compatible with Windows error HOT 11
- Drop windows support for krew HOT 1
- slight delay in webrtc apps like discord
- error when importing new file HOT 1
- File content should not be expanded during import
- Importing a config from a file without permission causes loss of ~/.kube/config content HOT 1
- Solve merge conflicts on duplicate data HOT 1
- Error importing kubeconfig files with "--" in its name HOT 10
- can't import konfig anymore HOT 2
- How to install on Windows HOT 1
- How to customize agnoster theme
- Plugin installed with krew gets a permission denied error to write to /dev/stdout HOT 3
- "error: write /dev/stdout: permission denied" While copying the output yaml file into new file
- import does nothing when existing context exists, and says nothing
- Macos Monterey support (12.5.1 21G83) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from konfig.