Move home-assistant to ix-dev (#1048)

* move home-assistant to ix-dev

* update lock

* switch to lookup

* indent lists
This commit is contained in:
Stavros Kois
2023-03-21 19:58:25 +02:00
committed by GitHub
parent 9c41bd23ad
commit d3f0e5f72f
27 changed files with 92 additions and 51 deletions

View File

@@ -1,6 +0,0 @@
dependencies:
- name: common
repository: file://../../../library/common/2207.0.0
version: 2207.0.0
digest: sha256:f17f3d458ca0210a52e39da0dce35034e900b36f2040d4b19bed46a7aae91506
generated: "2022-07-25T00:20:48.151643214+05:00"

View File

@@ -1,15 +0,0 @@
apiVersion: v2
appVersion: 2023.3.5
dependencies:
- name: common
repository: file://../../../library/common/2207.0.0
version: 2207.0.0
description: home-assistant App for TrueNAS SCALE
home: https://github.com/home-assistant/home-assistant
icon: https://avatars.githubusercontent.com/u/13844975?s=200&v=4
keywords:
- home-automation
name: home-assistant
sources:
- https://github.com/home-assistant/home-assistant
version: 1.0.71

View File

@@ -1,21 +0,0 @@
{{- $serviceName := (include "common.names.fullname" .) -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ .Release.Name }}-test-pod
labels:
app: {{ .Release.Name }}
release: {{ .Release.Name }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: test-curl
image: alpine/curl
imagePullPolicy: "IfNotPresent"
command:
- /bin/sh
- -ec
- |
curl --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 15 --retry-max-time 90 --retry-all-errors -ksf http://{{ $serviceName }}:{{.Values.web_port}}/
restartPolicy: Never

View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: file://../../../common/2207.0.0
version: 2207.0.0
digest: sha256:a301ba0f99ec1e08a60a7f0a0320aa02d225993572f2f056f09520f06df88b37
generated: "2023-03-21T17:14:27.525375555Z"

View File

@@ -0,0 +1,23 @@
name: home-assistant
description: Home Assistant App for TrueNAS SCALE
annotations:
title: Home Assistant
type: application
version: 1.0.72
apiVersion: v2
appVersion: '2023.3.5'
kubeVersion: '>=1.16.0-0'
maintainers:
- name: truenas
url: https://www.truenas.com/
dependencies:
- name: common
repository: file://../../../common/2207.0.0
version: 2207.0.0
home: https://github.com/home-assistant/home-assistant
icon: https://avatars.githubusercontent.com/u/13844975?s=200&v=4
sources:
- https://github.com/home-assistant/home-assistant
- https://github.com/truenas/charts/tree/master/library/ix-dev/charts/home-assistant
keywords:
- home-automation

View File

@@ -11,10 +11,6 @@ emptyDirVolumes: true
environmentVariables: []
extraAppVolumeMounts: []
hostNetwork: false
image:
pullPolicy: IfNotPresent
repository: homeassistant/home-assistant
tag: 2023.3.5
ixChartContext: {}
ownerGID: 568
ownerUID: 568

View File

@@ -62,10 +62,36 @@ spec:
- name: extrappvolume-{{ $index }}
mountPath: {{ $hostPathConfiguration.mountPath }}
{{ end }}
ports:
- name: web
containerPort: 8123
readinessProbe:
httpGet:
path: /
port: 8123
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 2
livenessProbe:
httpGet:
path: /
port: 8123
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
startupProbe:
httpGet:
path: /
port: 8123
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 60
successThreshold: 1
env:
{{ $databaseName := (include "postgres.DatabaseName" .)}}
{{ $envList := (default list .Values.environmentVariables) }}

View File

@@ -15,10 +15,42 @@ spec: {{ include "common.deployment.common_spec" $values | nindent 2 }}
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_USER" "valueFromSecret" true "secretName" "db-details" "secretKey" "db-user")}}
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_PASSWORD" "valueFromSecret" true "secretName" "db-details" "secretKey" "db-password")}}
{{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
volumeMounts: {{ include "postgres.volumeMountsConfiguration" $values | nindent 10 }}
ports:
- name: postgres-tcp
containerPort: 5432
protocol: TCP
readinessProbe:
exec:
command:
- sh
- -c
- "until pg_isready -U ${POSTGRES_USER} -h localhost; do sleep 2; done"
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 2
livenessProbe:
exec:
command:
- sh
- -c
- "until pg_isready -U ${POSTGRES_USER} -h localhost; do sleep 2; done"
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
startupProbe:
exec:
command:
- sh
- -c
- "until pg_isready -U ${POSTGRES_USER} -h localhost; do sleep 2; done"
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 60
successThreshold: 1
volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }}

View File

@@ -4,8 +4,8 @@ metadata:
name: db-details
data:
db-user: {{ "postgres" | b64enc }}
{{- if .Release.IsInstall }}
db-password: {{ randAlphaNum 15 | b64enc | quote }}
{{- with (lookup "v1" "Secret" .Release.Namespace "db-details") }}
db-password: {{ index .data "db-password" }}
{{ else }}
db-password: {{ index (lookup "v1" "Secret" .Release.Namespace "db-details").data "db-password" }}
db-password: {{ randAlphaNum 15 | b64enc | quote }}
{{ end }}