Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Extract livenessProbe from CUSTOM_SCRIPT_PATH block and Generate readinessProbe #606

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions charts/cp-kafka-connect/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,23 @@ spec:
- name: KAFKA_JMX_PORT
value: "{{ .Values.jmx.port }}"
{{- end }}
{{- if .Values.customEnv.CUSTOM_SCRIPT_PATH }}
{{- if .Values.customEnv.CUSTOM_SCRIPT_PATH }}
command:
- /bin/bash
- -c
- |
/etc/confluent/docker/run &
$CUSTOM_SCRIPT_PATH
sleep infinity
{{- end }}
{{- if .Values.livenessProbe }}
livenessProbe:
{{ toYaml .Values.readinessProbe | trim | indent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
livenessProbe:
{{ toYaml .Values.livenessProbe | trim | indent 12 }}
{{- end }}
{{- end }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{ toYaml .Values.volumeMounts | indent 10 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/cp-kafka-connect/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ secrets:
## and errors by the ENTRYPOINT are ignored by the container
## As an example such a similar script is added to "cp-helm-charts/examples/create-connectors.sh"
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
readinessProbe:
# httpGet:
# path: /connectors
# port: 8083
# initialDelaySeconds: 30
# periodSeconds: 5
# failureThreshold: 10

livenessProbe:
# httpGet:
# path: /connectors
Expand Down