From 9246ef58dc901eccf749a550919649046ff67945 Mon Sep 17 00:00:00 2001 From: David Young Date: Sat, 4 Jun 2022 00:06:51 +1200 Subject: [PATCH] [gatus] Add gatus chart (#1569) * Add gatus chart Signed-off-by: David Young * Correct sloppy PR Signed-off-by: David Young * Trim trailing whitespace Signed-off-by: David Young * Fix port Signed-off-by: David Young --- charts/stable/gatus/.helmignore | 26 ++++++++ charts/stable/gatus/Chart.yaml | 22 +++++++ charts/stable/gatus/README_CONFIG.md.gotmpl | 9 +++ charts/stable/gatus/templates/common.yaml | 26 ++++++++ charts/stable/gatus/values.yaml | 66 +++++++++++++++++++++ 5 files changed, 149 insertions(+) create mode 100644 charts/stable/gatus/.helmignore create mode 100644 charts/stable/gatus/Chart.yaml create mode 100644 charts/stable/gatus/README_CONFIG.md.gotmpl create mode 100644 charts/stable/gatus/templates/common.yaml create mode 100644 charts/stable/gatus/values.yaml diff --git a/charts/stable/gatus/.helmignore b/charts/stable/gatus/.helmignore new file mode 100644 index 00000000..4379e2b3 --- /dev/null +++ b/charts/stable/gatus/.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/stable/gatus/Chart.yaml b/charts/stable/gatus/Chart.yaml new file mode 100644 index 00000000..a474fa7c --- /dev/null +++ b/charts/stable/gatus/Chart.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: v2 +appVersion: v3.8.0 +description: A developer-oriented health dashboard that gives you the ability to monitor your services using HTTP, ICMP, TCP, and even DNS queries. +icon: https://github.com/TwiN/gatus/raw/master/.github/assets/logo-with-dark-text.png +home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/gatus +name: gatus +version: 1.0.0 +kubeVersion: ">=1.16.0-0" +sources: + - https://github.com/TwiN/gatus +maintainers: + - name: funkypenguin + email: davidy@funkypenguin.co.nz +dependencies: + - name: common + repository: https://library-charts.k8s-at-home.com + version: 4.4.2 +annotations: + artifacthub.io/changes: |- + - kind: added + description: Initial version diff --git a/charts/stable/gatus/README_CONFIG.md.gotmpl b/charts/stable/gatus/README_CONFIG.md.gotmpl new file mode 100644 index 00000000..e93d80bf --- /dev/null +++ b/charts/stable/gatus/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/stable/gatus/templates/common.yaml b/charts/stable/gatus/templates/common.yaml new file mode 100644 index 00000000..7a50239b --- /dev/null +++ b/charts/stable/gatus/templates/common.yaml @@ -0,0 +1,26 @@ +{{/* Make sure all variables are set properly */}} +{{- include "common.values.setup" . }} + +{{/* Append the hardcoded settings */}} +{{- define "gatus.harcodedValues" -}} + {{- if .Values.configmap.config.enabled }} + {{/* merge gatus specific annotations with podAnnotations*/}} + podAnnotations: + configmap/checksum: "{{ .Values.configmap.config.data | toYaml | sha256sum }}" + {{- end }} + + {{- if .Values.configmap.config.enabled }} + {{/* Append the configMap volume to the volumes */}} + persistence: + config: + enabled: true + type: "configMap" + name: "{{ include "common.names.fullname" . }}-config" + mountPath: "/www/assets/config.yml" + subPath: "config.yml" + {{- end }} +{{- end -}} +{{- $_ := mergeOverwrite .Values (include "gatus.harcodedValues" . | fromYaml) -}} + +{{/* Render the templates */}} +{{ include "common.all" . }} diff --git a/charts/stable/gatus/values.yaml b/charts/stable/gatus/values.yaml new file mode 100644 index 00000000..894c54a4 --- /dev/null +++ b/charts/stable/gatus/values.yaml @@ -0,0 +1,66 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml +# + +image: + # -- image repository + repository: twinproduction/gatus + # -- image tag + # @default -- chart.appVersion + tag: + # -- image pull policy + pullPolicy: IfNotPresent + +# -- environment variables. +# @default -- See below +env: + # -- Set the container timezone + TZ: UTC + +# -- Configures service settings for the chart. +# @default -- See values.yaml +service: + main: + ports: + http: + port: 8080 + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See values.yaml + main: + enabled: false + +# -- Configure persistence settings for the chart under this key. +# @default -- See values.yaml +persistence: + config: + enabled: "true" + mountPath: "/config/config.yaml" + subPath: "config.yaml" + type: "custom" + volumeSpec: + configMap: + name: gatus-config + +configmap: + config: + # -- Store gatus configuration as a ConfigMap + enabled: true + # -- Gatus configuration. See [image documentation](https://github.com/TwiN/gatus/blob/master/config.yaml) for more information. + # @default -- See values.yaml + data: + config.yaml: | + storage: + type: sqlite + path: /data/data.db + + endpoints: + - name: Google + url: "https://www.google.com" + interval: 5m + conditions: + - "[STATUS] == 200"