Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GOSS_KUBECTL_OPTS not working with some kubectl args #799

Open
HabibMAALEM opened this issue Feb 9, 2023 · 1 comment
Open

GOSS_KUBECTL_OPTS not working with some kubectl args #799

HabibMAALEM opened this issue Feb 9, 2023 · 1 comment
Labels
bug community maintained These issues are not maintained by the goss maintainers. Community contributions are always welcome. help wanted

Comments

@HabibMAALEM
Copy link

HabibMAALEM commented Feb 9, 2023

Describe the bug
When using kgoss run, i can't override kubectl run command with some extra args like --overrides in $GOSS_KUBECTL_OPTS, its work for starting the pod but not recognized with kubectl wait and kubectl delete

How To Reproduce

$ export GOSS_KUBECTL_OPTS=--namespace=default --overrides={"apiVersion":"v1","spec":{"imagePullSecrets":[{"name":"secret"}]}}
$ kgoss run -i "nginx"

Expected Behavior
Running tests on kubernetes

Actual Behavior

[INFO]: Parsing command line
[INFO]: using image: nginx
[INFO]: going to execute (may be blank): --
[INFO]: Preparing files to copy into container
[INFO]: Creating Kubernetes pod/container to test
++ /usr/local/bin/kubectl run --namespace=default '--overrides={"apiVersion":"v1","spec":{"imagePullSecrets":[{"name":"secret"}]}}' kgoss-tester-1895 --image-pull-policy=Always --restart=Never --labels=app=kgoss-test '--output=jsonpath={.metadata.name}' --image=nginx --

+ id=kgoss-tester-1895
+ set +x
[INFO]: Waiting for container to be ready
error: unknown flag: --overrides
See 'kubectl wait --help' for usage.
[INFO]: Deleting pod/container
error: unknown flag: --overrides
See 'kubectl delete --help' for usage.

Environment:

  • Version of goss: v0.3.21
  • OS/Distribution version (if applicable): linux/ubuntu
@HabibMAALEM HabibMAALEM added the bug label Feb 9, 2023
@aelsabbahy
Copy link
Member

Thanks for reporting this.

Feel free to submit a PR fixing this. Everything outside of dgoss wrapper has been community maintained.

@aelsabbahy aelsabbahy added help wanted community maintained These issues are not maintained by the goss maintainers. Community contributions are always welcome. labels Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug community maintained These issues are not maintained by the goss maintainers. Community contributions are always welcome. help wanted
Projects
None yet
Development

No branches or pull requests

2 participants