From bd5d41e152bee04048ef9c0158293b73c611c71c Mon Sep 17 00:00:00 2001 From: sonicaj Date: Tue, 21 Mar 2023 17:59:03 +0000 Subject: [PATCH] Update catalog information --- catalog.json | 14 +- charts/home-assistant/1.0.72/.helmignore | 2 + charts/home-assistant/1.0.72/Chart.lock | 6 + charts/home-assistant/1.0.72/Chart.yaml | 23 ++ charts/home-assistant/1.0.72/README.md | 3 + charts/home-assistant/1.0.72/app-readme.md | 1 + .../1.0.72/charts/common-2207.0.0.tgz | Bin 0 -> 4975 bytes .../home-assistant/1.0.72/ci/test-values.yaml | 32 ++ charts/home-assistant/1.0.72/ix_values.yaml | 4 + charts/home-assistant/1.0.72/questions.yaml | 292 ++++++++++++++++++ .../1.0.72/templates/_postgres.tpl | 49 +++ .../templates/backup-postgres-config.yaml | 15 + .../templates/backup-postgres-hook.yaml | 38 +++ .../1.0.72/templates/deployment.yaml | 114 +++++++ .../home-assistance-init-config.yaml | 40 +++ .../1.0.72/templates/postgres-config.yaml | 8 + .../1.0.72/templates/postgres-deployment.yaml | 56 ++++ .../1.0.72/templates/postgres-secret.yaml | 11 + .../1.0.72/templates/postgres-service.yaml | 6 + .../1.0.72/templates/pre-install-job.yaml | 33 ++ .../1.0.72/templates/service.yaml | 10 + charts/home-assistant/item.yaml | 3 + 22 files changed, 753 insertions(+), 7 deletions(-) create mode 100644 charts/home-assistant/1.0.72/.helmignore create mode 100644 charts/home-assistant/1.0.72/Chart.lock create mode 100644 charts/home-assistant/1.0.72/Chart.yaml create mode 100644 charts/home-assistant/1.0.72/README.md create mode 100644 charts/home-assistant/1.0.72/app-readme.md create mode 100644 charts/home-assistant/1.0.72/charts/common-2207.0.0.tgz create mode 100644 charts/home-assistant/1.0.72/ci/test-values.yaml create mode 100644 charts/home-assistant/1.0.72/ix_values.yaml create mode 100644 charts/home-assistant/1.0.72/questions.yaml create mode 100644 charts/home-assistant/1.0.72/templates/_postgres.tpl create mode 100644 charts/home-assistant/1.0.72/templates/backup-postgres-config.yaml create mode 100644 charts/home-assistant/1.0.72/templates/backup-postgres-hook.yaml create mode 100644 charts/home-assistant/1.0.72/templates/deployment.yaml create mode 100644 charts/home-assistant/1.0.72/templates/home-assistance-init-config.yaml create mode 100644 charts/home-assistant/1.0.72/templates/postgres-config.yaml create mode 100644 charts/home-assistant/1.0.72/templates/postgres-deployment.yaml create mode 100644 charts/home-assistant/1.0.72/templates/postgres-secret.yaml create mode 100644 charts/home-assistant/1.0.72/templates/postgres-service.yaml create mode 100644 charts/home-assistant/1.0.72/templates/pre-install-job.yaml create mode 100644 charts/home-assistant/1.0.72/templates/service.yaml create mode 100644 charts/home-assistant/item.yaml diff --git a/catalog.json b/catalog.json index 6320d8d8d6..e3676c62f3 100644 --- a/catalog.json +++ b/catalog.json @@ -107,7 +107,7 @@ "latest_version": "1.0.16", "latest_app_version": "v1.38.1", "latest_human_version": "v1.38.1_1.0.16", - "last_update": "2023-03-21 16:20:11", + "last_update": "2023-03-21 16:20:59", "name": "netdata", "recommended": false, "title": "Netdata", @@ -233,17 +233,17 @@ "categories": [ "home-automation" ], - "description": "home-assistant App for TrueNAS SCALE", + "description": "Home Assistant App for TrueNAS SCALE", "healthy": true, "healthy_error": null, "location": "/__w/charts/charts/charts/home-assistant", - "latest_version": "1.0.71", + "latest_version": "1.0.72", "latest_app_version": "2023.3.5", - "latest_human_version": "2023.3.5_1.0.71", - "last_update": "2023-03-17 12:46:00", + "latest_human_version": "2023.3.5_1.0.72", + "last_update": "2023-03-21 17:58:25", "name": "home-assistant", "recommended": false, - "title": "Home-assistant", + "title": "Home Assistant", "icon_url": "https://avatars.githubusercontent.com/u/13844975?s=200&v=4" }, "syncthing": { @@ -304,7 +304,7 @@ "last_update": "2023-03-20 16:00:56", "name": "ipfs", "recommended": false, - "title": "Ipfs", + "title": "IPFS", "icon_url": "https://avatars.githubusercontent.com/u/10536621" }, "chia": { diff --git a/charts/home-assistant/1.0.72/.helmignore b/charts/home-assistant/1.0.72/.helmignore new file mode 100644 index 0000000000..c1347c2c27 --- /dev/null +++ b/charts/home-assistant/1.0.72/.helmignore @@ -0,0 +1,2 @@ +# Patterns to ignore when building packages. +*.png diff --git a/charts/home-assistant/1.0.72/Chart.lock b/charts/home-assistant/1.0.72/Chart.lock new file mode 100644 index 0000000000..ad5bae57c3 --- /dev/null +++ b/charts/home-assistant/1.0.72/Chart.lock @@ -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" diff --git a/charts/home-assistant/1.0.72/Chart.yaml b/charts/home-assistant/1.0.72/Chart.yaml new file mode 100644 index 0000000000..c6bba1a56b --- /dev/null +++ b/charts/home-assistant/1.0.72/Chart.yaml @@ -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 diff --git a/charts/home-assistant/1.0.72/README.md b/charts/home-assistant/1.0.72/README.md new file mode 100644 index 0000000000..bcdded4f0a --- /dev/null +++ b/charts/home-assistant/1.0.72/README.md @@ -0,0 +1,3 @@ +# Introduction + +home assistant App for TrueNAS SCALE \ No newline at end of file diff --git a/charts/home-assistant/1.0.72/app-readme.md b/charts/home-assistant/1.0.72/app-readme.md new file mode 100644 index 0000000000..15cfb6b108 --- /dev/null +++ b/charts/home-assistant/1.0.72/app-readme.md @@ -0,0 +1 @@ +home-assistant App for TrueNAS SCALE diff --git a/charts/home-assistant/1.0.72/charts/common-2207.0.0.tgz b/charts/home-assistant/1.0.72/charts/common-2207.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..bb76f27c528f62dcc3df67cc98144773ed56159e GIT binary patch literal 4975 zcmV-#6Oim5iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH>ebKAC({aJs-9+S?qb2TN)vVG&3&YaKAd-XJRGI1vFb#884 zh=e56B)|Zm99`=B+i&nif?tws$4b%)KiDF&*4fcnlqr>lD@C39pN-iYg-wht!R=soI zNI@BSkGUX>p1^$ALs?c{?)PFWB2F@?uTLQ%V~+R&BE>B*VI0W6;PqreB7zb)LlPxy z+M_7NCtw(>Cl?t$aTR-WhkH029EXE&(EHN;|Em`({}QKJf+QCGYk~QkL>NU8%c%@y z_Gp!`O8!U3`!)GL8jZH{zmf9kQ~yQpOfv!4nFl-dy%+tvyWXcydl2IZp%?s9o~e(#3R_yn#D;HkxzVu@lT(Mb=$D2Y#>fY2z(;}W@gAY2o+<|RsT03rMV zA95x!+}&9WB14fu6TZa>MgoVI?sgSAL1UZ<1-jR0(mV?VPH-d{f2A)?dz8=^Qwby8 zNmUusSpWXg6Ze@)L;j-#3E}C1&!7NS$p3IO9M$FjaJZHKjT9~a?`A}RV*#xOumB_g z!8plr#tAjn9wmvBX<*~uaU=!E8IpiFhKOS%aooElaz-e~8MZ!vv;JYHLa{vOq&_Hw z?fD!fITmp8BZLOlHD5s3I!f#nSi3rz=)fHaRe=;d(G?3%LiP;Ar<H3v5X@cp10*M@H?u?2 zoU_@hn0tkB_iX#0$F#3iR@(n-JzJ0R0#?}n{lVy{X8(_m4-dBXe-lO9|F@XN*qC=^ zw)Ko_g@EFiC?$)MH~OA-0%|V6+GgF!y=PfH^KO574-FZfg)}$zDn`V=r++(T&Jmqr zcz&%B7$^<2r@_oSgZkwxghYIb<(uMJdF>nJnUq=Js$`r=7O})4vsXU&yR$b1bYY;i zb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_4yZZ&)@J4i*Xv@l;0z}j<^pbKB$`2lXmP5uWDw&yPFMyM-#W5# too=Kjs4*qG&LDvKECLU|1wFSd+p;a&vMtr}{{a91|NkuQSuOyI002P(xo!Xe literal 0 HcmV?d00001 diff --git a/charts/home-assistant/1.0.72/ci/test-values.yaml b/charts/home-assistant/1.0.72/ci/test-values.yaml new file mode 100644 index 0000000000..daaca32669 --- /dev/null +++ b/charts/home-assistant/1.0.72/ci/test-values.yaml @@ -0,0 +1,32 @@ +appVolumeMounts: + config: + emptyDir: true + mountPath: /config + media: + emptyDir: true + mountPath: /media +dnsConfig: + options: [] +emptyDirVolumes: true +environmentVariables: [] +extraAppVolumeMounts: [] +hostNetwork: false +ixChartContext: {} +ownerGID: 568 +ownerUID: 568 +postgresAppVolumeMounts: + postgres-backup: + emptyDir: true + mountPath: /postgres_backups + postgres-data: + emptyDir: true + mountPath: /var/lib/postgresql/data +postgresql: + backupVolume: + datasetName: ix-postgres_backups + mountPath: /postgres_backups + dataVolume: + datasetName: ix-postgres_data + mountPath: /var/lib/postgresql/data +timezone: America/Los_Angeles +web_port: 32000 diff --git a/charts/home-assistant/1.0.72/ix_values.yaml b/charts/home-assistant/1.0.72/ix_values.yaml new file mode 100644 index 0000000000..f61271a9d4 --- /dev/null +++ b/charts/home-assistant/1.0.72/ix_values.yaml @@ -0,0 +1,4 @@ +image: + pullPolicy: IfNotPresent + repository: homeassistant/home-assistant + tag: 2023.3.5 diff --git a/charts/home-assistant/1.0.72/questions.yaml b/charts/home-assistant/1.0.72/questions.yaml new file mode 100644 index 0000000000..feb5225536 --- /dev/null +++ b/charts/home-assistant/1.0.72/questions.yaml @@ -0,0 +1,292 @@ +groups: + - name: "Configuration" + description: "Home Assistant application configuration" + - name: "Storage" + description: "Configure storage for homeassistant" + - name: "Networking" + description: "Networking Configuration for homeassistant" + - name: "Advanced DNS Settings" + description: "Configure DNS settings" + - name: "Resource Limits" + description: "Set CPU/memory limits for Kubernetes Pod" + +portals: + web_portal: + protocols: + - "http" + host: + - "$node_ip" + ports: + - "$variable-web_port" + path: "/" + +questions: + - variable: web_port + label: "Web Port for homeassistant" + group: Networking + schema: + type: int + min: 8000 + max: 65535 + default: 20810 + required: true + + - variable: timezone + label: "Configure timezone" + group: "Configuration" + description: "Configure timezone for Home Assistant" + schema: + type: string + $ref: + - "definitions/timezone" + + - variable: hostNetwork + label: "Enable Host Network" + group: "Networking" + schema: + type: boolean + default: false + + - variable: dnsConfig + label: "DNS Configuration" + group: "Advanced DNS Settings" + schema: + type: dict + attrs: + - variable: options + label: "DNS Options" + schema: + type: list + items: + - variable: optionsEntry + label: "Option Entry Configuration" + schema: + type: dict + attrs: + - variable: name + label: "Option Name" + schema: + type: string + required: true + - variable: value + label: "Option Value" + schema: + type: string + required: true + + - variable: ownerUID + label: "Storage User ID" + description: "User ID of the storage volume being used (application will chown the storage volume path with specified UID)" + group: Configuration + schema: + type: int + default: 568 + min: 1 + max: 65535 + + - variable: ownerGID + label: "Storage Group ID" + description: "Group ID of the storage volume being used (application will chown the storage volume path with specified GID)" + group: Configuration + schema: + type: int + default: 568 + min: 1 + max: 65535 + + - variable: environmentVariables + label: "Home Assistant environment" + group: "Configuration" + schema: + type: list + default: [] + items: + - variable: environmentVariable + label: "Environment Variable" + schema: + type: dict + attrs: + - variable: name + label: "Name" + schema: + type: string + - variable: value + label: "Value" + schema: + type: string + + - variable: appVolumeMounts + label: "Home Assistant Storage" + group: "Storage" + schema: + type: dict + attrs: + - variable: config + label: "Storage Volume for Configuration" + schema: + type: dict + attrs: + - variable: datasetName + label: "Configuration Storage Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "ix-config" + editable: false + - variable: mountPath + label: "Configuration Storage Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: true + default: "/config" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Home Assistant Configuration Storage Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Home Assistant Configuration Storage Volume" + schema: + type: hostpath + required: true + - variable: media + label: "Storage Volume for Media" + schema: + type: dict + attrs: + - variable: datasetName + label: "Media Storage Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "ix-media" + editable: false + - variable: mountPath + label: "Media Storage Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: true + default: "/media" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Home Assistant Media Storage Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Home Assistant Media Storage Volume" + schema: + type: hostpath + required: true + + + - variable: postgresAppVolumeMounts + label: "Postgres Storage" + group: "Storage" + schema: + type: dict + hidden: true + attrs: + - variable: postgres-data + label: "Postgres Data Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Postgres Data Volume Name" + schema: + type: string + $ref: + - "normalize/ixVolume" + default: "ix-postgres_data" + editable: false + - variable: mountPath + label: "Postgresql Data Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + editable: false + default: "/var/lib/postgresql/data" + - variable: postgres-backup + label: "Postgres Backup Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Postgres Backup Volume Name" + schema: + type: string + $ref: + - "normalize/ixVolume" + default: "ix-postgres_backups" + editable: false + - variable: mountPath + label: "Postgresql Backup Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + editable: false + default: "/postgres_backups" + + - variable: extraAppVolumeMounts + label: "Extra Host Path Volumes" + group: "Storage" + schema: + type: list + items: + - variable: extraAppVolume + label: "Host Path Volume" + description: "Add an extra host path volume for Home Assistant application" + schema: + type: dict + attrs: + - variable: mountPath + label: "Mount Path in Pod" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: hostPath + label: "Host Path" + description: "Host path" + schema: + type: hostpath + required: true + + - variable: enableResourceLimits + label: "Enable Pod resource limits" + group: "Resource Limits" + schema: + type: boolean + default: false + - variable: cpuLimit + label: "CPU Limit" + description: "CPU resource limit allow plain integer values with suffix m(milli) e.g 1000m, 100." + group: "Resource Limits" + schema: + type: string + show_if: [["enableResourceLimits", "=", true]] + valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)" + default: "4000m" + - variable: memLimit + label: "Memory Limit" + group: "Resource Limits" + description: "Memory limits is specified by number of bytes. Followed by quantity suffix like E,P,T,G,M,k and Ei,Pi,Ti,Mi,Gi,Ki can also be used. e.g 129e6, 129M, 128974848000m, 123Mi" + schema: + type: string + show_if: [["enableResourceLimits", "=", true]] + valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$" + default: "8Gi" diff --git a/charts/home-assistant/1.0.72/templates/_postgres.tpl b/charts/home-assistant/1.0.72/templates/_postgres.tpl new file mode 100644 index 0000000000..dcb7404691 --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/_postgres.tpl @@ -0,0 +1,49 @@ +{{/* +Get Home assistance Postgres Database Name +*/}} +{{- define "postgres.DatabaseName" -}} +{{- print "homeassistance" -}} +{{- end -}} + + +{{- define "postgres.imageName" -}} +{{- print "postgres:13.1" -}} +{{- end -}} + + +{{/* +Retrieve postgres backup name +This will return a unique name based on revision and chart numbers specified. +*/}} +{{- define "postgres.backupName" -}} +{{- $upgradeDict := .Values.ixChartContext.upgradeMetadata -}} +{{- printf "postgres-backup-from-%s-to-%s-revision-%d" $upgradeDict.oldChartVersion $upgradeDict.newChartVersion (int64 $upgradeDict.preUpgradeRevision) -}} +{{- end }} + + +{{/* +Retrieve postgres credentials for environment variables configuration +*/}} +{{- define "postgres.envVariableConfiguration" -}} +{{ $envList := list }} +{{ $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) }} +{{- end -}} + + +{{/* +Retrieve postgres volume configuration +*/}} +{{- define "postgres.volumeConfiguration" -}} +{{ include "common.storage.configureAppVolumes" (dict "appVolumeMounts" .Values.postgresAppVolumeMounts "emptyDirVolumes" .Values.emptyDirVolumes "ixVolumes" .Values.ixVolumes) | nindent 0 }} +{{- end -}} + + +{{/* +Retrieve postgres volume mounts configuration +*/}} +{{- define "postgres.volumeMountsConfiguration" -}} +{{ include "common.storage.configureAppVolumeMountsInContainer" (dict "appVolumeMounts" .Values.postgresAppVolumeMounts ) | nindent 0 }} +{{- end -}} + diff --git a/charts/home-assistant/1.0.72/templates/backup-postgres-config.yaml b/charts/home-assistant/1.0.72/templates/backup-postgres-config.yaml new file mode 100644 index 0000000000..c9ccf66dba --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/backup-postgres-config.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "postgres-backup-hook-config-map" + annotations: + rollme: {{ randAlphaNum 5 | quote }} +data: + entrypoint.sh: |- + #!/bin/sh + cmd="/docker-entrypoint.sh postgres" + eval "${cmd}" & disown; + until pg_isready; do + sleep 5; + done; + pg_dump -U $POSTGRES_USER -d {{ template "postgres.DatabaseName" . }} > /postgres_backups/$BACKUP_NAME; diff --git a/charts/home-assistant/1.0.72/templates/backup-postgres-hook.yaml b/charts/home-assistant/1.0.72/templates/backup-postgres-hook.yaml new file mode 100644 index 0000000000..fe1b71ea24 --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/backup-postgres-hook.yaml @@ -0,0 +1,38 @@ +{{- if .Values.ixChartContext.isUpgrade -}} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +apiVersion: batch/v1 +kind: Job +metadata: + name: "pre-upgrade-hook" + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-weight": "1" + "helm.sh/hook-delete-policy": hook-succeeded + rollme: {{ randAlphaNum 5 | quote }} +spec: + template: + metadata: + name: "pre-upgrade-hook" + spec: + restartPolicy: Never + containers: + - name: {{ .Chart.Name }}-postgres-backup + image: {{ template "postgres.imageName" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: {{ include "postgres.envVariableConfiguration" $values | nindent 10 }} + - name: BACKUP_NAME + value: {{ template "postgres.backupName" . }} + volumeMounts: {{ include "postgres.volumeMountsConfiguration" $values | nindent 10 }} + - name: backup-script-configmap + mountPath: /bin/backup_entrypoint.sh + readOnly: true + subPath: entrypoint.sh + command: + - "/bin/backup_entrypoint.sh" + volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }} + - name: backup-script-configmap + configMap: + defaultMode: 0700 + name: "postgres-backup-hook-config-map" +{{- end -}} diff --git a/charts/home-assistant/1.0.72/templates/deployment.yaml b/charts/home-assistant/1.0.72/templates/deployment.yaml new file mode 100644 index 0000000000..1f333b07db --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/deployment.yaml @@ -0,0 +1,114 @@ +{{ include "common.storage.hostPathValidate" .Values }} +{{ $postgres_values := (. | mustDeepCopy) }} +{{ $_ := set $postgres_values "common" (dict "nameSuffix" "postgres") }} + +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" . }} + labels: + app: {{ template "common.names.name" . }} + chart: {{ template "common.names.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + rollme: {{ randAlphaNum 5 | quote }} +spec: + replicas: {{ (default 1 .Values.replicas) }} + strategy: + type: "Recreate" + selector: + matchLabels: + app: {{ template "common.names.name" . }} + release: {{ .Release.Name }} + template: + metadata: + name: {{ template "common.names.fullname" . }} + labels: + app: {{ template "common.names.name" . }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" . | nindent 8 }} + annotations: {{ include "common.annotations" . | nindent 8 }} + spec: + hostNetwork: {{ .Values.hostNetwork }} + initContainers: + - name: init-postgresdb + image: {{ template "postgres.imageName" . }} + command: ['sh', '-c', "until pg_isready -h {{ template "common.names.fullname" $postgres_values }}; do echo waiting for postgres; sleep 2; done"] + imagePullPolicy: {{ .Values.image.pullPolicy }} + - name: init-configs + image: "alpine:latest" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - "sh" + - "/config/init/init.sh" + env: + {{ $envList := (default list .Values.environmentVariables) }} + {{ $envList = mustAppend $envList (dict "name" "POSTGRES_HOST" "value" (printf "%s:5432" (include "common.names.fullname" $postgres_values))) }} + {{ $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "value" (include "postgres.DatabaseName" .)) }} + {{ $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 12 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + - name: initial-config-script + mountPath: /config/init + + containers: + - name: {{ .Chart.Name }} + {{ include "common.resources.limitation" . | nindent 10 }} + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - 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) }} + {{ $envList = mustAppend $envList (dict "name" "PUID" "value" .Values.ownerUID) }} + {{ $envList = mustAppend $envList (dict "name" "PGID" "value" .Values.ownerGID) }} + {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }} + +{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }} + volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} + - name: initial-config-script + configMap: + defaultMode: 0700 + name: "home-assistance-initial-script-configmap" + + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} diff --git a/charts/home-assistant/1.0.72/templates/home-assistance-init-config.yaml b/charts/home-assistant/1.0.72/templates/home-assistance-init-config.yaml new file mode 100644 index 0000000000..5a4c03183a --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/home-assistance-init-config.yaml @@ -0,0 +1,40 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "home-assistance-initial-script-configmap" + annotations: + rollme: {{ randAlphaNum 5 | quote }} +data: + configuration.yaml.default: |- + # Configure a default setup of Home Assistant (frontend, api, etc) + default_config: + + # Text to speech + tts: + - platform: google_translate + + + 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 + echo " postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DB}" >> /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 + echo " postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DB}" >> /config/configuration.yaml + cat /config/init/http.default >> /config/configuration.yaml + fi + recorder.default: |- + + recorder: + purge_keep_days: 30 + commit_interval: 3 + db_url: + diff --git a/charts/home-assistant/1.0.72/templates/postgres-config.yaml b/charts/home-assistant/1.0.72/templates/postgres-config.yaml new file mode 100644 index 0000000000..8a0c284c51 --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/postgres-config.yaml @@ -0,0 +1,8 @@ +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: posgress-configmap +data: + database_url: {{ template "common.names.fullname" $values }} diff --git a/charts/home-assistant/1.0.72/templates/postgres-deployment.yaml b/charts/home-assistant/1.0.72/templates/postgres-deployment.yaml new file mode 100644 index 0000000000..71fe845e75 --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/postgres-deployment.yaml @@ -0,0 +1,56 @@ +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +{{ include "common.deployment.common_config" $values | nindent 0 }} +spec: {{ include "common.deployment.common_spec" $values | nindent 2 }} + template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }} + spec: + hostNetwork: {{ .Values.hostNetwork }} + containers: + - name: {{ .Chart.Name }}-postgres + image: {{ template "postgres.imageName" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + {{ $envList := (default list .Values.environmentVariables) }} + {{ $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "value" (include "postgres.DatabaseName" .)) }} + {{ $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 }} diff --git a/charts/home-assistant/1.0.72/templates/postgres-secret.yaml b/charts/home-assistant/1.0.72/templates/postgres-secret.yaml new file mode 100644 index 0000000000..0a93ebe57b --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/postgres-secret.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Secret +metadata: + name: db-details +data: + db-user: {{ "postgres" | b64enc }} + {{- with (lookup "v1" "Secret" .Release.Namespace "db-details") }} + db-password: {{ index .data "db-password" }} + {{ else }} + db-password: {{ randAlphaNum 15 | b64enc | quote }} + {{ end }} diff --git a/charts/home-assistant/1.0.72/templates/postgres-service.yaml b/charts/home-assistant/1.0.72/templates/postgres-service.yaml new file mode 100644 index 0000000000..c6603fd62b --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/postgres-service.yaml @@ -0,0 +1,6 @@ +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "postgres-tcp" "port" 5432 "targetPort" 5432) }} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +{{ $_1 := set $values "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} +{{ include "common.classes.service" $values }} diff --git a/charts/home-assistant/1.0.72/templates/pre-install-job.yaml b/charts/home-assistant/1.0.72/templates/pre-install-job.yaml new file mode 100644 index 0000000000..2c4074efc9 --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/pre-install-job.yaml @@ -0,0 +1,33 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: "{{ template "common.names.fullname" . }}-preinstall-job" + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + helm.sh/chart: {{ template "common.names.chart" . }} + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-delete-policy": hook-succeeded +spec: + template: + metadata: + name: "{{ template "common.names.fullname" . }}-preinstall-hook" + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: {{ template "common.names.chart" . }} + spec: + restartPolicy: Never + containers: + - name: pre-install-job + image: "alpine:latest" + command: + - "chown" + - "-R" + - "{{ .Values.ownerUID }}:{{ .Values.ownerGID }}" + - "{{ .Values.appVolumeMounts.config.mountPath }}" + - "{{ .Values.appVolumeMounts.media.mountPath }}" + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} diff --git a/charts/home-assistant/1.0.72/templates/service.yaml b/charts/home-assistant/1.0.72/templates/service.yaml new file mode 100644 index 0000000000..79b48458e5 --- /dev/null +++ b/charts/home-assistant/1.0.72/templates/service.yaml @@ -0,0 +1,10 @@ +{{ $svc := .Values.service }} +{{ $selectors := list }} +{{ $selectors = mustAppend $selectors (dict "key" "app" "value" (include "common.names.name" .) ) }} +{{ $selectors = mustAppend $selectors (dict "key" "release" "value" .Release.Name ) }} +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "web" "port" .Values.web_port "nodePort" .Values.web_port "targetPort" 8123) }} +{{ $params := . }} +{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }} +{{ $_1 := set .Values "extraSelectorLabels" $selectors }} +{{ include "common.classes.service" $params }} diff --git a/charts/home-assistant/item.yaml b/charts/home-assistant/item.yaml new file mode 100644 index 0000000000..cf09962c57 --- /dev/null +++ b/charts/home-assistant/item.yaml @@ -0,0 +1,3 @@ +icon_url: https://avatars.githubusercontent.com/u/13844975?s=200&v=4 +categories: +- home-automation