From cb1d6b70dccce47f00346f247970c47a90e833f1 Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Thu, 21 Jan 2021 19:23:16 +0100 Subject: [PATCH] [plex] Add ability to disable and customize probes (#505) --- charts/plex/Chart.yaml | 2 +- charts/plex/templates/deployment.yaml | 25 +++++++++---------------- charts/plex/values.yaml | 12 ++++++++++++ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/charts/plex/Chart.yaml b/charts/plex/Chart.yaml index 8ee10aac..566f7f83 100644 --- a/charts/plex/Chart.yaml +++ b/charts/plex/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 1.20.2.3402 description: Plex Media Server name: plex -version: 2.2.0 +version: 2.3.0 keywords: - plex home: https://plex.tv/ diff --git a/charts/plex/templates/deployment.yaml b/charts/plex/templates/deployment.yaml index c42fa742..485a9c90 100644 --- a/charts/plex/templates/deployment.yaml +++ b/charts/plex/templates/deployment.yaml @@ -191,25 +191,18 @@ spec: value: "customCertificateDomain={{.Values.certificate.pkcsMangler.setPlexPreferences.customCertificateDomain}}" {{- end }} {{- end }} + {{- if .Values.probes.readiness.enabled }} readinessProbe: - httpGet: - path: /identity - port: 32400 - failureThreshold: {{ .Values.probes.readiness.failureThreshold }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + {{- omit .Values.probes.readiness "enabled" | toYaml | nindent 12 }} + {{- end }} + {{- if .Values.probes.liveness.enabled }} livenessProbe: - httpGet: - path: /identity - port: 32400 - failureThreshold: {{ .Values.probes.liveness.failureThreshold }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- omit .Values.probes.liveness "enabled" | toYaml | nindent 12 }} + {{- end }} + {{- if .Values.probes.startup.enabled }} startupProbe: - httpGet: - path: /identity - port: 32400 - initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }} - failureThreshold: {{ .Values.probes.startup.failureThreshold }} - periodSeconds: {{ .Values.probes.startup.periodSeconds }} + {{- omit .Values.probes.startup "enabled" | toYaml | nindent 12 }} + {{- end }} volumeMounts: {{- if .Values.persistence.data.enabled }} - name: data diff --git a/charts/plex/values.yaml b/charts/plex/values.yaml index e3c452a1..5dd8752b 100644 --- a/charts/plex/values.yaml +++ b/charts/plex/values.yaml @@ -319,12 +319,24 @@ logging: # Probes configuration probes: liveness: + enabled: true + httpGet: + path: /identity + port: 32400 failureThreshold: 5 periodSeconds: 10 readiness: + enabled: true + httpGet: + path: /identity + port: 32400 failureThreshold: 5 periodSeconds: 10 startup: + enabled: true + httpGet: + path: /identity + port: 32400 initialDelaySeconds: 5 failureThreshold: 30 periodSeconds: 10