whereabouts
whereabouts copied to clipboard
Create Whereabouts config flatfile by default
The install_cni.sh script already creates a .kubeconfig file and places it in /etc/cni/net.d/whereabouts.d/
So why not just go ahead and create the default whereabouts.conf that refers to this as well?
{ "datastore": "kubernetes", "kubernetes": { "kubeconfig": "/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig" }, "log_file": "/tmp/whereabouts.log", "log_level": "debug" }
As the documentation states:
Whereabouts will look for the configuration in these locations, in this order:
- The location specified by the configuration_path option. - /etc/kubernetes/cni/net.d/whereabouts.d/whereabouts.conf - /etc/cni/net.d/whereabouts.d/whereabouts.conf
If that's the case, this default whereabouts.conf file can already be overridden by the first two options. Or, this file has to be manually created by the user. If they're going to do that anyways they can just edit this JSON file or replace it themselves. I don't see any downside in including this, and it will just make standard Kubernetes datastore deployments that much easier.
FYI I did this in a private local branch myself, rebuilt the whereabouts Docker image, and am using that. I then changed the deployment manifest to use my container image instead, when I deployed all my nodes had this file by default. Simplified it a ton/saved me time, as otherwise I would've had to scp this file over to each box.
@xagent003 -- this is a superb idea. I love it.
Do you mind making a PR with your changes? Otherwise, I'll try to get in the upcoming few weeks.
@dougbtv I already submitted one here https://github.com/dougbtv/whereabouts/pull/58