Comments (10)
@corneliusweig See #39 :)
from konfig.
i also tried without .yaml and removed "--".
konfig import kubeconfig-xxx-xxx-xxx-xxx
error: unrecognized flag "kubeconfig-xxx-xxx-xxx-xxx"
konfig import kubeconfig-xxx-xxx-xxx-xxx --save
error: unrecognized flag "kubeconfig-xxx-xxx-xxx-xxx"
from konfig.
Hm, I tried to repro your problem, but for me it worked fine. Can you please export DEBUG=1
in your shell, run the command again, and paste the output here?
from konfig.
thanks a lot for having a lot of patience.
konfig import kubeconfig--test-dsc5.yaml 127 ↵
+ set -eou pipefail
+ IFS=':
'
+ TMPFILES=()
+ declare -a TMPFILES
+ trap cleanup EXIT
+ main import kubeconfig--test-dsc5.yaml
+ hash kubectl
+ KUBECTL=kubectl
+ [[ 2 -eq 0 ]]
+ case "$1" in
+ import_ctx kubeconfig--test-dsc5.yaml
+ [[ kubeconfig--test-dsc5.yaml =~ -(.*) ]]
+ error 'unrecognized flag "kubeconfig--test-dsc5.yaml"'
+ echo 'error: unrecognized flag "kubeconfig--test-dsc5.yaml"'
error: unrecognized flag "kubeconfig--test-dsc5.yaml"
+ exit 1
+ cleanup
+ [[ 0 -gt 0 ]]
konfig import kubeconfig--test-dsc5 --save 1 ↵
+ set -eou pipefail
+ IFS=':
'
+ TMPFILES=()
+ declare -a TMPFILES
+ trap cleanup EXIT
+ main import kubeconfig--test-dsc5 --save
+ hash kubectl
+ KUBECTL=kubectl
+ [[ 3 -eq 0 ]]
+ case "$1" in
+ import_ctx kubeconfig--test-dsc5 --save
+ [[ kubeconfig--test-dsc5 =~ -(.*) ]]
+ error 'unrecognized flag "kubeconfig--test-dsc5"'
+ echo 'error: unrecognized flag "kubeconfig--test-dsc5"'
error: unrecognized flag "kubeconfig--test-dsc5"
+ exit 1
+ cleanup
+ [[ 0 -gt 0 ]]
from konfig.
I would guess that Line 74 is breaking execution.
I think If you remove "$1" =~ ^-(.*)
it should work. Hopefully this helps, I am not that good with bash scripting.
from konfig.
What's strange is that your output says [[ kubeconfig--test-dsc5 =~ -(.*) ]]
, however the pattern in l.74 says [[ "$1" =~ ^-(.*) ]]
. So the debug output shows matching against -(.*)
but the code wants ^-(.*)
.
I don't know why the ^
gets lost. Can you tell me about your OS and bash version? However since I can't reproduce the problem I have to defer bug hunting to you.
from konfig.
After updating to v0.2.6 it worked.
konfig import kubeconfig--test-dsc5.yaml I540484@sTb31337
+ set -eEuo pipefail
+ TMPFILES=()
+ declare -a TMPFILES
+ trap cleanup EXIT
+ main import kubeconfig--test-dsc5.yaml
+ hash kubectl
+ KUBECTL=kubectl
+ [[ 2 -eq 0 ]]
+ case "$1" in
+ import_ctx kubeconfig--test-dsc5.yaml
+ tmpcfgs=()
+ declare -a tmpcfgs
+ local tmpcfg
+ local tmpinputcfg=
+ local out=
+ local arg=
++ mktemp konfig_XXXXXX
+ tmpcfg=konfig_sEV23k
+ TMPFILES+=("$tmpcfg")
+ tmpcfgs+=("$tmpcfg")
+ for OPT in "$@"
+ case $OPT in
+ kubectl config view --raw
+ [[ -z '' ]]
+ merge '' konfig_sEV23k kubeconfig--test-dsc5.yaml
+ [[ '' =~ ^-.+ ]]
+ IFS=':
'
+ [[ '' == \-\p ]]
+ [[ '' == \-\-\p\r\e\s\e\r\v\e\-\s\t\r\u\c\t\u\r\e ]]
+ KUBECONFIG=:konfig_sEV23k:kubeconfig--test-dsc5.yaml
+ kubectl config view --flatten --merge
apiVersion: v1
clusters:
- cluster:
...
- name: user-read-only
user: {}
+ IFS='
'
+ cleanup
+ [[ 1 -gt 0 ]]
+ rm -- konfig_sEV23k
I guess I had an old version of crew installed.
You may close the issue. Thanks a lot.
from konfig.
I know the issue. I just had to reinstall my OS and performed the install command of the Readme.MD.
Within this setup instructions and old version V0.2.0 is mentioned. It would be helpful to keep the setup instructions of readme.md up to date or switch to an dynamic approach.
Kind regards
from konfig.
It would be helpful to keep the setup instructions of readme.md up to date or switch to an dynamic approach.
That sounds like a documentation bug. Can you tell me what exactly confused you? You can also send a PR :)
from konfig.
I will send an PR :) Thanks again for this great tool and your support :)
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
- 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
- import command fails when filename contains '-' HOT 4
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.