diff --git a/.github/workflows/helm-charts-test.yaml b/.github/workflows/helm-charts-test.yaml index 7abd979..42eb709 100644 --- a/.github/workflows/helm-charts-test.yaml +++ b/.github/workflows/helm-charts-test.yaml @@ -36,6 +36,35 @@ jobs: echo ${{ steps.deprecated.outputs.charts }} echo "Maintained:" echo ${{ steps.maintained.outputs.charts }} + ensure-readme-is-up-to-date: + name: Ensure ${{ matrix.chart }} README is up to date + needs: + - generate-charts + strategy: + fail-fast: false + matrix: + chart: ${{ fromJson(needs.generate-charts.outputs.maintained) }} + runs-on: ubuntu-latest + container: + image: ghcr.io/wyrihaximusnet/php:8.4-nts-alpine-dev-root + steps: + - uses: actions/checkout@v4 + - name: Move current README + run: | + mv charts/${{ matrix.chart }}/README.md charts/${{ matrix.chart }}/README.current.md + - name: Generate README.md + run: | + make generate + - name: Check that the files are the exact same + uses: LouisBrunner/diff-action@v2.0.0 + with: + old: charts/${{ matrix.chart }}/README.current.md + new: charts/${{ matrix.chart }}/README.md + mode: strict + tolerance: same + token: ${{ secrets.GITHUB_TOKEN }} + notify_check: true + notify_issue: true validate-values-schema: runs-on: ubuntu-latest name: Validate values schema json diff --git a/.gitignore b/.gitignore index cca1ffb..3a82d17 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ -charts/**/charts \ No newline at end of file +charts/**/charts +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/.helmdocsignore b/.helmdocsignore new file mode 100644 index 0000000..50c871d --- /dev/null +++ b/.helmdocsignore @@ -0,0 +1,3 @@ +charts/commento +charts/commentoplusplus +charts/horizontal-pod-autoscalers diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..571db26 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +# set all to phony +SHELL=bash + +.PHONY: * + +generate: + docker run -v $$(pwd):/helm-docs jnorwood/helm-docs:v1.9.1 --document-dependency-values=true + diff --git a/charts/commento/README.md b/charts/commento/README.md index 4a4aa4e..0c3c471 100644 --- a/charts/commento/README.md +++ b/charts/commento/README.md @@ -1,5 +1,7 @@ # Commento +> **:exclamation: This Helm Chart is deprecated!** +

diff --git a/charts/commentoplusplus/README.md b/charts/commentoplusplus/README.md index 68f2363..2f28ca8 100644 --- a/charts/commentoplusplus/README.md +++ b/charts/commentoplusplus/README.md @@ -1,5 +1,7 @@ # Commento++ +> **:exclamation: This Helm Chart is deprecated!** +

diff --git a/charts/commons/.helmignore b/charts/commons/.helmignore index 50af031..367778b 100644 --- a/charts/commons/.helmignore +++ b/charts/commons/.helmignore @@ -20,3 +20,10 @@ .idea/ *.tmproj .vscode/ +# OWNERS file for Kubernetes +OWNERS +# Chart testing +ci/ +library-ci/ +# README template +*.gotmpl diff --git a/charts/commons/Chart.yaml b/charts/commons/Chart.yaml index 1005049..e129097 100644 --- a/charts/commons/Chart.yaml +++ b/charts/commons/Chart.yaml @@ -8,3 +8,4 @@ version: 0.1.1 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net + url: https://wyrihaximus.net diff --git a/charts/commons/README.md b/charts/commons/README.md index 90aafc2..17b3e6e 100644 --- a/charts/commons/README.md +++ b/charts/commons/README.md @@ -4,6 +4,8 @@

