diff --git a/charts/home-assistant/1.0.71/Chart.lock b/charts/home-assistant/1.0.71/Chart.lock deleted file mode 100644 index 75536ecc2b..0000000000 --- a/charts/home-assistant/1.0.71/Chart.lock +++ /dev/null @@ -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" diff --git a/charts/home-assistant/1.0.71/Chart.yaml b/charts/home-assistant/1.0.71/Chart.yaml deleted file mode 100644 index ec7a9999e2..0000000000 --- a/charts/home-assistant/1.0.71/Chart.yaml +++ /dev/null @@ -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 diff --git a/charts/home-assistant/1.0.71/charts/common-2207.0.0.tgz b/charts/home-assistant/1.0.71/charts/common-2207.0.0.tgz deleted file mode 100644 index 2adf94b438..0000000000 Binary files a/charts/home-assistant/1.0.71/charts/common-2207.0.0.tgz and /dev/null differ diff --git a/charts/home-assistant/1.0.71/templates/tests/deployment-check.yaml b/charts/home-assistant/1.0.71/templates/tests/deployment-check.yaml deleted file mode 100644 index 7e888eb0b9..0000000000 --- a/charts/home-assistant/1.0.71/templates/tests/deployment-check.yaml +++ /dev/null @@ -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 diff --git a/charts/home-assistant/.helmignore b/library/ix-dev/charts/home-assistant/.helmignore similarity index 100% rename from charts/home-assistant/.helmignore rename to library/ix-dev/charts/home-assistant/.helmignore diff --git a/library/ix-dev/charts/home-assistant/Chart.lock b/library/ix-dev/charts/home-assistant/Chart.lock new file mode 100644 index 0000000000..ad5bae57c3 --- /dev/null +++ b/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" diff --git a/library/ix-dev/charts/home-assistant/Chart.yaml b/library/ix-dev/charts/home-assistant/Chart.yaml new file mode 100644 index 0000000000..c6bba1a56b --- /dev/null +++ b/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 diff --git a/charts/home-assistant/1.0.71/README.md b/library/ix-dev/charts/home-assistant/README.md similarity index 100% rename from charts/home-assistant/1.0.71/README.md rename to library/ix-dev/charts/home-assistant/README.md diff --git a/charts/home-assistant/1.0.71/app-readme.md b/library/ix-dev/charts/home-assistant/app-readme.md similarity index 100% rename from charts/home-assistant/1.0.71/app-readme.md rename to library/ix-dev/charts/home-assistant/app-readme.md diff --git a/library/ix-dev/charts/home-assistant/charts/common-2207.0.0.tgz b/library/ix-dev/charts/home-assistant/charts/common-2207.0.0.tgz new file mode 100644 index 0000000000..bb76f27c52 Binary files /dev/null and b/library/ix-dev/charts/home-assistant/charts/common-2207.0.0.tgz differ diff --git a/charts/home-assistant/1.0.71/test_values.yaml b/library/ix-dev/charts/home-assistant/ci/test-values.yaml similarity index 88% rename from charts/home-assistant/1.0.71/test_values.yaml rename to library/ix-dev/charts/home-assistant/ci/test-values.yaml index 25171e8559..daaca32669 100644 --- a/charts/home-assistant/1.0.71/test_values.yaml +++ b/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 diff --git a/charts/home-assistant/item.yaml b/library/ix-dev/charts/home-assistant/item.yaml similarity index 100% rename from charts/home-assistant/item.yaml rename to library/ix-dev/charts/home-assistant/item.yaml diff --git a/charts/home-assistant/1.0.71/questions.yaml b/library/ix-dev/charts/home-assistant/questions.yaml similarity index 100% rename from charts/home-assistant/1.0.71/questions.yaml rename to library/ix-dev/charts/home-assistant/questions.yaml diff --git a/charts/home-assistant/1.0.71/templates/_postgres.tpl b/library/ix-dev/charts/home-assistant/templates/_postgres.tpl similarity index 100% rename from charts/home-assistant/1.0.71/templates/_postgres.tpl rename to library/ix-dev/charts/home-assistant/templates/_postgres.tpl diff --git a/charts/home-assistant/1.0.71/templates/backup-postgres-config.yaml b/library/ix-dev/charts/home-assistant/templates/backup-postgres-config.yaml similarity index 100% rename from charts/home-assistant/1.0.71/templates/backup-postgres-config.yaml rename to library/ix-dev/charts/home-assistant/templates/backup-postgres-config.yaml diff --git a/charts/home-assistant/1.0.71/templates/backup-postgres-hook.yaml b/library/ix-dev/charts/home-assistant/templates/backup-postgres-hook.yaml similarity index 100% rename from charts/home-assistant/1.0.71/templates/backup-postgres-hook.yaml rename to library/ix-dev/charts/home-assistant/templates/backup-postgres-hook.yaml diff --git a/charts/home-assistant/1.0.71/templates/deployment.yaml b/library/ix-dev/charts/home-assistant/templates/deployment.yaml similarity index 85% rename from charts/home-assistant/1.0.71/templates/deployment.yaml rename to library/ix-dev/charts/home-assistant/templates/deployment.yaml index bc2a353325..1f333b07db 100644 --- a/charts/home-assistant/1.0.71/templates/deployment.yaml +++ b/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) }} diff --git a/charts/home-assistant/1.0.71/templates/home-assistance-init-config.yaml b/library/ix-dev/charts/home-assistant/templates/home-assistance-init-config.yaml similarity index 100% rename from charts/home-assistant/1.0.71/templates/home-assistance-init-config.yaml rename to library/ix-dev/charts/home-assistant/templates/home-assistance-init-config.yaml diff --git a/charts/home-assistant/1.0.71/templates/postgres-config.yaml b/library/ix-dev/charts/home-assistant/templates/postgres-config.yaml similarity index 100% rename from charts/home-assistant/1.0.71/templates/postgres-config.yaml rename to library/ix-dev/charts/home-assistant/templates/postgres-config.yaml diff --git a/charts/home-assistant/1.0.71/templates/postgres-deployment.yaml b/library/ix-dev/charts/home-assistant/templates/postgres-deployment.yaml similarity index 58% rename from charts/home-assistant/1.0.71/templates/postgres-deployment.yaml rename to library/ix-dev/charts/home-assistant/templates/postgres-deployment.yaml index 802ca73911..71fe845e75 100644 --- a/charts/home-assistant/1.0.71/templates/postgres-deployment.yaml +++ b/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 }} diff --git a/charts/home-assistant/1.0.71/templates/postgres-secret.yaml b/library/ix-dev/charts/home-assistant/templates/postgres-secret.yaml similarity index 57% rename from charts/home-assistant/1.0.71/templates/postgres-secret.yaml rename to library/ix-dev/charts/home-assistant/templates/postgres-secret.yaml index 6700621026..0a93ebe57b 100644 --- a/charts/home-assistant/1.0.71/templates/postgres-secret.yaml +++ b/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 }} diff --git a/charts/home-assistant/1.0.71/templates/postgres-service.yaml b/library/ix-dev/charts/home-assistant/templates/postgres-service.yaml similarity index 100% rename from charts/home-assistant/1.0.71/templates/postgres-service.yaml rename to library/ix-dev/charts/home-assistant/templates/postgres-service.yaml diff --git a/charts/home-assistant/1.0.71/templates/pre-install-job.yaml b/library/ix-dev/charts/home-assistant/templates/pre-install-job.yaml similarity index 100% rename from charts/home-assistant/1.0.71/templates/pre-install-job.yaml rename to library/ix-dev/charts/home-assistant/templates/pre-install-job.yaml diff --git a/charts/home-assistant/1.0.71/templates/service.yaml b/library/ix-dev/charts/home-assistant/templates/service.yaml similarity index 100% rename from charts/home-assistant/1.0.71/templates/service.yaml rename to library/ix-dev/charts/home-assistant/templates/service.yaml diff --git a/charts/home-assistant/upgrade_info.json b/library/ix-dev/charts/home-assistant/upgrade_info.json similarity index 100% rename from charts/home-assistant/upgrade_info.json rename to library/ix-dev/charts/home-assistant/upgrade_info.json diff --git a/charts/home-assistant/upgrade_strategy b/library/ix-dev/charts/home-assistant/upgrade_strategy similarity index 100% rename from charts/home-assistant/upgrade_strategy rename to library/ix-dev/charts/home-assistant/upgrade_strategy diff --git a/charts/home-assistant/1.0.71/ix_values.yaml b/library/ix-dev/charts/home-assistant/values.yaml similarity index 100% rename from charts/home-assistant/1.0.71/ix_values.yaml rename to library/ix-dev/charts/home-assistant/values.yaml