From 514e251219a55919184d2e4e5b8cef092345ae31 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Thu, 27 Feb 2025 13:29:57 +0100 Subject: [PATCH] fix(grampsweb): add global (and improve docs) --- grampsweb/Chart.yaml | 2 +- grampsweb/README.md | 14 ++++++++------ grampsweb/templates/deployment.yaml | 8 +++++--- grampsweb/values.yaml | 16 ++++++++++++---- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/grampsweb/Chart.yaml b/grampsweb/Chart.yaml index 5bb72f0..01d22cf 100644 --- a/grampsweb/Chart.yaml +++ b/grampsweb/Chart.yaml @@ -3,7 +3,7 @@ name: grampsweb description: A Helm chart for gramps web icon: https://raw.githubusercontent.com/gramps-project/Gramps.js/main/images/icon512.png type: application -version: "0.2.9" +version: "0.2.10" # renovate: image=ghcr.io/gramps-project/grampsweb appVersion: "25.2.0" maintainers: diff --git a/grampsweb/README.md b/grampsweb/README.md index fdf70f8..d180581 100644 --- a/grampsweb/README.md +++ b/grampsweb/README.md @@ -7,7 +7,7 @@ description: "A Helm chart for gramps web" # grampsweb -![Version: 0.2.9](https://img.shields.io/badge/Version-0.2.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 25.2.0](https://img.shields.io/badge/AppVersion-25.2.0-informational?style=flat-square) +![Version: 0.2.10](https://img.shields.io/badge/Version-0.2.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 25.2.0](https://img.shields.io/badge/AppVersion-25.2.0-informational?style=flat-square) A Helm chart for gramps web @@ -49,6 +49,8 @@ helm uninstall grampsweb-release | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | fullnameOverride | 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 | | gramps.baseURL | string | `"https://gramps.example.org"` | Base URL where the API can be reached (e.g. https://mygramps.mydomain.com/). This is necessary e.g. to build correct passwort reset links | | gramps.mail.from | string | `nil` | "From" address for automated e-mails | | gramps.mail.host | string | `nil` | SMTP server host (e.g. for sending password reset e-mails) | @@ -58,10 +60,10 @@ helm uninstall grampsweb-release | gramps.mail.username | string | `nil` | SMTP server username | | gramps.mediaPrefixTree | bool | `false` | whether or not to use a separate subfolder for the media files of each tree. Defaults to False, but strongly recommend to use True in a multi-tree setup | | gramps.tree | string | `"Gramps Web"` | To enable multi-tree support, the TREE config option must be set to a single asterisk `*` | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.registry | string | `"ghcr.io"` | | -| image.repository | string | `"gramps-project/grampsweb"` | | -| image.tag | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. (could be overwritten by global.image.pullPolicy) | +| image.registry | string | `"ghcr.io"` | image registry (could be overwritten by global.image.registry) | +| image.repository | string | `"gramps-project/grampsweb"` | 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 | `""` | | @@ -86,7 +88,7 @@ helm uninstall grampsweb-release | podAnnotations | object | `{}` | | | podLabels | object | `{}` | | | podSecurityContext | object | `{}` | | -| replicaCount | int | `1` | | +| replicaCount | int | `1` | replicas | | resources | object | `{}` | | | securityContext | object | `{}` | | | service.port | int | `5000` | | diff --git a/grampsweb/templates/deployment.yaml b/grampsweb/templates/deployment.yaml index f3e15ae..6ce7236 100644 --- a/grampsweb/templates/deployment.yaml +++ b/grampsweb/templates/deployment.yaml @@ -19,7 +19,7 @@ spec: {{- end }} labels: {{- include "grampsweb.labels" . | nindent 8 }} - {{- with .Values.podLabels }} + {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -34,8 +34,10 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .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 }} envFrom: - secretRef: name: {{ include "grampsweb.fullname" . }} diff --git a/grampsweb/values.yaml b/grampsweb/values.yaml index 5427161..9a5c5f5 100644 --- a/grampsweb/values.yaml +++ b/grampsweb/values.yaml @@ -1,14 +1,22 @@ -# Default values for grampsweb. -# 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: ghcr.io + # -- image repository repository: gramps-project/grampsweb + # -- 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: "" imagePullSecrets: []