+![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) + Opinionated helm library chart containing metadata helpers for helm application charts. Example deployment using helpers from this chart: @@ -74,3 +76,12 @@ spec: topologyKey: "kubernetes.io/hostname" ``` + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| WyriHaximus | | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/commons/README.md.gotmpl b/charts/commons/README.md.gotmpl new file mode 100644 index 0000000..87c6fe6 --- /dev/null +++ b/charts/commons/README.md.gotmpl @@ -0,0 +1,90 @@ +# Commons + +{{ template "chart.deprecationWarning" . }} + +

+ +

+ +{{ template "chart.badgesSection" . }} + +Opinionated helm library chart containing metadata helpers for helm application charts. + +Example deployment using helpers from this chart: +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ "{{" }} template "commons.fullname" . {{ "}}" }} + labels: + {{ "{{-" }} include "commons.labels" . | nindent 4 {{ "}}" }} + app.kubernetes.io/component: controller +spec: + selector: + matchLabels: + {{ "{{-" }} include "commons.selectorLabels" . | nindent 6 {{ "}}" }} + replicas: 1 + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9696" + labels: + {{ "{{-" }} include "commons.labels" . | nindent 8 {{ "}}" }} + spec: + containers: + - name: default-backend + image: "ghcr.io/wyrihaximusnet/default-backend:random" + imagePullPolicy: Always + ports: + - name: default-backend + containerPort: 6969 + protocol: TCP + - name: metrics + containerPort: 9696 + protocol: TCP + livenessProbe: + failureThreshold: 6 + httpGet: + path: / + port: metrics + readinessProbe: + failureThreshold: 6 + httpGet: + path: / + port: metrics + startupProbe: + httpGet: + path: / + port: metrics + failureThreshold: 90 + periodSeconds: 1 + resources: + limits: + cpu: 75m + memory: 64Mi + requests: + cpu: 75m + memory: 64Mi + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: appRevision + operator: In + values: + - {{ "{{" }} template "commons.nameRevision" . {{ "}}" }} + topologyKey: "kubernetes.io/hostname" + +``` + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/cron-jobs/.helmignore b/charts/cron-jobs/.helmignore index 50af031..367778b 100644 --- a/charts/cron-jobs/.helmignore +++ b/charts/cron-jobs/.helmignore @@ -20,3 +20,10 @@ .idea/ *.tmproj .vscode/ +# OWNERS file for Kubernetes +OWNERS +# Chart testing +ci/ +library-ci/ +# README template +*.gotmpl diff --git a/charts/cron-jobs/Chart.yaml b/charts/cron-jobs/Chart.yaml index 480422a..f0a4a9f 100644 --- a/charts/cron-jobs/Chart.yaml +++ b/charts/cron-jobs/Chart.yaml @@ -9,3 +9,4 @@ kubeVersion: ">= 1.21" maintainers: - name: WyriHaximus email: helm@wyrihaximus.net + url: https://wyrihaximus.net diff --git a/charts/cron-jobs/README.md b/charts/cron-jobs/README.md index 4e19f73..c545fa7 100644 --- a/charts/cron-jobs/README.md +++ b/charts/cron-jobs/README.md @@ -4,6 +4,8 @@

+![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) + Opinionated helm library chart for easy creation of cron jobs. # Example @@ -49,4 +51,23 @@ jobs: * No restarts * No concurrently * A single container per cron job -* `cron` and `name` labels are set on each cron job with the name you give it \ No newline at end of file +* `cron` and `name` labels are set on each cron job with the name you give it + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| WyriHaximus | | | + +## Requirements + +Kubernetes: `>= 1.21` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| jobs | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/cron-jobs/README.md.gotmpl b/charts/cron-jobs/README.md.gotmpl new file mode 100644 index 0000000..68133b2 --- /dev/null +++ b/charts/cron-jobs/README.md.gotmpl @@ -0,0 +1,66 @@ +# Cron Jobs + +{{ template "chart.deprecationWarning" . }} + +

+ +

+ +{{ template "chart.badgesSection" . }} + +Opinionated helm library chart for easy creation of cron jobs. + +# Example + +Very basic example without any customization: + +```gotemplate +{{ "{{-" }} range $job := .Values.jobs {{ "}}" }} +{{ "{{-" }} include "cron-jobs.cronjob" $job {{ "-}}" }} +{{ "{{-" }} end {{ "}}" }} +``` + +The following values will run a cronjob that sleeps for 1 second any minute + +```yaml +jobs: + - name: sleep + schedule: "* * * * *" + labels: + cronjob: + key: value + jobTemplate: + key: value + container: + command: ["sleep"] + args: ["1"] + resources: + limits: + cpu: 1m + memory: 12Mi + requests: + cpu: 1m + memory: 12Mi + image: + repository: alpine + tag: 3.12 + pullPolicy: IfNotPresent +``` + +## Opinionated decisions + +* A history of `3` failed and `3` successful jobs are kept around for log checking. +* No restarts +* No concurrently +* A single container per cron job +* `cron` and `name` labels are set on each cron job with the name you give it + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/default-backend/Chart.yaml b/charts/default-backend/Chart.yaml index d081052..0f6d562 100644 --- a/charts/default-backend/Chart.yaml +++ b/charts/default-backend/Chart.yaml @@ -10,6 +10,7 @@ appVersion: random maintainers: - name: WyriHaximus email: helm@wyrihaximus.net + url: https://wyrihaximus.net dependencies: - name: commons version: ^0.1 diff --git a/charts/default-backend/README.md b/charts/default-backend/README.md index df7a6e0..1368c4a 100644 --- a/charts/default-backend/README.md +++ b/charts/default-backend/README.md @@ -4,6 +4,8 @@

