Conversation
|
I knew about the XDG spec when I made the decision to put the config file there. I put it there to match what kubectl does. If recent versions of kubectl have started supporting the XDG spec, then maybe this change makes sense. But has kubectl changed where it stores the config? A lot of tools like gcloud and k3d write the clusters' config files in |
|
I guess there are two opinions I have:
Let's ignore 1. for the present.
That's fine. These tools are generating config for kubectl to use. Kubie's job is to choose between these configs, but Kubie has its own config, the Apart from this file, the config files in Now if you add 1. to this position, you get: Kubie should store its config in the directory I don't think it follows from the fact that other tools in the Kubernetes ecosystem don't follow the XDG spec for their config, can Kubie must not either. I currently use AWS EKS, and through the setting of some environment variables for LMK what you think, I would like to get Kubie to work with this setup, open to hearing other ideas on how to do so too. |
The XDG base directory specification is a popular way to store config files that doesn't clutter a user's home directory with dotfiles.
This tool stores its configuration in
~/.kube/kubie.yaml, however, I think it should follow the spec and store it in a location that is not shared by other tools.Fortunately, the
dirscrate has native support for the XDG base directory spec, so we can use it to handle resolving the environment variables and falling back to the defaults in the spec.What this means is that the new default location for this tool's settings from this PR onwards is
~/.config/kubie/config.yaml. If the old config file exists, it will prefer that. Otherwise, it will create the parent directories for the XDG based config file.