Closed joshuaspence closed 4 years ago
Hi @joshuaspence,
Excellent question and perhaps an update to the README is in-order.
This repo essentially represents most of the files in the home assistant config
directory. I leverage the vscode-server (running as a sidecar in the home-assistant pod) to easily access and modify the files running 'live' in the home-assistant pod. Even though the data is persisted to rook-based storage for the home-assistant kubernetes configuration, I also like having most of the configuration also saved & versioned to github for sharing purposes.
Here is an example of what the vscode config web interface looks like when running alongside home-assistant:
The .gitignore
config is very restrictive in that by defaults all files are ignored and only certain files are permitted (mostly all of the yaml
files. You will also note that the secrets.yaml
is specifically ignored as obviously we don't want to save that to git.
*
!*.yaml
!*.py
!*.png
!*.md
!automation
!config
!scripts
!shell
!images
!tensorflow
!cameras
!**/*/*.yaml
!.gitignore
secrets.yaml
known_devices.yaml
entity_registry.yaml
!.storage
!.storage/lovelace
Thanks for your response. I was wondering if you bootstrap the process at all? Or if you decided to bring up a new Kubernetes cluster, I guess you would just restore backups of your persistent storage?
@joshuaspence In the case of a fresh deployment of home-assistant, I see a couple of approaches to boot-strap a git-backed configuration:
git init
the config directory, taking take to exclude sensitive data with the .gitignore
fileconfigurator
sidecar or the vcsode
sidecar and do the git initialize/setup the same as above.In my case, I was using home-assistant with a git-backed configuration before adopting kubernetes and the helm chart, so I had to 'copy' the configuration data from the host to the pod (via kubectl cp
)
Thanks for the info :+1:
I was just wondering how you are using this repo? I had assumed that it would be pulled into https://github.com/billimek/k8s-gitops by setting
git.repo
on the Helm chart, but I can't see this repo mentioned ink8s-gitops
at all? Awesome repositories by the way!