**Description** Part 1 of the migration to new common on the stable train. This basically breaks most/all charts requiring a reinstall on SCALE as well. Helm users shouldn't need a reinstall but could migrate their values.yaml modification manually besides backing-up and porting the databases. There be Dragons basically, as we obviously cannot 100% go over each-and-every single app in the stable train like we did in the enterprise train. **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [x] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Via CI and manually validation in a lot of cases where the CI did not correctly check things. Additional catalog item creation tooling for local testing has been added as well. **📃 Notes:** There will be issues in the future but we should get as much working well as we can. **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [x] #️⃣ I have commented my code, particularly in hard-to-understand areas - [x] 📄 I have made corresponding changes to the documentation - [x] ⚠️ My changes generate no new warnings - [x] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._
153 lines
4.5 KiB
YAML
153 lines
4.5 KiB
YAML
image:
|
|
repository: tccr.io/truecharts/home-assistant
|
|
pullPolicy: IfNotPresent
|
|
tag: 2023.2.5@sha256:551ee82347af025e02a7fc27e526d0c4f05e8b29e7bbe948edc6bc12d306fb5f
|
|
service:
|
|
main:
|
|
ports:
|
|
main:
|
|
port: 8123
|
|
targetPort: 8123
|
|
workload:
|
|
main:
|
|
podSpec:
|
|
initContainers:
|
|
init:
|
|
type: init
|
|
enabled: true
|
|
imageSelector: image
|
|
command: ["/config/init/init.sh"]
|
|
|
|
# # Enable devices to be discoverable
|
|
# hostNetwork: true
|
|
|
|
# # When hostNetwork is true set dnsPolicy to ClusterFirstWithHostNet
|
|
# dnsPolicy: ClusterFirstWithHostNet
|
|
homeassistant:
|
|
trusted_proxies: []
|
|
# Enable a prometheus-operator servicemonitor
|
|
prometheus:
|
|
serviceMonitor:
|
|
enabled: false
|
|
# interval: 1m
|
|
# additionalLabels: {}
|
|
persistence:
|
|
config:
|
|
enabled: true
|
|
mountPath: /config
|
|
targetSelectAll: true
|
|
init:
|
|
enabled: true
|
|
type: configmap
|
|
objectName: init
|
|
mountPath: "/config/init"
|
|
defaultMode: "0777"
|
|
readOnly: true
|
|
targetSelector:
|
|
main:
|
|
init: {}
|
|
|
|
configmap:
|
|
init:
|
|
enabled: true
|
|
data:
|
|
init.sh: |-
|
|
#!/bin/sh
|
|
if test -f "/config/configuration.yaml"; then
|
|
echo "configuration.yaml exists."
|
|
if grep -q recorder: "/config/configuration.yaml"; then
|
|
echo "configuration.yaml already contains recorder"
|
|
else
|
|
cat /config/init/recorder.default >> /config/configuration.yaml
|
|
fi
|
|
if grep -q http: "/config/configuration.yaml"; then
|
|
echo "configuration.yaml already contains http section"
|
|
else
|
|
cat /config/init/http.default >> /config/configuration.yaml
|
|
fi
|
|
else
|
|
echo "configuration.yaml does NOT exist."
|
|
cp /config/init/configuration.yaml.default /config/configuration.yaml
|
|
cat /config/init/recorder.default >> /config/configuration.yaml
|
|
cat /config/init/http.default >> /config/configuration.yaml
|
|
fi
|
|
|
|
echo "Creating include files..."
|
|
for include_file in groups.yaml automations.yaml scripts.yaml scenes.yaml; do
|
|
if test -f "/config/$include_file"; then
|
|
echo "$include_file exists."
|
|
else
|
|
echo "$include_file does NOT exist."
|
|
touch "/config/$include_file"
|
|
fi
|
|
done
|
|
|
|
cd "/config" || echo "Could not change path to /config"
|
|
echo "Creating custom_components directory..."
|
|
mkdir "/config/custom_components" || echo "custom_components directory already exists"
|
|
|
|
echo "Changing to the custom_components directory..."
|
|
cd "/config/custom_components" || echo "Could not change path to /config/custom_components"
|
|
|
|
echo "Downloading HACS"
|
|
wget "https://github.com/hacs/integration/releases/latest/download/hacs.zip" || exit 0
|
|
|
|
if [ -d "/config/custom_components/hacs" ]; then
|
|
echo "HACS directory already exist, cleaning up..."
|
|
rm -R "/config/custom_components/hacs"
|
|
fi
|
|
|
|
echo "Creating HACS directory..."
|
|
mkdir "/config/custom_components/hacs"
|
|
|
|
echo "Unpacking HACS..."
|
|
unzip "/config/custom_components/hacs.zip" -d "/config/custom_components/hacs" >/dev/null 2>&1
|
|
|
|
echo "Removing HACS zip file..."
|
|
rm "/config/custom_components/hacs.zip"
|
|
echo "Installation complete."
|
|
configuration.yaml.default: |-
|
|
# Configure a default setup of Home Assistant (frontend, api, etc)
|
|
default_config:
|
|
|
|
# Text to speech
|
|
tts:
|
|
- platform: google_translate
|
|
|
|
group: !include groups.yaml
|
|
automation: !include automations.yaml
|
|
script: !include scripts.yaml
|
|
scene: !include scenes.yaml
|
|
recorder.default: |-
|
|
recorder:
|
|
purge_keep_days: 30
|
|
commit_interval: 3
|
|
db_url: {{ ( printf "%s?client_encoding=utf8" ( .Values.cnpg.main.creds.std | trimAll "\"" ) ) | quote }}
|
|
http.default: |-
|
|
http:
|
|
use_x_forwarded_for: true
|
|
trusted_proxies:
|
|
{{- if hasKey .Values "ixChartContext" }}
|
|
- {{ .Values.ixChartContext.kubernetes_config.cluster_cidr }}
|
|
{{- else }}
|
|
{{- range .Values.homeassistant.trusted_proxies }}
|
|
- {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
cnpg:
|
|
main:
|
|
enabled: true
|
|
user: home-assistant
|
|
database: home-assistant
|
|
|
|
portal:
|
|
open:
|
|
enabled: true
|
|
|
|
securityContext:
|
|
container:
|
|
readOnlyRootFilesystem: false
|
|
runAsNonRoot: false
|
|
runAsUser: 0
|
|
runAsGroup: 0
|