A simple wrapper to adopt Navidrome to Kubernetes using tanka-compose.
First you need to clone this repository and cd
to it:
git clone https://github.com/dxlr8r/kubedrome.git
cd kubedrome
Then setup the config file, config.jsonnet
, additional navidrome configuration goes into navidrome.toml
.
Then provision the chart, to the current kubectl context, using tk
:
tk apply chart --tla-str context=$(kubectl config current-context) --tla-code config='import "config.jsonnet"'
For Navidrome you might want to make sure that the PV isn't deleted if you uninstall kubedrome
. The default setting is set by your StorageClass, and cannot be defined with the pv claim (pvc). Therefore this need to be done manually unless this already is the default.
Change PV to retain:
navidrome=$(tk eval chart --tla-str context=$(kubectl config current-context) --tla-code config='import "config.jsonnet"' -e 'data.config' | jq -r '{name: .name, namespace: .namespace} | @json') && \
kubectl get pv -o json | jq --argjson navidrome "$navidrome" '.items[] | select(.spec.claimRef.name == $navidrome.name and .spec.claimRef.namespace == $navidrome.namespace) | .spec.persistentVolumeReclaimPolicy = "Retain"' | kubectl apply -f -
To get the newest version, simply use git git pull
and update using tk apply ...
as shown above in the installation.