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

timoni --namespace doesn't respect the default ns set in kubeconfig context #39

Closed
r0bnet opened this issue Mar 31, 2023 · 3 comments · Fixed by #40
Closed

timoni --namespace doesn't respect the default ns set in kubeconfig context #39

r0bnet opened this issue Mar 31, 2023 · 3 comments · Fixed by #40
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@r0bnet
Copy link

r0bnet commented Mar 31, 2023

Hey,

I have an issue with the timoni list command. It should show me all the installed instances in the current namespace but the list is empty except when I explicitly use the -A or -n test flag.

Steps to reproduce

kubectl create namespace test
kubectl config set-context --current --namespace=test
timoni -n test apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo --version latest
timoni list

Expected output

NAME   	MODULE                                    	VERSION	LAST APPLIED         
podinfo	oci://ghcr.io/stefanprodan/modules/podinfo	6.3.4  	2023-03-31T13:37:18Z

Actual output

NAME	MODULE	VERSION	LAST APPLIED

Additional info
Using the -n test flag explicitly or the -A flag works but I thought it should also work without it when I'm on the right namespace already. Is that the intended behavior or a bug?

@stefanprodan
Copy link
Owner

stefanprodan commented Mar 31, 2023

This is the intended behaviour, as the --namespace flag is decoupled from the context. But I realise it may not be the best thing, following the kubectl behaviour would be better. This is not specific to list all commands behave the same, can you confirm that this is the case for inspect and others please?

@r0bnet
Copy link
Author

r0bnet commented Mar 31, 2023

I tested with delete and it's the same behavior. It's nothing overly dramatic but I'm used to switch the namespace quite often with kubens so I noticed this thing quite early ;)

@stefanprodan
Copy link
Owner

I agree that Timoni should respect the context, ty for reporting.

@stefanprodan stefanprodan added bug Something isn't working help wanted Extra attention is needed labels Mar 31, 2023
@stefanprodan stefanprodan changed the title timoni ls / list doesn't show instances when not explicitly specifying a namespace or all namespaces timoni --namespace doesn't respect the default namespace set in kubeconfig context Mar 31, 2023
@stefanprodan stefanprodan changed the title timoni --namespace doesn't respect the default namespace set in kubeconfig context timoni --namespace doesn't respect the default ns set in kubeconfig context Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants