From 78795c041760912e6a7aa34bbe03fb42ffe260c9 Mon Sep 17 00:00:00 2001 From: wissam Date: Mon, 16 Aug 2021 03:26:22 +0300 Subject: [PATCH] Fix liveness and readiness probes --- charts/drone-runner-kube/Chart.yaml | 2 +- charts/drone-runner-kube/README.md | 4 ++++ charts/drone-runner-kube/templates/deployment.yaml | 14 ++++++++------ charts/drone-runner-kube/values.yaml | 8 ++++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/charts/drone-runner-kube/Chart.yaml b/charts/drone-runner-kube/Chart.yaml index f17db21..5c3642d 100644 --- a/charts/drone-runner-kube/Chart.yaml +++ b/charts/drone-runner-kube/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: drone-runner-kube -version: 1.0.1 +version: 1.0.2 appVersion: 1.0.0-beta.8 description: The Drone Kubernetes runner launches builds in Kubernetes Jobs. home: https://drone.io/ diff --git a/charts/drone-runner-kube/README.md b/charts/drone-runner-kube/README.md index 887a891..d99b5c2 100644 --- a/charts/drone-runner-kube/README.md +++ b/charts/drone-runner-kube/README.md @@ -71,6 +71,10 @@ The following tables lists the configurable parameters of the Drone-Runner-Kube | `env` | Environment variables to configure Drone-Runner-Kube container | `{}` (evaluated as a configMap) | | `secretNamesForEnv` | Array of secrets names contaning extra env vars | `[]` | | `terminationGracePeriodSeconds` | Time is seconds to wait after a runner pod receives a SIGTERM/SIGINT | `3600` | +| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` | +| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` | +| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` | +| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `20` | ### Exposure values diff --git a/charts/drone-runner-kube/templates/deployment.yaml b/charts/drone-runner-kube/templates/deployment.yaml index aa18500..176a7db 100644 --- a/charts/drone-runner-kube/templates/deployment.yaml +++ b/charts/drone-runner-kube/templates/deployment.yaml @@ -40,13 +40,15 @@ spec: containerPort: 3000 protocol: TCP livenessProbe: - httpGet: - path: / - port: http + tcpSocket: + port: 3000 + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} readinessProbe: - httpGet: - path: / - port: http + tcpSocket: + port: 3000 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} resources: {{- toYaml .Values.resources | nindent 12 }} envFrom: diff --git a/charts/drone-runner-kube/values.yaml b/charts/drone-runner-kube/values.yaml index 7a23d19..03945eb 100644 --- a/charts/drone-runner-kube/values.yaml +++ b/charts/drone-runner-kube/values.yaml @@ -86,6 +86,14 @@ tolerations: [] affinity: {} +## Probes +readinessProbe: + initialDelaySeconds: 5 + periodSeconds: 10 +livenessProbe: + initialDelaySeconds: 15 + periodSeconds: 20 + ## If you'd like to make additional files or volumes available to the runner, declare additional ## Volumes here per the Pod spec's "volumes" section. ## Ref: https://kubernetes.io/docs/concepts/storage/volumes/