+![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: random](https://img.shields.io/badge/AppVersion-random-informational?style=flat-square) + Opinionated helm chart for [`wyrihaximusnet/default-backend`](https://github.com/wyrihaximusnet/docker-default-backend). ## Provided tags @@ -13,11 +15,11 @@ Opinionated helm chart for [`wyrihaximusnet/default-backend`](https://github.com ## Configuration -This chart has very little configuration, it runs without any. But it is recommended to set the number of replica's -(until autoscaling support has been added), and optionally configure ingress hosts. Listed below is my personal -configuration. Both [`k8s.wyrihaximus.net`](https://k8s.wyrihaximus.net/) and -[`default-backend.k8s.wyrihaximus.net`](https://default-backend.k8s.wyrihaximus.net/) are active, refresh the pages a -few times. This configuration example also enables the cronjob that replaces the oldest pod, and forces the latest, +This chart has very little configuration, it runs without any. But it is recommended to set the number of replica's +(until autoscaling support has been added), and optionally configure ingress hosts. Listed below is my personal +configuration. Both [`k8s.wyrihaximus.net`](https://k8s.wyrihaximus.net/) and +[`default-backend.k8s.wyrihaximus.net`](https://default-backend.k8s.wyrihaximus.net/) are active, refresh the pages a +few times. This configuration example also enables the cronjob that replaces the oldest pod, and forces the latest, hourly retagged, Docker image to be used. It also has the horizontal pod autoscaler enabled. ```yaml @@ -35,7 +37,7 @@ ingress: - default-backend.k8s.wyrihaximus.net ``` -### +### ## Opinionated decisions @@ -48,3 +50,40 @@ ingress: * Comes with a pod * Replace oldest pod every hour to hook into the hourly random image retagging +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| WyriHaximus | | | + +## Requirements + +Kubernetes: `^1.23` + +| Repository | Name | Version | +|------------|------|---------| +| https://helm.wyrihaximus.net/ | commons | ^0.1 | +| https://helm.wyrihaximus.net/ | cron-jobs | ^1 | +| https://helm.wyrihaximus.net/ | horizontal-pod-autoscalers | ^1 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| cron.replaceOldestPodHourly | bool | `false` | | +| hpa.enable | bool | `false` | | +| hpa.maxReplicas | int | `1024` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ghcr.io/wyrihaximusnet/default-backend"` | | +| image.tag | string | `"random"` | | +| ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` | | +| ingress.annotations."kubernetes.io/tls-acme" | string | `"true"` | | +| ingress.hosts | list | `[]` | | +| replicas | int | `2` | | +| resources.limits.cpu | string | `"75m"` | | +| resources.limits.memory | string | `"64Mi"` | | +| resources.requests.cpu | string | `"75m"` | | +| resources.requests.memory | string | `"64Mi"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/default-backend/README.md.gotmpl b/charts/default-backend/README.md.gotmpl new file mode 100644 index 0000000..55afd32 --- /dev/null +++ b/charts/default-backend/README.md.gotmpl @@ -0,0 +1,63 @@ +# Default Backend + +{{ template "chart.deprecationWarning" . }} + +

+ +

+ +{{ template "chart.badgesSection" . }} + +Opinionated helm chart for [`wyrihaximusnet/default-backend`](https://github.com/wyrihaximusnet/docker-default-backend). + +## Provided tags + +* `random` - Each time when the images are build a random image is selected and build, plus every hour an image is retagged as `random` and pushed. +* `images/*` - For each directory inside [`images/`](https://github.com/WyriHaximusNet/docker-default-backend/tree/master/images). + +## Configuration + +This chart has very little configuration, it runs without any. But it is recommended to set the number of replica's +(until autoscaling support has been added), and optionally configure ingress hosts. Listed below is my personal +configuration. Both [`k8s.wyrihaximus.net`](https://k8s.wyrihaximus.net/) and +[`default-backend.k8s.wyrihaximus.net`](https://default-backend.k8s.wyrihaximus.net/) are active, refresh the pages a +few times. This configuration example also enables the cronjob that replaces the oldest pod, and forces the latest, +hourly retagged, Docker image to be used. It also has the horizontal pod autoscaler enabled. + +```yaml +replicas: 3 + +cron: + replaceOldestPodHourly: true + +hpa: + enable: true + +ingress: + hosts: + - k8s.wyrihaximus.net + - default-backend.k8s.wyrihaximus.net +``` + +### + +## Opinionated decisions + +* requires kubernetes ^1.18 +* Ports are hardcoded to `6969` for the service, and `9696` for the metrics. +* TLS is assumed to be required, and is set up based on supplied hosts in `ingress.hosts`. +* It's assumed that this helm chart will be run in it's own namespace, so the naming for all resources is kept as simple as possible. +* Prometheus export annotations are added for metric scraping. +* The default tag is random to randomly cycle through the different `404` pages. +* Comes with a pod +* Replace oldest pod every hour to hook into the hourly random image retagging + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/docker-hub-exporter/.helmignore b/charts/docker-hub-exporter/.helmignore index 50af031..367778b 100644 --- a/charts/docker-hub-exporter/.helmignore +++ b/charts/docker-hub-exporter/.helmignore @@ -20,3 +20,10 @@ .idea/ *.tmproj .vscode/ +# OWNERS file for Kubernetes +OWNERS +# Chart testing +ci/ +library-ci/ +# README template +*.gotmpl diff --git a/charts/docker-hub-exporter/Chart.yaml b/charts/docker-hub-exporter/Chart.yaml index 99301cc..bfdf6e9 100644 --- a/charts/docker-hub-exporter/Chart.yaml +++ b/charts/docker-hub-exporter/Chart.yaml @@ -9,6 +9,7 @@ appVersion: d05df48 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net + url: https://wyrihaximus.net dependencies: - name: commons version: ^0.1 diff --git a/charts/docker-hub-exporter/README.md b/charts/docker-hub-exporter/README.md index f80819d..c07f2d5 100644 --- a/charts/docker-hub-exporter/README.md +++ b/charts/docker-hub-exporter/README.md @@ -4,11 +4,13 @@

+![Version: 0.5.5](https://img.shields.io/badge/Version-0.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: d05df48](https://img.shields.io/badge/AppVersion-d05df48-informational?style=flat-square) + Opinionated helm chart for [`jessestuart/docker-hub-exporter`](https://github.com/jessestuart/docker-hub-exporter). ## Configuration -While the underlying docker image supports specific docker images this helm chart only lets you configure +While the underlying docker image supports specific docker images this helm chart only lets you configure `organisations`. There are also two dashboards included, one for InfluxDB and one for Prometheus. ### Sample configuration @@ -24,3 +26,34 @@ grafana: * Port is hardcoded to `9170` for the metrics. * Only gather metrics for full organizations and users. + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| WyriHaximus | | | + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://helm.wyrihaximus.net/ | commons | ^0.1 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| grafana.influxdb | bool | `false` | | +| grafana.prometheus | bool | `false` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"jessestuart/docker-hub-exporter"` | | +| image.tag | string | `"d05df48"` | | +| organisations | string | `"YOUR_USER_OR_ORG"` | | +| replicas | int | `1` | | +| resources.limits.cpu | string | `"5m"` | | +| resources.limits.memory | string | `"31Mi"` | | +| resources.requests.cpu | string | `"5m"` | | +| resources.requests.memory | string | `"31Mi"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/docker-hub-exporter/README.md.gotmpl b/charts/docker-hub-exporter/README.md.gotmpl new file mode 100644 index 0000000..5f2ddbc --- /dev/null +++ b/charts/docker-hub-exporter/README.md.gotmpl @@ -0,0 +1,40 @@ +# Docker Hub Exporter + +{{ template "chart.deprecationWarning" . }} + +

+ +

+ +{{ template "chart.badgesSection" . }} + +Opinionated helm chart for [`jessestuart/docker-hub-exporter`](https://github.com/jessestuart/docker-hub-exporter). + +## Configuration + +While the underlying docker image supports specific docker images this helm chart only lets you configure +`organisations`. There are also two dashboards included, one for InfluxDB and one for Prometheus. + +### Sample configuration + +```yaml +organisations: wyrihaximusnet + +grafana: + prometheus: true +``` + +## Opinionated decisions + +* Port is hardcoded to `9170` for the metrics. +* Only gather metrics for full organizations and users. + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/horizontal-pod-autoscalers/README.md b/charts/horizontal-pod-autoscalers/README.md index ac63de8..4d63d99 100644 --- a/charts/horizontal-pod-autoscalers/README.md +++ b/charts/horizontal-pod-autoscalers/README.md @@ -1,5 +1,7 @@ # Horizontal Pod Autoscalers +> **:exclamation: This Helm Chart is deprecated!** +

diff --git a/charts/pi-hole-exporter/.helmignore b/charts/pi-hole-exporter/.helmignore index 50af031..367778b 100644 --- a/charts/pi-hole-exporter/.helmignore +++ b/charts/pi-hole-exporter/.helmignore @@ -20,3 +20,10 @@ .idea/ *.tmproj .vscode/ +# OWNERS file for Kubernetes +OWNERS +# Chart testing +ci/ +library-ci/ +# README template +*.gotmpl diff --git a/charts/pi-hole-exporter/Chart.yaml b/charts/pi-hole-exporter/Chart.yaml index c54de69..1d9bbf9 100644 --- a/charts/pi-hole-exporter/Chart.yaml +++ b/charts/pi-hole-exporter/Chart.yaml @@ -9,6 +9,7 @@ appVersion: d05df48 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net + url: https://wyrihaximus.net dependencies: - name: commons version: ^0.1 diff --git a/charts/pi-hole-exporter/README.md b/charts/pi-hole-exporter/README.md index da4bacd..e964e4d 100644 --- a/charts/pi-hole-exporter/README.md +++ b/charts/pi-hole-exporter/README.md @@ -4,15 +4,17 @@

-Opinionated helm chart for [`eko/pihole-exporter`](https://github.com/eko/pihole-exporter). There is an alternative -available at [`SiM22/pihole-exporter-helm-chart`](https://github.com/SiM22/pihole-exporter-helm-chart) but that didn't +![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: d05df48](https://img.shields.io/badge/AppVersion-d05df48-informational?style=flat-square) + +Opinionated helm chart for [`eko/pihole-exporter`](https://github.com/eko/pihole-exporter). There is an alternative +available at [`SiM22/pihole-exporter-helm-chart`](https://github.com/SiM22/pihole-exporter-helm-chart) but that didn't meet my requirements. ## Configuration -By default, this chart will look for a secret name `pi-hole` in the same namespace for additional env vars to add to the -container. It is required that it contains the location of your [`PiHole`](https://pi-hole.net/) and a away to authenticate against it. Those -can be find [here](https://github.com/eko/pihole-exporter#using-docker). You can find an example secret file in +By default, this chart will look for a secret name `pi-hole` in the same namespace for additional env vars to add to the +container. It is required that it contains the location of your [`PiHole`](https://pi-hole.net/) and a away to authenticate against it. Those +can be find [here](https://github.com/eko/pihole-exporter#using-docker). You can find an example secret file in [`library-ci/secret.yaml`](https://github.com/WyriHaximusNet/helm-charts/blob/master/charts/pi-hole-exporter/library-ci/secret.yaml). ## Opinionated decisions @@ -20,3 +22,32 @@ can be find [here](https://github.com/eko/pihole-exporter#using-docker). You can * Port is hardcoded to `9617` for the metrics. * Metrics collection from Pi-Hole happens every 30 seconds. * Requires you to configure a secret in the same namespace as you deploy this chart to container additional env vars. + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| WyriHaximus | | | + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://helm.wyrihaximus.net/ | commons | ^0.1 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| configurationSecret | string | `"pi-hole"` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"ekofr/pihole-exporter"` | | +| image.tag | string | `"v0.4.0"` | | +| replicas | int | `1` | | +| resources.limits.cpu | string | `"30m"` | | +| resources.limits.memory | string | `"64Mi"` | | +| resources.requests.cpu | string | `"30m"` | | +| resources.requests.memory | string | `"64Mi"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/pi-hole-exporter/README.md.gotmpl b/charts/pi-hole-exporter/README.md.gotmpl new file mode 100644 index 0000000..f92ed2b --- /dev/null +++ b/charts/pi-hole-exporter/README.md.gotmpl @@ -0,0 +1,36 @@ +# Pi-Hole Exporter + +{{ template "chart.deprecationWarning" . }} + +

+ +

+ +{{ template "chart.badgesSection" . }} + +Opinionated helm chart for [`eko/pihole-exporter`](https://github.com/eko/pihole-exporter). There is an alternative +available at [`SiM22/pihole-exporter-helm-chart`](https://github.com/SiM22/pihole-exporter-helm-chart) but that didn't +meet my requirements. + +## Configuration + +By default, this chart will look for a secret name `pi-hole` in the same namespace for additional env vars to add to the +container. It is required that it contains the location of your [`PiHole`](https://pi-hole.net/) and a away to authenticate against it. Those +can be find [here](https://github.com/eko/pihole-exporter#using-docker). You can find an example secret file in +[`library-ci/secret.yaml`](https://github.com/WyriHaximusNet/helm-charts/blob/master/charts/pi-hole-exporter/library-ci/secret.yaml). + +## Opinionated decisions + +* Port is hardcoded to `9617` for the metrics. +* Metrics collection from Pi-Hole happens every 30 seconds. +* Requires you to configure a secret in the same namespace as you deploy this chart to container additional env vars. + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/redirect/.helmignore b/charts/redirect/.helmignore index 50af031..367778b 100644 --- a/charts/redirect/.helmignore +++ b/charts/redirect/.helmignore @@ -20,3 +20,10 @@ .idea/ *.tmproj .vscode/ +# OWNERS file for Kubernetes +OWNERS +# Chart testing +ci/ +library-ci/ +# README template +*.gotmpl diff --git a/charts/redirect/Chart.yaml b/charts/redirect/Chart.yaml index 33c3d24..b49ad6a 100644 --- a/charts/redirect/Chart.yaml +++ b/charts/redirect/Chart.yaml @@ -10,6 +10,7 @@ appVersion: random maintainers: - name: WyriHaximus email: helm@wyrihaximus.net + url: https://wyrihaximus.net dependencies: - name: commons version: ^0.1 diff --git a/charts/redirect/README.md b/charts/redirect/README.md index b23c7df..4873afb 100644 --- a/charts/redirect/README.md +++ b/charts/redirect/README.md @@ -4,6 +4,8 @@

+![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: random](https://img.shields.io/badge/AppVersion-random-informational?style=flat-square) + Opinionated helm chart for [`wyrihaximusnet/redirect`](https://github.com/wyrihaximusnet/docker-redirect). ## Provided tags @@ -15,13 +17,13 @@ Opinionated helm chart for [`wyrihaximusnet/redirect`](https://github.com/wyriha ## Configuration These images comes with 3 mandatory configuration options: -* `redirect.defaultFallbackTarget` - Requests not matching other rules will be redirected here +* `redirect.defaultFallbackTarget` - Requests not matching other rules will be redirected here * `redirect.buildin` - Can be either `nonWwwToWww` or `wwwToNonWww`, anything else will make the image error and stop There is also one optional configuration option for custom hostname based redirection: * `redirect.hosts` - from -> to based key value mapping -While the Docker image doesn't care, for the helm chart you also have to supply all the `redirect.ingressHosts` you +While the Docker image doesn't care, for the helm chart you also have to supply all the `redirect.ingressHosts` you intend to be handled by this chart. Full configuration example: @@ -61,3 +63,53 @@ Keep in mind that the configuration options are executed in the following order: * The default tag is random to randomly cycle through the different implementations, here is the [why](https://github.com/WyriHaximusNet/docker-redirect#why). * Comes with a pod * Replace oldest pod every week to hook into the weekly random image retagging + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| WyriHaximus | | | + +## Requirements + +Kubernetes: `^1.23` + +| Repository | Name | Version | +|------------|------|---------| +| https://helm.wyrihaximus.net/ | commons | ^0.1 | +| https://helm.wyrihaximus.net/ | cron-jobs | ^1 | +| https://helm.wyrihaximus.net/ | horizontal-pod-autoscalers | ^1 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| cron.replaceOldestPodWeekly | bool | `false` | | +| grafana.influxdb | bool | `false` | | +| grafana.prometheus | bool | `false` | | +| hpa.enable | bool | `false` | | +| hpa.maxReplicas | int | `1024` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ghcr.io/wyrihaximusnet/redirect"` | | +| image.tag | string | `"random"` | | +| ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` | | +| ingress.annotations."kubernetes.io/tls-acme" | string | `"true"` | | +| labels.language | string | `"random"` | | +| podSecurityContext | object | `{}` | | +| redirect.buildin | string | `"wwwToNonWww"` | | +| redirect.defaultFallbackTarget | string | `"https://www.wyrihaximus.net/"` | | +| redirect.enforceHttps | bool | `false` | | +| redirect.hosts."www.ceesjankiewiet.nl" | string | `"wyrihaximus.net"` | | +| redirect.ingressHosts[0] | string | `"www.wyrihaximus.net"` | | +| replicas | int | `2` | | +| resources.limits.cpu | string | `"50m"` | | +| resources.limits.memory | string | `"64Mi"` | | +| resources.requests.cpu | string | `"50m"` | | +| resources.requests.memory | string | `"64Mi"` | | +| securityContext | object | `{}` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `nil` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/redirect/README.md.gotmpl b/charts/redirect/README.md.gotmpl new file mode 100644 index 0000000..519d9d3 --- /dev/null +++ b/charts/redirect/README.md.gotmpl @@ -0,0 +1,77 @@ +# Redirect + +{{ template "chart.deprecationWarning" . }} + +

+ +

+ +{{ template "chart.badgesSection" . }} + +Opinionated helm chart for [`wyrihaximusnet/redirect`](https://github.com/wyrihaximusnet/docker-redirect). + +## Provided tags + +* `random` - Each time when the images are build a random image is selected and build. +* `reactphp` - Using [ReactPHP](https://reactphp.org/) +* `nodejs` - Using [NodeJS](https://nodejs.org/en/) + +## Configuration + +These images comes with 3 mandatory configuration options: +* `redirect.defaultFallbackTarget` - Requests not matching other rules will be redirected here +* `redirect.buildin` - Can be either `nonWwwToWww` or `wwwToNonWww`, anything else will make the image error and stop + +There is also one optional configuration option for custom hostname based redirection: +* `redirect.hosts` - from -> to based key value mapping + +While the Docker image doesn't care, for the helm chart you also have to supply all the `redirect.ingressHosts` you +intend to be handled by this chart. + +Full configuration example: + +```yaml +redirect: +# The default fallback is use in case the application can't find a domain to redirect to within the other configuration options + defaultFallbackTarget: https://www.wyrihaximus.net/ + enforceHttps: true + buildin: wwwToNonWww + hosts: + www.ceesjankiewiet.nl: wyrihaximus.net + ingressHosts: + - www.wyrihaximus.net + +# Enable horizontal pod autoscaler +hpa: + enable: true + +# Cron job that replaces the oldest pod weekly +cron: + replaceOldestPodWeekly: false +``` + +Keep in mind that the configuration options are executed in the following order: +1. `redirect.hosts` +2. `redirect.buildin` +3. `redirect.defaultFallbackTarget` + +## Opinionated decisions + +* requires kubernetes ^1.18 +* Ports are hardcoded to `7132` for the service, and `7133` for the metrics. +* TLS is assumed to be required, and is set up based on supplied hosts in `redirect.hosts` and `redirect.ingressHosts`. +* It's assumed that this helm chart will be run in it's own namespace, so the naming for all resources is kept as simple as possible. +* Prometheus export annotations are added for metric scraping. +* The default tag is random to randomly cycle through the different implementations, here is the [why](https://github.com/WyriHaximusNet/docker-redirect#why). +* Comes with a pod +* Replace oldest pod every week to hook into the weekly random image retagging + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/redis-db-assignment-operator/.helmignore b/charts/redis-db-assignment-operator/.helmignore index 50af031..367778b 100644 --- a/charts/redis-db-assignment-operator/.helmignore +++ b/charts/redis-db-assignment-operator/.helmignore @@ -20,3 +20,10 @@ .idea/ *.tmproj .vscode/ +# OWNERS file for Kubernetes +OWNERS +# Chart testing +ci/ +library-ci/ +# README template +*.gotmpl diff --git a/charts/redis-db-assignment-operator/Chart.yaml b/charts/redis-db-assignment-operator/Chart.yaml index ebf0a7e..072b05c 100644 --- a/charts/redis-db-assignment-operator/Chart.yaml +++ b/charts/redis-db-assignment-operator/Chart.yaml @@ -6,9 +6,11 @@ icon: https://helm.wyrihaximus.net/images/charts/redis-db-assignment-operator.pn type: application version: 1.0.6 appVersion: v1.0.1 +kubeVersion: ^1.23 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net + url: https://wyrihaximus.net dependencies: - name: commons version: ^0.1 diff --git a/charts/redis-db-assignment-operator/README.md b/charts/redis-db-assignment-operator/README.md index a785a1f..e2747ae 100644 --- a/charts/redis-db-assignment-operator/README.md +++ b/charts/redis-db-assignment-operator/README.md @@ -4,6 +4,8 @@

+![Version: 1.0.6](https://img.shields.io/badge/Version-1.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.1](https://img.shields.io/badge/AppVersion-v1.0.1-informational?style=flat-square) + Opinionated helm chart for [`wyrihaximusnet/docker-kubernetes-redis-db-assignment-operator`](https://github.com/WyriHaximusNet/docker-kubernetes-redis-db-assignment-operator). ## Configuration @@ -12,7 +14,7 @@ No configuration required! ## Example use -The following definition will create a redis-database resource on your cluster. The operator picks it up and finds a +The following definition will create a redis-database resource on your cluster. The operator picks it up and finds a redis database that isn't in use according to the operators internal state. ```yaml @@ -46,3 +48,32 @@ data: ## Opinionated decisions * State is stored in a hardcoded configmap named `redis-database-assignment-operator-in-use-dbs-list` in the namespace the operator resides in. + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| WyriHaximus | | | + +## Requirements + +Kubernetes: `^1.23` + +| Repository | Name | Version | +|------------|------|---------| +| https://helm.wyrihaximus.net/ | commons | ^0.1 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"ghcr.io/wyrihaximusnet/kubernetes-redis-db-assignment-operator"` | | +| image.tag | string | `"v1.0.8"` | | +| resources.limits.cpu | string | `"250m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"50m"` | | +| resources.requests.memory | string | `"128Mi"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/redis-db-assignment-operator/README.md.gotmpl b/charts/redis-db-assignment-operator/README.md.gotmpl new file mode 100644 index 0000000..1ea7c1d --- /dev/null +++ b/charts/redis-db-assignment-operator/README.md.gotmpl @@ -0,0 +1,62 @@ +# Redis Database Assignment Operator + +{{ template "chart.deprecationWarning" . }} + +

+ +

+ +{{ template "chart.badgesSection" . }} + +Opinionated helm chart for [`wyrihaximusnet/docker-kubernetes-redis-db-assignment-operator`](https://github.com/WyriHaximusNet/docker-kubernetes-redis-db-assignment-operator). + +## Configuration + +No configuration required! + +## Example use + +The following definition will create a redis-database resource on your cluster. The operator picks it up and finds a +redis database that isn't in use according to the operators internal state. + +```yaml +apiVersion: wyrihaximus.net/v1 +kind: RedisDatabase +metadata: + name: example +spec: + secret: + name: example-redis-database + service: + read: redis://redis-follower.redis.svc.cluster.local:6379/ + write: redis://redis-leader.redis.svc.cluster.local:6379/ +``` + +The resulting secret looks like this: + +```yaml +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: example-redis-database + namespace: default +data: + DATABASE: BASE64_ENCODED + READ: BASE64_ENCODED + WRITE: BASE64_ENCODED +``` + +## Opinionated decisions + +* State is stored in a hardcoded configmap named `redis-database-assignment-operator-in-use-dbs-list` in the namespace the operator resides in. + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }}