2022-07-27 18:21:09 +00:00
.PHONY : default all ui -minimalist config sensors automations lights
2022-07-23 09:14:56 +00:00
NAMESPACE := home-assistant
POD_ID := $( shell kubectl -n home-assistant get pod --selector= app.kubernetes.io/name= home-assistant --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}" )
2022-07-23 09:45:51 +00:00
CONFIG_FILES := configuration.yaml secrets.yaml input_boolean.yaml ui-lovelace.yaml
2022-07-23 09:14:56 +00:00
default : all
2022-07-27 18:21:09 +00:00
all : ui -minimalist config sensors automations lights
2022-07-23 09:14:56 +00:00
config :
for FILE in $( CONFIG_FILES) ; do \
kubectl cp $$ FILE $( NAMESPACE) /$( POD_ID) :/config; \
done
ui-minimalist :
kubectl cp ui_lovelace_minimalist $( NAMESPACE) /$( POD_ID) :/config; \
sensors :
kubectl cp sensors $( NAMESPACE) /$( POD_ID) :/config
2022-07-24 09:29:01 +00:00
automations :
kubectl cp automations $( NAMESPACE) /$( POD_ID) :/config
2022-07-27 18:21:09 +00:00
lights :
kubectl cp lights $( NAMESPACE) /$( POD_ID) :/config