From 62b585a006754d1c7c5446b9ddb57c603b15ced9 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Thu, 27 Feb 2025 13:29:42 +0100 Subject: [PATCH] fix(alertmanager-ntfy): add global (and improve docs) --- alertmanager-ntfy/Chart.yaml | 2 +- alertmanager-ntfy/README.md | 14 ++++++++------ alertmanager-ntfy/templates/deployment.yaml | 6 ++++-- alertmanager-ntfy/values.yaml | 16 ++++++++++++---- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/alertmanager-ntfy/Chart.yaml b/alertmanager-ntfy/Chart.yaml index 5b2e5e1..8d3dca8 100644 --- a/alertmanager-ntfy/Chart.yaml +++ b/alertmanager-ntfy/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: alertmanager-ntfy description: Receiver for alertmanager to forward to ntfy.sh type: application -version: 0.1.5 +version: "0.1.6" # renovate: image=codeberg.org/xenrox/ntfy-alertmanager appVersion: "0.4.0" maintainers: diff --git a/alertmanager-ntfy/README.md b/alertmanager-ntfy/README.md index d36a0f3..1c3f861 100644 --- a/alertmanager-ntfy/README.md +++ b/alertmanager-ntfy/README.md @@ -7,7 +7,7 @@ description: "Receiver for alertmanager to forward to ntfy.sh" # alertmanager-ntfy -![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.0](https://img.shields.io/badge/AppVersion-0.4.0-informational?style=flat-square) +![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.0](https://img.shields.io/badge/AppVersion-0.4.0-informational?style=flat-square) Receiver for alertmanager to forward to ntfy.sh @@ -49,10 +49,12 @@ helm uninstall alertmanager-ntfy-release | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | fullnameOverride | string | `""` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.registry | string | `"codeberg.org"` | | -| image.repository | string | `"xenrox/ntfy-alertmanager"` | | -| image.tag | string | `""` | | +| global.image.pullPolicy | string | `nil` | if set it will overwrite all pullPolicy | +| global.image.registry | string | `nil` | if set it will overwrite all registry entries | +| image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. (could be overwritten by global.image.pullPolicy) | +| image.registry | string | `"codeberg.org"` | image registry (could be overwritten by global.image.registry) | +| image.repository | string | `"xenrox/ntfy-alertmanager"` | image repository | +| image.tag | string | `""` | image tag - Overrides the image tag whose default is the chart appVersion. | | imagePullSecrets | list | `[]` | | | ingress.annotations | object | `{}` | | | ingress.className | string | `""` | | @@ -84,7 +86,7 @@ helm uninstall alertmanager-ntfy-release | podAnnotations | object | `{}` | | | podLabels | object | `{}` | | | podSecurityContext | object | `{}` | | -| replicaCount | int | `1` | | +| replicaCount | int | `1` | replicas | | resources | object | `{}` | | | securityContext | object | `{}` | | | service.port | int | `80` | | diff --git a/alertmanager-ntfy/templates/deployment.yaml b/alertmanager-ntfy/templates/deployment.yaml index df66847..23240b2 100644 --- a/alertmanager-ntfy/templates/deployment.yaml +++ b/alertmanager-ntfy/templates/deployment.yaml @@ -35,8 +35,10 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.image }} + image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}" + imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }} + {{- end }} ports: - name: http containerPort: {{ .Values.ntfyAlertmanager.port }} diff --git a/alertmanager-ntfy/values.yaml b/alertmanager-ntfy/values.yaml index 405a4d0..bd800e2 100644 --- a/alertmanager-ntfy/values.yaml +++ b/alertmanager-ntfy/values.yaml @@ -1,14 +1,22 @@ -# Default values for ntfy-alertmanager. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. +global: + image: + # -- if set it will overwrite all registry entries + registry: + # -- if set it will overwrite all pullPolicy + pullPolicy: + +# -- replicas replicaCount: 1 image: + # -- image registry (could be overwritten by global.image.registry) registry: codeberg.org + # -- image repository repository: xenrox/ntfy-alertmanager + # -- This sets the pull policy for images. (could be overwritten by global.image.pullPolicy) pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. + # -- image tag - Overrides the image tag whose default is the chart appVersion. tag: "" ntfyAlertmanager: