From 069ab280298a0b67dd9c5d3f736810a815bc806a Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Mon, 5 Jun 2023 16:31:07 -0500 Subject: [PATCH] :sparkles: (gotify): Add Gotify chart --- README.md | 1 + charts/gotify/.helmignore | 26 +++++++ charts/gotify/Chart.lock | 9 +++ charts/gotify/Chart.yaml | 31 ++++++++ charts/gotify/README.md | 103 ++++++++++++++++++++++++++ charts/gotify/README_CONFIG.md.gotmpl | 13 ++++ charts/gotify/icon.svg | 1 + charts/gotify/templates/NOTES.txt | 1 + charts/gotify/templates/common.yaml | 29 ++++++++ charts/gotify/values.yaml | 81 ++++++++++++++++++++ 10 files changed, 295 insertions(+) create mode 100644 charts/gotify/.helmignore create mode 100644 charts/gotify/Chart.lock create mode 100644 charts/gotify/Chart.yaml create mode 100644 charts/gotify/README.md create mode 100644 charts/gotify/README_CONFIG.md.gotmpl create mode 100644 charts/gotify/icon.svg create mode 100644 charts/gotify/templates/NOTES.txt create mode 100644 charts/gotify/templates/common.yaml create mode 100644 charts/gotify/values.yaml diff --git a/README.md b/README.md index 79fabc466..7de34ac63 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ helm delete my- | [Home Assistant esphome icon](charts/esphome/) | ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. | | [Flame flame icon](charts/flame/) | Flame is self-hosted startpage for your server. Easily manage your apps and bookmarks with built-in editors. | | [Generic Device Plugin ](charts/generic-device-plugin/) | The generic-device-plugin enables allocating generic Linux devices, such as serial devices, the FUSE device, or video cameras, to Kubernetes Pods | +| [Gotify gotify icon](charts/gotify/) | A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui) | | [Hammond hammond icon](charts/hammond/) | A self-hosted vehicle expense tracking system with support for multiple users. | | [Headscale headscale icon](charts/headscale/) | An open source, self-hosted implementation of the Tailscale control server. | | [Healthchecks healthchecks icon](charts/healthchecks/) | A cron monitoring tool written in Python & Django | diff --git a/charts/gotify/.helmignore b/charts/gotify/.helmignore new file mode 100644 index 000000000..f2409818d --- /dev/null +++ b/charts/gotify/.helmignore @@ -0,0 +1,26 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# helm-docs templates +*.gotmpl +icon.svg diff --git a/charts/gotify/Chart.lock b/charts/gotify/Chart.lock new file mode 100644 index 000000000..010f4dbdc --- /dev/null +++ b/charts/gotify/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: common + repository: https://bjw-s.github.io/helm-charts + version: 1.5.1 +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.5.6 +digest: sha256:501e0817d535d5251e38b423e8b9fab9568852f5aef4325d56631224f3454001 +generated: "2023-06-05T15:53:35.699119-05:00" diff --git a/charts/gotify/Chart.yaml b/charts/gotify/Chart.yaml new file mode 100644 index 000000000..aba5e3d74 --- /dev/null +++ b/charts/gotify/Chart.yaml @@ -0,0 +1,31 @@ +apiVersion: v2 +name: gotify +description: A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui) +home: https://charts.gabe565.com/charts/gotify/ +icon: https://raw.githubusercontent.com/gabe565/charts/main/charts/gotify/icon.svg +type: application +version: 0.0.1 +# renovate datasource=docker depName=ghcr.io/gotify/server +appVersion: 2.2.4 +kubeVersion: ">=1.22.0-0" +keywords: + - notifications +dependencies: + - name: common + repository: https://bjw-s.github.io/helm-charts + version: 1.5.1 + - name: postgresql + version: 12.5.6 + repository: https://charts.bitnami.com/bitnami + condition: postgresql.enabled +sources: + - https://github.com/gotify/server +annotations: + artifacthub.io/changes: |- + - kind: added + description: Initial release + artifacthub.io/links: |- + - name: App Source + url: https://github.com/gotify/server + - name: Chart Source + url: https://github.com/gabe565/charts/tree/main/charts/gotify diff --git a/charts/gotify/README.md b/charts/gotify/README.md new file mode 100644 index 000000000..9743a3d65 --- /dev/null +++ b/charts/gotify/README.md @@ -0,0 +1,103 @@ +# Gotify + +gotify logo + +![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) +![AppVersion: 2.2.4](https://img.shields.io/badge/AppVersion-2.2.4-informational?style=flat) + +A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui) + +**Homepage:** + +**This chart is not maintained by the upstream project and any issues with the chart should be raised +[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=gotify&version=0.0.1)** + +## Source Code + +* + +## Requirements + +Kubernetes: `>=1.22.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| | common | 1.5.1 | +| | postgresql | 12.5.6 | + +## TL;DR + +```console +helm repo add gabe565 https://charts.gabe565.com +helm repo update +helm install gotify gabe565/gotify +``` + +## Installing the Chart + +To install the chart with the release name `gotify` + +```console +helm install gotify gabe565/gotify +``` + +## Uninstalling the Chart + +To uninstall the `gotify` deployment + +```console +helm uninstall gotify +``` + +The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. + +## Configuration + +Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. +Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common). + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install gotify \ + --set env.TZ="America/New York" \ + gabe565/gotify +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install gotify gabe565/gotify -f values.yaml +``` + +## Custom configuration + +N/A + +## Values + +**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| env | object | See [values.yaml](./values.yaml) | Environment variables. [[ref]](https://gotify.net/docs/config#environment-variables) | +| env.GOTIFY_DEFAULTUSER_NAME | string | `"admin"` | Default admin username | +| env.GOTIFY_DEFAULTUSER_PASS | string | `"admin"` | Default admin password | +| env.GOTIFY_REGISTRATION | string | `"false"` | Allow registration | +| env.TZ | string | `"UTC"` | Set the container timezone | +| image.pullPolicy | string | `"IfNotPresent"` | image pull policy | +| image.repository | string | `"ghcr.io/gotify/server"` | image repository | +| image.tag | string | `"2.2.4"` | image tag | +| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. | +| persistence | object | See [values.yaml](./values.yaml) | Configure persistence settings for the chart under this key. | +| podSecurityContext.fsGroup | int | `65534` | Volume binds will be granted to `nobody` group | +| podSecurityContext.runAsGroup | int | `65534` | Run as `nobody` group | +| podSecurityContext.runAsUser | int | `65534` | Run as `nobody` user | +| postgresql | object | See [values.yaml](./values.yaml) | Enable and configure postgresql database subchart under this key. [[ref]](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) | +| service | object | See [values.yaml](./values.yaml) | Configures service settings for the chart. | + +--- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/gotify/README_CONFIG.md.gotmpl b/charts/gotify/README_CONFIG.md.gotmpl new file mode 100644 index 000000000..188063eca --- /dev/null +++ b/charts/gotify/README_CONFIG.md.gotmpl @@ -0,0 +1,13 @@ +{{- define "custom.chart.name" -}} +Gotify +{{- end -}} + +{{- define "custom.custom.configuration.header" -}} +## Custom configuration +{{- end -}} + +{{- define "custom.custom.configuration" -}} +{{ template "custom.custom.configuration.header" . }} + +N/A +{{- end -}} diff --git a/charts/gotify/icon.svg b/charts/gotify/icon.svg new file mode 100644 index 000000000..d2409fd9c --- /dev/null +++ b/charts/gotify/icon.svg @@ -0,0 +1 @@ + diff --git a/charts/gotify/templates/NOTES.txt b/charts/gotify/templates/NOTES.txt new file mode 100644 index 000000000..44ecfaa6c --- /dev/null +++ b/charts/gotify/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "bjw-s.common.lib.chart.notes" . -}} diff --git a/charts/gotify/templates/common.yaml b/charts/gotify/templates/common.yaml new file mode 100644 index 000000000..711786c6f --- /dev/null +++ b/charts/gotify/templates/common.yaml @@ -0,0 +1,29 @@ +{{/* Append the hardcoded settings */}} +{{- define "gotify.harcodedValues" -}} +env: + GOTIFY_SERVER_PORT: {{ .Values.service.main.ports.http.port }} + + {{- with .Values.postgresql }} + {{- if .enabled }} + GOTIFY_DATABASE_DIALECT: postgres + DATABASE_PASSWORD: + secretKeyRef: + name: {{ $.Release.Name }}-postgresql + key: {{ if not .auth.password }}postgres-{{ end }}password + GOTIFY_DATABASE_CONNECTION: >- + host={{ $.Release.Name }}-postgresql + port=5432 + user={{ default "postgres" .auth.username }} + dbname={{ .auth.database }} + password=$(DATABASE_PASSWORD) + sslmode=disable + {{- else }} + GOTIFY_DATABASE_DIALECT: sqlite3 + GOTIFY_DATABASE_CONNECTION: /app/data/gotify.db + {{- end }} + {{- end }} +{{- end -}} +{{- $_ := merge .Values (include "gotify.harcodedValues" . | fromYaml) -}} + +{{/* Render the templates */}} +{{ include "bjw-s.common.loader.all" . }} diff --git a/charts/gotify/values.yaml b/charts/gotify/values.yaml new file mode 100644 index 000000000..fe934a70b --- /dev/null +++ b/charts/gotify/values.yaml @@ -0,0 +1,81 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml +# + +image: + # -- image repository + repository: ghcr.io/gotify/server + # -- image pull policy + pullPolicy: IfNotPresent + # -- image tag + tag: 2.2.4 + +# -- Environment variables. [[ref]](https://gotify.net/docs/config#environment-variables) +# @default -- See [values.yaml](./values.yaml) +env: + # -- Set the container timezone + TZ: UTC + # -- Default admin username + GOTIFY_DEFAULTUSER_NAME: admin + # -- Default admin password + GOTIFY_DEFAULTUSER_PASS: admin + # -- Allow registration + GOTIFY_REGISTRATION: "false" + +# -- Configures service settings for the chart. +# @default -- See [values.yaml](./values.yaml) +service: + main: + ports: + http: + port: 80 + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See [values.yaml](./values.yaml) + main: + enabled: false + # hosts: + # - host: chart-example.local + # paths: + # - path: / + # tls: + # - secretName: chart-example.local + # hosts: + # - chart-example.local + +# -- Configure persistence settings for the chart under this key. +# @default -- See [values.yaml](./values.yaml) +persistence: + data: + enabled: false + mountPath: /app/data + retain: true + # storageClass: "" + # accessMode: ReadWriteOnce + # size: 1Gi + +podSecurityContext: + # -- Run as `nobody` user + runAsUser: 65534 + # -- Run as `nobody` group + runAsGroup: 65534 + # -- Volume binds will be granted to `nobody` group + fsGroup: 65534 + +# -- Enable and configure postgresql database subchart under this key. +# [[ref]](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) +# @default -- See [values.yaml](./values.yaml) +postgresql: + enabled: false + auth: + database: gotify + postgresPassword: changeme + primary: + persistence: + enabled: false + # storageClass: "" + # size: 8Gi