From c75e7d40340c66c086b0075b11feb5ffef343778 Mon Sep 17 00:00:00 2001 From: Javier Holguera Date: Mon, 25 Jun 2018 18:57:03 +0100 Subject: [PATCH] schema-registry - Templating for liveness/readiness probes (#6301) * incubator/schema-registry v0.4.4 - templating for liveness/readiness probes * Remove unnecessary '}' that breaks deployment template --- incubator/schema-registry/Chart.yaml | 2 +- .../schema-registry/templates/deployment.yaml | 21 +++++++++++++++++-- incubator/schema-registry/values.yaml | 10 +++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/incubator/schema-registry/Chart.yaml b/incubator/schema-registry/Chart.yaml index f874a0037e..261fe87ac0 100644 --- a/incubator/schema-registry/Chart.yaml +++ b/incubator/schema-registry/Chart.yaml @@ -1,6 +1,6 @@ name: schema-registry home: https://docs.confluent.io/current/schema-registry/docs/index.html -version: 0.4.3 +version: 0.4.4 appVersion: 4.0.1 keywords: - confluent diff --git a/incubator/schema-registry/templates/deployment.yaml b/incubator/schema-registry/templates/deployment.yaml index 08ff8f7952..6c78d7e76e 100644 --- a/incubator/schema-registry/templates/deployment.yaml +++ b/incubator/schema-registry/templates/deployment.yaml @@ -67,14 +67,31 @@ spec: httpGet: path: / port: {{ .Values.servicePort }} + {{- if not .Values.livenessProbe }} initialDelaySeconds: 10 timeoutSeconds: 5 + {{- else }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 10}} + {{- if .Values.livenessProbe.periodSeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + {{- end }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5}} + {{- if .Values.livenessProbe.successThreshold }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + {{- end }} + {{- if .Values.livenessProbe.failureThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + {{- end }} + {{- end }} readinessProbe: httpGet: path: / port: {{ .Values.servicePort }} - initialDelaySeconds: 10 - timeoutSeconds: 5 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 10}} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 5}} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} env: - name: SCHEMA_REGISTRY_HOST_NAME valueFrom: diff --git a/incubator/schema-registry/values.yaml b/incubator/schema-registry/values.yaml index aa0f01ed0a..25e1478550 100644 --- a/incubator/schema-registry/values.yaml +++ b/incubator/schema-registry/values.yaml @@ -48,6 +48,16 @@ kafkaStore: ## Additional Java arguments to pass to Kafka. # schemaRegistryOpts: -Dfoo=bar +## Readiness probe config. +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +## +readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 3 + # Options for connecting to SASL kafka brokers sasl: configPath: "/etc/kafka-config"