I thought we had an issue for this but couldn't find it.
Currently, the Velero CLI uses the velero namespace in the current context, unless otherwise specified. This means that if you are operating under a namespace other than velero, you have to specify the namespace with every single command.
As it is common with other tools, invert things and make it so Velero recognizes and uses the active namespace, unless otherwise specified.
Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.
You can use velero client config set namespace <namespace>, but this doesn't tie it to a Kubeconfig context currently.
We could perhaps expand the config to take a context -> namespace mapping.
Hello all,
I think I am interested in taking this issue on if no one is working on it?
It's yours! Thank you. Just make sure that users can override that with the existing global flag --namespace.
I just want to make sure that I am doing the right thing here because I am wondering if this is breaking change.
This means that unless otherwise specified we will use the context name, and will never use the velero namespace by default or the namespace defined in VELERO_NAMESPACE env var?
Ok, great question. This is what I think the order of precedence should be:
I'd like to get a sanity check from @nrb.
Yep, I agree with @carlisia!
So if I don't do anything my active namespace is "default", right?
If I then do "velero install" without specifying a namespace, where will it go? "default" or "velero"?
Afterwards, if I don't set an active namespace, how will this work? If I'm doing something in another namespace and then want to do a backup using Velero, I have to either switch namespaces or specify the velero namespace on the command line?
This doesn't sound right. My active namespace is where I want my kubectl commands to go to. The velero CLI is a different app, it shouldn't be going to the same place my kubectl commands go, because I'm not using kubectl, in all likelihood I'm working on a namespace that doesn't have anything to do with Velero and then I want to back something up.
Am I missing something here?
I have often found that for velero backup / velero restore commands, I wish it understood my context.
The velero install is an interesting case, though.
I wonder if we should talk through this in a community meeting?
I put this on the Agenda for Feb 9, if that date doesn't work, please modify the agenda and put it when it's convenient, thanks!
I will link this to our multitenancy epic, as there are assumptions for that tied up in this issue.
@shawn-hurley You're assigned to this, any movement?
I thought that the goal was to wait to fix this or at least track this as a piece of the multitenancy work?
If there is a path forward that has been determined that I missed, then I can complete it.
Sorry if I have been behind on this discussion.
Most helpful comment
I put this on the Agenda for Feb 9, if that date doesn't work, please modify the agenda and put it when it's convenient, thanks!