diff --git a/charts/appdaemon/.helmignore b/charts/appdaemon/.helmignore new file mode 100644 index 00000000..e559de0a --- /dev/null +++ b/charts/appdaemon/.helmignore @@ -0,0 +1,24 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS diff --git a/charts/appdaemon/Chart.yaml b/charts/appdaemon/Chart.yaml new file mode 100644 index 00000000..de1dac9b --- /dev/null +++ b/charts/appdaemon/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +appVersion: 4.0.5 +description: AppDaemon is a loosely coupled, multi-threaded, sandboxed python execution environment for writing automation apps for various types of Home Automation Software including Home Assistant and MQTT. +name: appdaemon +version: 1.0.0 +keywords: + - appdaemon + - home-automation + - home-assistant + - mqtt +home: https://github.com/k8s-at-home/charts/tree/master/charts/appdaemon +sources: +- https://github.com/AppDaemon/appdaemon +maintainers: + - name: billimek + email: jeff@billimek.com +dependencies: + - name: common + repository: https://k8s-at-home.com/charts/ + version: 1.7.0 diff --git a/charts/appdaemon/OWNERS b/charts/appdaemon/OWNERS new file mode 100644 index 00000000..1ce35762 --- /dev/null +++ b/charts/appdaemon/OWNERS @@ -0,0 +1,8 @@ +approvers: +- billimek +- onedr0p +- bjw-s +reviewers: +- billimek +- onedr0p +- bjw-s diff --git a/charts/appdaemon/README.md b/charts/appdaemon/README.md new file mode 100644 index 00000000..9eca4afd --- /dev/null +++ b/charts/appdaemon/README.md @@ -0,0 +1,67 @@ +# appdaemon + +This is a helm chart for [appdaemon](https://github.com/AppDaemon/appdaemon). + +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)** + +## TL;DR; + +```shell +$ helm repo add k8s-at-home https://k8s-at-home.com/charts/ +$ helm install k8s-at-home/appdaemon +``` + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm install --name my-release k8s-at-home/appdaemon +``` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +helm delete my-release --purge +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration +Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/appdaemon/values.yaml) +file. It has several commented out suggested values. +Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, +```console +helm install appdaemon \ + --set env.TZ="America/New_York" \ + k8s-at-home/appdaemon +``` +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the +chart. For example, +```console +helm install appdaemon k8s-at-home/appdaemon --values values.yaml +``` + +```yaml +image: + tag: ... +``` + +--- +**NOTE** + +If you get +```console +Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: ...` +``` +it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`. + +--- + +## Upgrading an existing Release to a new major version + +A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions. diff --git a/charts/appdaemon/ci/ct-values.yaml b/charts/appdaemon/ci/ct-values.yaml new file mode 100644 index 00000000..5f6f6398 --- /dev/null +++ b/charts/appdaemon/ci/ct-values.yaml @@ -0,0 +1,8 @@ +env: + TZ: "Africa/Cairo" + LATITUDE: "29.9792" + LONGITUDE: "31.1342" + ELEVATION: "64" + DASH_URL: "http://0.0.0.0:5050" +ingress: + enabled: true diff --git a/charts/appdaemon/templates/NOTES.txt b/charts/appdaemon/templates/NOTES.txt new file mode 100644 index 00000000..90f7b653 --- /dev/null +++ b/charts/appdaemon/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "common.notes.defaultNotes" . -}} diff --git a/charts/appdaemon/templates/common.yaml b/charts/appdaemon/templates/common.yaml new file mode 100644 index 00000000..a6613c2c --- /dev/null +++ b/charts/appdaemon/templates/common.yaml @@ -0,0 +1 @@ +{{ include "common.all" . }} diff --git a/charts/appdaemon/values.yaml b/charts/appdaemon/values.yaml new file mode 100644 index 00000000..676e86ca --- /dev/null +++ b/charts/appdaemon/values.yaml @@ -0,0 +1,94 @@ +# Default values for Appdaemon. + +# Use our own image at https://github.com/k8s-at-home/container-images/tree/main/appdaemon +# until https://github.com/AppDaemon/appdaemon/pull/1002 is merged +image: + repository: k8sathome/appdaemon + pullPolicy: IfNotPresent + tag: v4.0.5 + +strategy: + type: Recreate + +service: + port: + port: 5050 + # # Boilerplate config for code-server functionality, be sure to make changes to suit your environment + # additionalServices: + # - enabled: true + # nameSuffix: vscode + # type: ClusterIP + # port: + # port: 12321 + # name: vscode + # protocol: TCP + # targetPort: 12321 + +# Environment variables that can be configure can be seen at +# https://appdaemon.readthedocs.io/en/latest/DOCKER_TUTORIAL.html +env: {} + # TZ: + # LATITUDE: + # LONGITUDE: + # ELEVATION: + # HA_URL: + # DASH_URL: + # TOKEN: + +# # Boilerplate config for code-server functionality, be sure to make changes to suit your environment +# additionalContainers: +# - name: vscode +# image: codercom/code-server:3.7.2 +# imagePullPolicy: IfNotPresent +# workingDir: /www/assets +# args: +# - "--port" +# - "12321" +# - "--auth" +# - "none" +# ports: +# - name: vscode +# containerPort: 12321 +# protocol: TCP +# volumeMounts: +# - name: config +# mountPath: /www/assets +# securityContext: +# runAsUser: 0 + +ingress: + enabled: false + # # Boilerplate config for code-server functionality, be sure to make changes to suit your environment + # additionalIngresses: + # - enabled: true + # nameSuffix: "vscode" + # serviceName: appdaemon-vscode + # servicePort: 12321 + # annotations: + # kubernetes.io/ingress.class: "nginx" + # hosts: + # - host: appdaemon-editor.k8s-at-home.com + # paths: + # - path: / + # pathType: Prefix + # tls: + # - hosts: + # - appdaemon-editor.k8s-at-home.com + +persistence: + config: + enabled: false + emptyDir: false + mountPath: /conf + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + # storageClass: "-" + # accessMode: ReadWriteOnce + # size: 1Gi + ## Set to true to retain the PVC upon helm uninstall + # skipuninstall: false + # existingClaim: ""