From c3b8574515de4f5a2c13f36b3a00708d0858966e Mon Sep 17 00:00:00 2001 From: Damien Guihal <4045744+dguihal@users.noreply.github.com> Date: Wed, 30 Apr 2025 11:11:44 +0200 Subject: [PATCH] feat: make chart probes configurable (#1574) * feat: make chart probes configurable Allow to configure liveness/readiness probes + Add optional startup probe * fix: pR fixes and cleanups Fixes and cleanup after first review * fix: push updated chart Readme push updated chart Readme (with version update) * refactor: refactor probe configuration Refactor liveness and readiness probe configuration so they can't be removed * docs: update readme update readme --- charts/jellyseerr-chart/Chart.yaml | 2 +- charts/jellyseerr-chart/README.md | 5 +- .../templates/deployment.yaml | 34 +++++++++++ charts/jellyseerr-chart/values.yaml | 59 +++++++++++++------ 4 files changed, 79 insertions(+), 21 deletions(-) diff --git a/charts/jellyseerr-chart/Chart.yaml b/charts/jellyseerr-chart/Chart.yaml index 8d2e5caeb..5a61c0ebb 100644 --- a/charts/jellyseerr-chart/Chart.yaml +++ b/charts/jellyseerr-chart/Chart.yaml @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0" name: jellyseerr-chart description: Jellyseerr helm chart for Kubernetes type: application -version: 2.3.3 +version: 2.4.0 appVersion: "2.5.2" maintainers: - name: Jellyseerr diff --git a/charts/jellyseerr-chart/README.md b/charts/jellyseerr-chart/README.md index 98dafbe37..17a2fbf84 100644 --- a/charts/jellyseerr-chart/README.md +++ b/charts/jellyseerr-chart/README.md @@ -1,6 +1,6 @@ # jellyseerr-chart -![Version: 2.3.3](https://img.shields.io/badge/Version-2.3.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.2](https://img.shields.io/badge/AppVersion-2.5.2-informational?style=flat-square) +![Version: 2.4.0](https://img.shields.io/badge/Version-2.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.2](https://img.shields.io/badge/AppVersion-2.5.2-informational?style=flat-square) Jellyseerr helm chart for Kubernetes @@ -52,6 +52,9 @@ Kubernetes: `>=1.23.0-0` | podAnnotations | object | `{}` | | | podLabels | object | `{}` | | | podSecurityContext | object | `{}` | | +| probes.livenessProbe | object | `{}` | Configure liveness probe | +| probes.readinessProbe | object | `{}` | Configure readiness probe | +| probes.startupProbe | string | `nil` | Configure startup probe | | replicaCount | int | `1` | | | resources | object | `{}` | | | securityContext | object | `{}` | | diff --git a/charts/jellyseerr-chart/templates/deployment.yaml b/charts/jellyseerr-chart/templates/deployment.yaml index 447ecca2b..50dd82d5c 100644 --- a/charts/jellyseerr-chart/templates/deployment.yaml +++ b/charts/jellyseerr-chart/templates/deployment.yaml @@ -48,10 +48,44 @@ spec: httpGet: path: / port: http + {{- if .Values.probes.livenessProbe.initialDelaySeconds }} + initialDelaySeconds: {{ .Values.probes.livenessProbe.initialDelaySeconds }} + {{- end }} + {{- if .Values.probes.livenessProbe.periodSeconds }} + periodSeconds: {{ .Values.probes.livenessProbe.periodSeconds }} + {{- end }} + {{- if .Values.probes.livenessProbe.timeoutSeconds }} + timeoutSeconds: {{ .Values.probes.livenessProbe.timeoutSeconds }} + {{- end }} + {{- if .Values.probes.livenessProbe.successThreshold }} + successThreshold: {{ .Values.probes.livenessProbe.successThreshold }} + {{- end }} + {{- if .Values.probes.livenessProbe.failureThreshold }} + failureThreshold: {{ .Values.probes.livenessProbe.failureThreshold }} + {{- end }} readinessProbe: httpGet: path: / port: http + {{- if .Values.probes.readinessProbe.initialDelaySeconds }} + initialDelaySeconds: {{ .Values.probes.readinessProbe.initialDelaySeconds }} + {{- end }} + {{- if .Values.probes.readinessProbe.periodSeconds }} + periodSeconds: {{ .Values.probes.readinessProbe.periodSeconds }} + {{- end }} + {{- if .Values.probes.readinessProbe.timeoutSeconds }} + timeoutSeconds: {{ .Values.probes.readinessProbe.timeoutSeconds }} + {{- end }} + {{- if .Values.probes.readinessProbe.successThreshold }} + successThreshold: {{ .Values.probes.readinessProbe.successThreshold }} + {{- end }} + {{- if .Values.probes.readinessProbe.failureThreshold }} + failureThreshold: {{ .Values.probes.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.probes.startupProbe }} + startupProbe: + {{- toYaml .Values.probes.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.extraEnv }} diff --git a/charts/jellyseerr-chart/values.yaml b/charts/jellyseerr-chart/values.yaml index 861ad361b..5b703d2f3 100644 --- a/charts/jellyseerr-chart/values.yaml +++ b/charts/jellyseerr-chart/values.yaml @@ -16,6 +16,27 @@ fullnameOverride: "" strategy: type: Recreate +# Liveness / Readiness / Startup Probes +probes: + # -- Configure liveness probe + livenessProbe: {} + # initialDelaySeconds: 60 + # periodSeconds: 30 + # timeoutSeconds: 5 + # successThreshold: 1 + # failureThreshold: 5 + # -- Configure readiness probe + readinessProbe: {} + # initialDelaySeconds: 60 + # periodSeconds: 30 + # timeoutSeconds: 5 + # successThreshold: 1 + # failureThreshold: 5 + # -- Configure startup probe + startupProbe: null + # tcpSocket: + # port: http + # -- Environment variables to add to the jellyseerr pods extraEnv: [] # -- Environment variables from secrets or configmaps to add to the jellyseerr pods @@ -36,15 +57,15 @@ podAnnotations: {} podLabels: {} podSecurityContext: {} - # fsGroup: 2000 +# fsGroup: 2000 securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 +# capabilities: +# drop: +# - ALL +# readOnlyRootFilesystem: true +# runAsNonRoot: true +# runAsUser: 1000 service: type: ClusterIP @@ -70,8 +91,8 @@ ingress: enabled: false ingressClassName: "" annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" hosts: - host: chart-example.local paths: @@ -83,16 +104,16 @@ ingress: # - chart-example.local resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi +# We usually recommend not to specify default resources and to leave this as a conscious +# choice for the user. This also increases chances charts run on environments with little +# resources, such as Minikube. If you do want to specify resources, uncomment the following +# lines, adjust them as necessary, and remove the curly braces after 'resources:'. +# limits: +# cpu: 100m +# memory: 128Mi +# requests: +# cpu: 100m +# memory: 128Mi # -- Additional volumes on the output Deployment definition. volumes: []