Explorar o código

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

* move home-assistant to ix-dev

* update lock

* switch to lookup

* indent lists
Stavros Kois %!s(int64=2) %!d(string=hai) anos
pai
achega
d3f0e5f72f
Modificáronse 27 ficheiros con 92 adicións e 51 borrados
  1. 0 6
      charts/home-assistant/1.0.71/Chart.lock
  2. 0 15
      charts/home-assistant/1.0.71/Chart.yaml
  3. BIN=BIN
      charts/home-assistant/1.0.71/charts/common-2207.0.0.tgz
  4. 0 21
      charts/home-assistant/1.0.71/templates/tests/deployment-check.yaml
  5. 0 0
      library/ix-dev/charts/home-assistant/.helmignore
  6. 6 0
      library/ix-dev/charts/home-assistant/Chart.lock
  7. 23 0
      library/ix-dev/charts/home-assistant/Chart.yaml
  8. 0 0
      library/ix-dev/charts/home-assistant/README.md
  9. 0 0
      library/ix-dev/charts/home-assistant/app-readme.md
  10. BIN=BIN
      library/ix-dev/charts/home-assistant/charts/common-2207.0.0.tgz
  11. 0 4
      library/ix-dev/charts/home-assistant/ci/test-values.yaml
  12. 0 0
      library/ix-dev/charts/home-assistant/item.yaml
  13. 0 0
      library/ix-dev/charts/home-assistant/questions.yaml
  14. 0 0
      library/ix-dev/charts/home-assistant/templates/_postgres.tpl
  15. 0 0
      library/ix-dev/charts/home-assistant/templates/backup-postgres-config.yaml
  16. 0 0
      library/ix-dev/charts/home-assistant/templates/backup-postgres-hook.yaml
  17. 27 1
      library/ix-dev/charts/home-assistant/templates/deployment.yaml
  18. 0 0
      library/ix-dev/charts/home-assistant/templates/home-assistance-init-config.yaml
  19. 0 0
      library/ix-dev/charts/home-assistant/templates/postgres-config.yaml
  20. 33 1
      library/ix-dev/charts/home-assistant/templates/postgres-deployment.yaml
  21. 3 3
      library/ix-dev/charts/home-assistant/templates/postgres-secret.yaml
  22. 0 0
      library/ix-dev/charts/home-assistant/templates/postgres-service.yaml
  23. 0 0
      library/ix-dev/charts/home-assistant/templates/pre-install-job.yaml
  24. 0 0
      library/ix-dev/charts/home-assistant/templates/service.yaml
  25. 0 0
      library/ix-dev/charts/home-assistant/upgrade_info.json
  26. 0 0
      library/ix-dev/charts/home-assistant/upgrade_strategy
  27. 0 0
      library/ix-dev/charts/home-assistant/values.yaml

+ 0 - 6
charts/home-assistant/1.0.71/Chart.lock

@@ -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"

+ 0 - 15
charts/home-assistant/1.0.71/Chart.yaml

@@ -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

BIN=BIN
charts/home-assistant/1.0.71/charts/common-2207.0.0.tgz


+ 0 - 21
charts/home-assistant/1.0.71/templates/tests/deployment-check.yaml

@@ -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

+ 0 - 0
charts/home-assistant/.helmignore → library/ix-dev/charts/home-assistant/.helmignore


+ 6 - 0
library/ix-dev/charts/home-assistant/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"

+ 23 - 0
library/ix-dev/charts/home-assistant/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

+ 0 - 0
charts/home-assistant/1.0.71/README.md → library/ix-dev/charts/home-assistant/README.md


+ 0 - 0
charts/home-assistant/1.0.71/app-readme.md → library/ix-dev/charts/home-assistant/app-readme.md


BIN=BIN
library/ix-dev/charts/home-assistant/charts/common-2207.0.0.tgz


+ 0 - 4
charts/home-assistant/1.0.71/test_values.yaml → library/ix-dev/charts/home-assistant/ci/test-values.yaml

@@ -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

+ 0 - 0
charts/home-assistant/item.yaml → library/ix-dev/charts/home-assistant/item.yaml


+ 0 - 0
charts/home-assistant/1.0.71/questions.yaml → library/ix-dev/charts/home-assistant/questions.yaml


+ 0 - 0
charts/home-assistant/1.0.71/templates/_postgres.tpl → library/ix-dev/charts/home-assistant/templates/_postgres.tpl


+ 0 - 0
charts/home-assistant/1.0.71/templates/backup-postgres-config.yaml → library/ix-dev/charts/home-assistant/templates/backup-postgres-config.yaml


+ 0 - 0
charts/home-assistant/1.0.71/templates/backup-postgres-hook.yaml → library/ix-dev/charts/home-assistant/templates/backup-postgres-hook.yaml


+ 27 - 1
charts/home-assistant/1.0.71/templates/deployment.yaml → library/ix-dev/charts/home-assistant/templates/deployment.yaml

@@ -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) }}

+ 0 - 0
charts/home-assistant/1.0.71/templates/home-assistance-init-config.yaml → library/ix-dev/charts/home-assistant/templates/home-assistance-init-config.yaml


+ 0 - 0
charts/home-assistant/1.0.71/templates/postgres-config.yaml → library/ix-dev/charts/home-assistant/templates/postgres-config.yaml


+ 33 - 1
charts/home-assistant/1.0.71/templates/postgres-deployment.yaml → library/ix-dev/charts/home-assistant/templates/postgres-deployment.yaml

@@ -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 }}

+ 3 - 3
charts/home-assistant/1.0.71/templates/postgres-secret.yaml → library/ix-dev/charts/home-assistant/templates/postgres-secret.yaml

@@ -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 }}

+ 0 - 0
charts/home-assistant/1.0.71/templates/postgres-service.yaml → library/ix-dev/charts/home-assistant/templates/postgres-service.yaml


+ 0 - 0
charts/home-assistant/1.0.71/templates/pre-install-job.yaml → library/ix-dev/charts/home-assistant/templates/pre-install-job.yaml


+ 0 - 0
charts/home-assistant/1.0.71/templates/service.yaml → library/ix-dev/charts/home-assistant/templates/service.yaml


+ 0 - 0
charts/home-assistant/upgrade_info.json → library/ix-dev/charts/home-assistant/upgrade_info.json


+ 0 - 0
charts/home-assistant/upgrade_strategy → library/ix-dev/charts/home-assistant/upgrade_strategy


+ 0 - 0
charts/home-assistant/1.0.71/ix_values.yaml → library/ix-dev/charts/home-assistant/values.yaml