Skip to content

Commit

Permalink
Adding ability to define a custom startup probe
Browse files Browse the repository at this point in the history
  • Loading branch information
udnay committed Sep 23, 2024
1 parent 950a699 commit c7f3e79
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ For details see the [`values.yaml`](values.yaml) file.
| `statefulset.resources` | Resource requests and limits for StatefulSet Pods | `{}` |
| `statefulset.customLivenessProbe` | Custom Liveness probe | `{}` |
| `statefulset.customReadinessProbe` | Custom Rediness probe | `{}` |
| `statefulset.customStartupProbe` | Custom Startup probe | `{}` |
| `statefulset.terminationGracePeriodSeconds` | Termination grace period for CRDB statefulset pods | `300` |
| `service.ports.grpc.external.port` | CockroachDB primary serving port in Services | `26257` |
| `service.ports.grpc.external.name` | CockroachDB primary serving port name in Services | `grpc` |
Expand Down
10 changes: 10 additions & 0 deletions build/templates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ statefulset:
# scheme: HTTPS
# initialDelaySeconds: 30
# periodSeconds: 5

# Custom Startup Probe
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes
customStartupProbe: {}
# httpGet:
# path: /health
# port: http
# scheme: HTTPS
# initialDelaySeconds: 30
# periodSeconds: 5

securityContext:
enabled: true
Expand Down
1 change: 1 addition & 0 deletions cockroachdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ For details see the [`values.yaml`](values.yaml) file.
| `statefulset.resources` | Resource requests and limits for StatefulSet Pods | `{}` |
| `statefulset.customLivenessProbe` | Custom Liveness probe | `{}` |
| `statefulset.customReadinessProbe` | Custom Rediness probe | `{}` |
| `statefulset.customStartupProbe` | Custom Startup probe | `{}` |
| `statefulset.terminationGracePeriodSeconds` | Termination grace period for CRDB statefulset pods | `300` |
| `service.ports.grpc.external.port` | CockroachDB primary serving port in Services | `26257` |
| `service.ports.grpc.external.name` | CockroachDB primary serving port name in Services | `grpc` |
Expand Down
4 changes: 4 additions & 0 deletions cockroachdb/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ spec:
mountPath: /cockroach/log-config
readOnly: true
{{- end }}
{{- if .Values.statefulset.customStartupProbe }}
startupProbe:
{{ toYaml .Values.statefulset.customStartupProbe | nindent 12 }}
{{- end }}
livenessProbe:
{{- if .Values.statefulset.customLivenessProbe }}
{{ toYaml .Values.statefulset.customLivenessProbe | nindent 12 }}
Expand Down
10 changes: 10 additions & 0 deletions cockroachdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,16 @@ statefulset:
# scheme: HTTPS
# initialDelaySeconds: 30
# periodSeconds: 5

# Custom Startup Probe
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes
customStartupProbe: {}
# httpGet:
# path: /health
# port: http
# scheme: HTTPS
# initialDelaySeconds: 30
# periodSeconds: 5

securityContext:
enabled: true
Expand Down

0 comments on commit c7f3e79

Please sign in to comment.