From 457776fe7c07b9a4fe2c3da02e10cadf120594e7 Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Tue, 28 Jul 2020 03:57:58 +0200 Subject: [PATCH] [adguard-home] Add basic support for probes, add ability to change deployment strategy (#292) * [adguard-home] Add basic support for probes * [adguard-home] Bump chart version * [adguard-home] Add ability to change deployment strategy * [adguard-home] Change default strategy to Recreate --- charts/adguard-home/Chart.yaml | 2 +- charts/adguard-home/templates/deployment.yaml | 32 +++++++++++++++++++ charts/adguard-home/values.yaml | 8 +++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/charts/adguard-home/Chart.yaml b/charts/adguard-home/Chart.yaml index 409e8271..2b82665d 100644 --- a/charts/adguard-home/Chart.yaml +++ b/charts/adguard-home/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "v0.8" description: DNS proxy as ad-blocker for local network name: adguard-home -version: 1.0.0 +version: 1.1.0 keywords: - adguard-home - adguard diff --git a/charts/adguard-home/templates/deployment.yaml b/charts/adguard-home/templates/deployment.yaml index 203295db..bf53c593 100644 --- a/charts/adguard-home/templates/deployment.yaml +++ b/charts/adguard-home/templates/deployment.yaml @@ -9,6 +9,8 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: 1 + strategy: + type: {{ .Values.strategyType }} revisionHistoryLimit: 3 selector: matchLabels: @@ -65,6 +67,36 @@ spec: containerPort: 853 protocol: TCP {{- end }} + {{- if .Values.probes.liveness.enabled }} + livenessProbe: + httpGet: + path: /login.html + port: http + scheme: HTTP + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + failureThreshold: {{ .Values.probes.liveness.failureThreshold }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end }} + {{- if .Values.probes.readiness.enabled }} + readinessProbe: + httpGet: + path: /login.html + port: http + scheme: HTTP + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + failureThreshold: {{ .Values.probes.readiness.failureThreshold }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + {{- end }} + {{- if .Values.probes.startup.enabled }} + startupProbe: + httpGet: + path: /login.html + port: http + scheme: HTTP + initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }} + failureThreshold: {{ .Values.probes.startup.failureThreshold }} + periodSeconds: {{ .Values.probes.startup.periodSeconds }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumes: diff --git a/charts/adguard-home/values.yaml b/charts/adguard-home/values.yaml index 4da3d255..03bdd4b6 100644 --- a/charts/adguard-home/values.yaml +++ b/charts/adguard-home/values.yaml @@ -1,3 +1,6 @@ +# upgrade strategy type (e.g. Recreate or RollingUpdate) +strategyType: Recreate + image: repository: adguard/adguardhome tag: v0.102.0 @@ -25,12 +28,17 @@ ingress: # Probes configuration probes: liveness: + enabled: true + initialDelaySeconds: 5 failureThreshold: 5 periodSeconds: 10 readiness: + enabled: false + initialDelaySeconds: 5 failureThreshold: 5 periodSeconds: 10 startup: + enabled: false initialDelaySeconds: 5 failureThreshold: 30 periodSeconds: 10