From 8993e6d60bcd92b13fe146e77fa09c64790475cb Mon Sep 17 00:00:00 2001 From: Travis Lyons Date: Sat, 13 Mar 2021 14:45:09 -0500 Subject: [PATCH] Added kanboard chart (#662) Signed-off-by: Travis Lyons --- charts/kanboard/.helmignore | 26 ++++ charts/kanboard/Chart.yaml | 20 +++ charts/kanboard/README.md | 126 ++++++++++++++++++ charts/kanboard/README.md.gotmpl | 145 +++++++++++++++++++++ charts/kanboard/README_CHANGELOG.md.gotmpl | 19 +++ charts/kanboard/README_CONFIG.md.gotmpl | 9 ++ charts/kanboard/templates/NOTES.txt | 1 + charts/kanboard/templates/_helpers.tpl | 32 +++++ charts/kanboard/templates/common.yaml | 29 +++++ charts/kanboard/values.yaml | 80 ++++++++++++ 10 files changed, 487 insertions(+) create mode 100644 charts/kanboard/.helmignore create mode 100644 charts/kanboard/Chart.yaml create mode 100644 charts/kanboard/README.md create mode 100644 charts/kanboard/README.md.gotmpl create mode 100644 charts/kanboard/README_CHANGELOG.md.gotmpl create mode 100644 charts/kanboard/README_CONFIG.md.gotmpl create mode 100644 charts/kanboard/templates/NOTES.txt create mode 100644 charts/kanboard/templates/_helpers.tpl create mode 100644 charts/kanboard/templates/common.yaml create mode 100644 charts/kanboard/values.yaml diff --git a/charts/kanboard/.helmignore b/charts/kanboard/.helmignore new file mode 100644 index 00000000..4379e2b3 --- /dev/null +++ b/charts/kanboard/.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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl diff --git a/charts/kanboard/Chart.yaml b/charts/kanboard/Chart.yaml new file mode 100644 index 00000000..2752f265 --- /dev/null +++ b/charts/kanboard/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +appVersion: v1.2.18 +description: Kanboard is a free and open source Kanban project management software. +name: kanboard +version: 1.0.0 +kubeVersion: ">=1.16.0-0" +keywords: +- kanboard +- kanban +home: https://github.com/k8s-at-home/charts/tree/master/charts/kanboard +icon: https://raw.githubusercontent.com/kanboard/website/master/assets/img/icon.svg +sources: +- https://github.com/kanboard/kanboard +maintainers: +- name: trly + email: trly@users.noreply.github.com +dependencies: +- name: common + repository: https://k8s-at-home.com/charts/ + version: 3.1.0 diff --git a/charts/kanboard/README.md b/charts/kanboard/README.md new file mode 100644 index 00000000..e0e879a0 --- /dev/null +++ b/charts/kanboard/README.md @@ -0,0 +1,126 @@ +# kanboard + +![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: v1.2.18](https://img.shields.io/badge/AppVersion-v1.2.18-informational?style=flat-square) + +Kanboard is a free and open source Kanban project management software. + +**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)** + +## Source Code + +* + +## Requirements + +Kubernetes: `>=1.16.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| https://k8s-at-home.com/charts/ | common | 3.1.0 | + +## TL;DR + +```console +helm repo add k8s-at-home https://k8s-at-home.com/charts/ +helm repo update +helm install kanboard k8s-at-home/kanboard +``` + +## Installing the Chart + +To install the chart with the release name `kanboard` + +```console +helm install kanboard k8s-at-home/kanboard +``` + +## Uninstalling the Chart + +To uninstall the `kanboard` deployment + +```console +helm uninstall kanboard +``` + +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](../common/values.yaml) from the [common library](../common). + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install kanboard \ + --set env.TZ="America/New York" \ + k8s-at-home/kanboard +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install kanboard k8s-at-home/kanboard -f values.yaml +``` + +## Custom configuration + +N/A + +## Values + +**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/charts/tree/master/charts/common/) + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| config.cache.dir | string | `nil` | Cache folder to use if cache driver is "file" | +| config.cache.driver | string | `"memory"` | Available cache drivers are "file" and "memory" | +| config.db.driver | string | `"sqlite"` | Database driver: sqlite, mysql or postgres | +| config.db.runMigrations | bool | `true` | Run automatically database migrations | +| config.debug | bool | `false` | | +| config.files.dir | string | `"data/files"` | Folder for uploaded files | +| config.logging.driver | string | `"stdout"` | log driver: syslog, stderr, stdout or file | +| config.mail.bcc | string | `nil` | | +| config.mail.enabled | bool | `false` | Enable/disable email configuration from the user interface | +| config.mail.from | string | `"notifications@kanboard.local"` | | +| config.plugins.api.url | string | `"https://kanboard.org/plugins.json"` | default plugin directory URL | +| config.plugins.dir | string | `"data/plugins"` | Plugin folder | +| config.plugins.installer | bool | `false` | Enable/disable plugin installation from the user interface | +| config.session.duration | int | `0` | Session duration in second (0 = until the browser is closed) | +| config.session.handler | string | `"db"` | Session handler: db or php | +| config.urlRewrite | bool | `false` | | +| env | object | `{}` | https://docs.kanboard.org/en/latest/admin_guide/docker.html#environment-variables | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"kanboard/kanboard"` | | +| image.tag | string | `"v1.2.18"` | | +| ingress.enabled | bool | `false` | | +| persistence.data | object | `{"accessMode":"ReadWriteOnce","emptyDir":false,"enabled":false,"mountPath":"/var/www/app/data","size":"1Gi"}` | enable data persistence | +| persistence.ssl | object | `{"emptyDir":false,"enabled":false,"mountPath":"/etc/nginx/ssl"}` | enable SSL persistence | +| service.port.port | int | `80` | | +| strategy.type | string | `"Recreate"` | | + +## Changelog + +All notable changes to this application Helm chart will be documented in this file but does not include changes from our common library. To read those click [here](https://github.com/k8s-at-home/charts/tree/master/charts/common/README.md#Changelog). + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +### [1.0.0] + +#### Added + +- Initial chart release + +[1.0.0]: https://github.com/k8s-at-home/charts/tree/kanboard-1.0.0/charts/home-assistant + +## Support + +- See the [Docs](https://docs.k8s-at-home.com/our-helm-charts/getting-started/) +- Open an [issue](https://github.com/k8s-at-home/charts/issues/new/choose) +- Ask a [question](https://github.com/k8s-at-home/organization/discussions) +- Join our [Discord](https://discord.gg/sTMX7Vh) community + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0) \ No newline at end of file diff --git a/charts/kanboard/README.md.gotmpl b/charts/kanboard/README.md.gotmpl new file mode 100644 index 00000000..8b868671 --- /dev/null +++ b/charts/kanboard/README.md.gotmpl @@ -0,0 +1,145 @@ +{{- define "custom.repository.organization" -}} +k8s-at-home +{{- end -}} + +{{- define "custom.repository.url" -}} +https://github.com/k8s-at-home/charts +{{- end -}} + +{{- define "custom.helm.url" -}} +https://k8s-at-home.com/charts/ +{{- end -}} + +{{- define "custom.helm.path" -}} +{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }} +{{- end -}} + +{{- define "custom.notes" -}} +**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)** +{{- end -}} + +{{- define "custom.requirements" -}} +## Requirements + +{{ template "chart.kubeVersionLine" . }} +{{- end -}} + +{{- define "custom.dependencies" -}} +## Dependencies + +{{ template "chart.requirementsTable" . }} +{{- end -}} + +{{- define "custom.install.tldr" -}} +## TL;DR + +```console +helm repo add {{ template "custom.repository.organization" . }} {{ template "custom.helm.url" . }} +helm repo update +helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} +``` +{{- end -}} + +{{- define "custom.install" -}} +## Installing the Chart + +To install the chart with the release name `{{ template "chart.name" . }}` + +```console +helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} +``` +{{- end -}} + +{{- define "custom.uninstall" -}} +## Uninstalling the Chart + +To uninstall the `{{ template "chart.name" . }}` deployment + +```console +helm uninstall {{ template "chart.name" . }} +``` + +The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. +{{- end -}} + +{{- define "custom.configuration.header" -}} +## Configuration +{{- end -}} + +{{- define "custom.configuration.readValues" -}} +Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. +Other values may be used from the [values.yaml](../common/values.yaml) from the [common library](../common). +{{- end -}} + +{{- define "custom.configuration.example.set" -}} +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install {{ template "chart.name" . }} \ + --set env.TZ="America/New York" \ + {{ template "custom.helm.path" . }} +``` +{{- end -}} + +{{- define "custom.configuration.example.file" -}} +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -f values.yaml +``` +{{- end -}} + +{{- define "custom.valuesSection" -}} +## Values + +**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/charts/tree/master/charts/common/) + +{{ template "chart.valuesTable" . }} +{{- end -}} + +{{- define "custom.support" -}} +## Support + +- See the [Docs](https://docs.k8s-at-home.com/our-helm-charts/getting-started/) +- Open an [issue](https://github.com/k8s-at-home/charts/issues/new/choose) +- Ask a [question](https://github.com/k8s-at-home/organization/discussions) +- Join our [Discord](https://discord.gg/sTMX7Vh) community +{{- end -}} + +{{ template "chart.header" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.description" . }} + +{{ template "custom.notes" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "custom.requirements" . }} + +{{ template "custom.dependencies" . }} + +{{ template "custom.install.tldr" . }} + +{{ template "custom.install" . }} + +{{ template "custom.uninstall" . }} + +{{ template "custom.configuration.header" . }} + +{{ template "custom.configuration.readValues" . }} + +{{ template "custom.configuration.example.set" . }} + +{{ template "custom.configuration.example.file" . }} + +{{ template "custom.custom.configuration" . }} + +{{ template "custom.valuesSection" . }} + +{{ template "custom.changelog" . }} + +{{ template "custom.support" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/kanboard/README_CHANGELOG.md.gotmpl b/charts/kanboard/README_CHANGELOG.md.gotmpl new file mode 100644 index 00000000..a9ec1eae --- /dev/null +++ b/charts/kanboard/README_CHANGELOG.md.gotmpl @@ -0,0 +1,19 @@ +{{- define "custom.changelog.header" -}} +## Changelog +{{- end -}} + +{{- define "custom.changelog" -}} +{{ template "custom.changelog.header" . }} + +All notable changes to this application Helm chart will be documented in this file but does not include changes from our common library. To read those click [here](https://github.com/k8s-at-home/charts/tree/master/charts/common/README.md#Changelog). + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +### [1.0.0] + +#### Added + +- Initial chart release + +[1.0.0]: https://github.com/k8s-at-home/charts/tree/kanboard-1.0.0/charts/home-assistant +{{- end -}} diff --git a/charts/kanboard/README_CONFIG.md.gotmpl b/charts/kanboard/README_CONFIG.md.gotmpl new file mode 100644 index 00000000..e93d80bf --- /dev/null +++ b/charts/kanboard/README_CONFIG.md.gotmpl @@ -0,0 +1,9 @@ +{{- define "custom.custom.configuration.header" -}} +## Custom configuration +{{- end -}} + +{{- define "custom.custom.configuration" -}} +{{ template "custom.custom.configuration.header" . }} + +N/A +{{- end -}} diff --git a/charts/kanboard/templates/NOTES.txt b/charts/kanboard/templates/NOTES.txt new file mode 100644 index 00000000..90f7b653 --- /dev/null +++ b/charts/kanboard/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "common.notes.defaultNotes" . -}} diff --git a/charts/kanboard/templates/_helpers.tpl b/charts/kanboard/templates/_helpers.tpl new file mode 100644 index 00000000..9a84b4cf --- /dev/null +++ b/charts/kanboard/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "kanboard.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "kanboard.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "kanboard.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/charts/kanboard/templates/common.yaml b/charts/kanboard/templates/common.yaml new file mode 100644 index 00000000..7540bb32 --- /dev/null +++ b/charts/kanboard/templates/common.yaml @@ -0,0 +1,29 @@ +{{/* Make sure all variables are set properly */}} +{{- include "common.values.setup" . }} + +{{/* Set non-sensitive configuration through environment variables */}} +{{- $_ := set .Values.env "DEBUG" (printf "%t" .Values.config.debug) -}} +{{- $_ := set .Values.env "ENABLE_URL_REWRITE" (printf "%t" .Values.config.urlRewrite) -}} +{{- $_ := set .Values.env "PLUGIN_DIR" (printf "%s" .Values.config.plugins.dir) -}} +{{- $_ := set .Values.env "PLUGIN_INSTALLER" (printf "%t" .Values.config.plugins.installer) -}} +{{- $_ := set .Values.env "PLUGIN_API_URL" (printf "%s" .Values.config.plugins.api.url) -}} +{{- $_ := set .Values.env "FILES_DIR" (printf "%s" .Values.config.files.dir) -}} +{{- $_ := set .Values.env "CACHE_DRIVER" (printf "%s" .Values.config.cache.driver) -}} +{{- if .Values.config.cache.dir -}} +{{- $_ := set .Values.env "CACHE_DIR" (printf "%s" .Values.config.cache.dir) -}} +{{- end -}} +{{- $_ := set .Values.env "MAIL_CONFIGURATION" (printf "%t" .Values.config.mail.enabled) -}} +{{- if .Values.config.mail.enabled -}} +{{- $_ := set .Values.env "MAIL_FROM" (printf "%s" .Values.config.mail.from) -}} +{{- if .Values.config.mail.bcc -}} +{{- $_ := set .Values.env "MAIL_BCC" (printf "%s" .Values.config.mail.bcc) -}} +{{- end -}} +{{- end -}} +{{- $_ := set .Values.env "DB_RUN_MIGRATIONS" (printf "%t" .Values.config.db.runMigrations) -}} +{{- $_ := set .Values.env "DB_DRIVER" (printf "%s" .Values.config.db.driver) -}} +{{- $_ := set .Values.env "LOG_DRIVER" (printf "%s" .Values.config.logging.driver) -}} +{{- $_ := set .Values.env "SESSION_DURATION" (printf "%v" .Values.config.session.duration) -}} +{{- $_ := set .Values.env "SESSION_HANDLER" (printf "%s" .Values.config.session.handler) -}} + +{{/* Render the templates */}} +{{ include "common.all" . }} \ No newline at end of file diff --git a/charts/kanboard/values.yaml b/charts/kanboard/values.yaml new file mode 100644 index 00000000..5ffddb1d --- /dev/null +++ b/charts/kanboard/values.yaml @@ -0,0 +1,80 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/k8s-at-home/charts/tree/master/charts/common/values.yaml +# + +image: + repository: kanboard/kanboard + pullPolicy: IfNotPresent + tag: v1.2.18 + +strategy: + type: Recreate + +# -- https://docs.kanboard.org/en/latest/admin_guide/docker.html#environment-variables +env: {} + +service: + port: + port: 80 + +ingress: + enabled: false + +persistence: + # -- enable data persistence + data: + enabled: false + emptyDir: false + mountPath: /var/www/app/data + accessMode: ReadWriteOnce + size: 1Gi + + # -- enable SSL persistence + ssl: + enabled: false + emptyDir: false + mountPath: /etc/nginx/ssl + +# https://docs.kanboard.org/en/latest/admin_guide/config_file.html +config: + debug: false + urlRewrite: false + plugins: + # -- Enable/disable plugin installation from the user interface + installer: false + # -- Plugin folder + dir: 'data/plugins' + api: + # -- default plugin directory URL + url: 'https://kanboard.org/plugins.json' + files: + # -- Folder for uploaded files + dir: 'data/files' + cache: + # -- Available cache drivers are "file" and "memory" + driver: 'memory' + # -- Cache folder to use if cache driver is "file" + dir: null + mail: + # -- Enable/disable email configuration from the user interface + enabled: false + from: 'notifications@kanboard.local' + bcc: null + db: + # -- Run automatically database migrations + runMigrations: true + # -- Database driver: sqlite, mysql or postgres + driver: sqlite + + logging: + # -- log driver: syslog, stderr, stdout or file + driver: stdout + + session: + # -- Session duration in second (0 = until the browser is closed) + duration: 0 + # -- Session handler: db or php + handler: db