home-assistant - make sure init config have access to update db url (#2112)

This commit is contained in:
Stavros Kois
2024-02-01 10:19:56 +02:00
committed by GitHub
parent 5b045a5088
commit 884dc057eb
3 changed files with 8 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ description: Home Assistant is an open source home automation that puts local co
annotations:
title: Home Assistant
type: application
version: 2.0.3
version: 2.0.4
apiVersion: v2
appVersion: 2024.1.5
kubeVersion: '>=1.16.0-0'

View File

@@ -71,6 +71,8 @@ secret:
#!/bin/sh
config="/config/configuration.yaml"
default="/default/init"
// Attemp to get read/write access
chmod +rw "$config" || echo "Failed to set permissions on [$config]"
if [ ! -f "$config" ]; then
echo "File [$config] does NOT exist. Creating..."
cp "$default/configuration.default" "$config"

View File

@@ -60,6 +60,11 @@ workload:
runAsGroup: 0
runAsNonRoot: false
readOnlyRootFilesystem: false
capabilities:
add:
- CHOWN
- DAC_OVERRIDE
- FOWNER
command: /default/init/script.sh
{{- include "ix.v1.common.app.postgresWait" (dict "name" "postgres-wait"
"secretName" "postgres-creds") | nindent 8 }}