What’s the best/proper way to unset a snap config?
I’ve been telling people to do it by setting to null, e.g. snap set kube-apiserver runtime-config=null, since that worked for me in the past. I haven’t seen any documentation around it though. Is that the right way to do it?
There is currently no way to remove configuration values, that’s clearly an omission on our side and we will fix it. You can set it to null or empty string, but you cannot get rid of the value.
Resurrecting the old topic, just to give quick update on this; adding an ability to unset snap config is currently on our roadmap and per discussion from last sprint, we’re going to add two ways for unsetting:
snap unset (e.g. snap unset core http.proxy)
snap set k=v k! (k! will unset key, e.g. snap set core proxy.http=foo proxy.https!)
The second syntax will allow setting and unsetting configuration keys in one go, as part of same transaction.
Not yet, while the CLI aspects are settled, there are some other aspects that we realized and @pedronis will soon write about them here on the forum to gather feedback.