Skip to content

Commit

Permalink
[Enhancement] add failure seconds for liveness and readiness (#309)
Browse files Browse the repository at this point in the history
Signed-off-by: yandongxiao <[email protected]>
  • Loading branch information
yandongxiao authored Nov 10, 2023
1 parent 7c82c90 commit 672c7d6
Show file tree
Hide file tree
Showing 12 changed files with 284 additions and 31 deletions.
96 changes: 88 additions & 8 deletions config/crd/bases/starrocks.com_starrocksclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,16 @@ spec:
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
livenessProbeFailureSeconds:
description: LivenessProbeFailureSeconds defines the total failure
seconds of liveness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the liveness will fail if
the pod can't respond in 15 seconds. Your LivenessProbeFailureSeconds
is the total time of seconds before the container restart. If
LivenessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -1118,6 +1128,16 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
readinessProbeFailureSeconds:
description: ReadinessProbeFailureSeconds defines the total failure
seconds of readiness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the readiness will fail if
the pod can't respond in 15 seconds. Your ReadinessProbeFailureSeconds
is the total time of seconds before pods becomes not ready.
If ReadinessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
replicas:
description: 'Replicas is the number of desired Pod. When HPA
policy is enabled with a fixed replica count: every time the
Expand Down Expand Up @@ -1231,13 +1251,13 @@ spec:
type: string
startupProbeFailureSeconds:
description: StartupProbeFailureSeconds defines the total failure
seconds of startupProbe. Default failureThreshold is 60 and
seconds of startup Probe. Default failureThreshold is 60 and
the periodSeconds is 5, this means the startup will fail if
the pod can't start in 300 seconds. Your StartupProbeFailureSeconds
is the total time of seconds before startupProbe give up and
fail the container start. If startupProbeFailureSeconds can't
be divided by defaultPeriodSeconds, the failureThreshold will
be rounded up
be rounded up.
format: int32
type: integer
storageVolumes:
Expand Down Expand Up @@ -3065,6 +3085,16 @@ spec:
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
livenessProbeFailureSeconds:
description: LivenessProbeFailureSeconds defines the total failure
seconds of liveness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the liveness will fail if
the pod can't respond in 15 seconds. Your LivenessProbeFailureSeconds
is the total time of seconds before the container restart. If
LivenessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -3076,6 +3106,16 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
readinessProbeFailureSeconds:
description: ReadinessProbeFailureSeconds defines the total failure
seconds of readiness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the readiness will fail if
the pod can't respond in 15 seconds. Your ReadinessProbeFailureSeconds
is the total time of seconds before pods becomes not ready.
If ReadinessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
replicas:
description: 'Replicas is the number of desired Pod. When HPA
policy is enabled with a fixed replica count: every time the
Expand Down Expand Up @@ -3189,13 +3229,13 @@ spec:
type: string
startupProbeFailureSeconds:
description: StartupProbeFailureSeconds defines the total failure
seconds of startupProbe. Default failureThreshold is 60 and
seconds of startup Probe. Default failureThreshold is 60 and
the periodSeconds is 5, this means the startup will fail if
the pod can't start in 300 seconds. Your StartupProbeFailureSeconds
is the total time of seconds before startupProbe give up and
fail the container start. If startupProbeFailureSeconds can't
be divided by defaultPeriodSeconds, the failureThreshold will
be rounded up
be rounded up.
format: int32
type: integer
storageVolumes:
Expand Down Expand Up @@ -4193,6 +4233,16 @@ spec:
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
livenessProbeFailureSeconds:
description: LivenessProbeFailureSeconds defines the total failure
seconds of liveness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the liveness will fail if
the pod can't respond in 15 seconds. Your LivenessProbeFailureSeconds
is the total time of seconds before the container restart. If
LivenessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -4204,6 +4254,16 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
readinessProbeFailureSeconds:
description: ReadinessProbeFailureSeconds defines the total failure
seconds of readiness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the readiness will fail if
the pod can't respond in 15 seconds. Your ReadinessProbeFailureSeconds
is the total time of seconds before pods becomes not ready.
If ReadinessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
replicas:
description: 'Replicas is the number of desired Pod. When HPA
policy is enabled with a fixed replica count: every time the
Expand Down Expand Up @@ -4294,13 +4354,13 @@ spec:
type: string
startupProbeFailureSeconds:
description: StartupProbeFailureSeconds defines the total failure
seconds of startupProbe. Default failureThreshold is 60 and
seconds of startup Probe. Default failureThreshold is 60 and
the periodSeconds is 5, this means the startup will fail if
the pod can't start in 300 seconds. Your StartupProbeFailureSeconds
is the total time of seconds before startupProbe give up and
fail the container start. If startupProbeFailureSeconds can't
be divided by defaultPeriodSeconds, the failureThreshold will
be rounded up
be rounded up.
format: int32
type: integer
storageVolumes:
Expand Down Expand Up @@ -5435,6 +5495,16 @@ spec:
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
livenessProbeFailureSeconds:
description: LivenessProbeFailureSeconds defines the total failure
seconds of liveness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the liveness will fail if
the pod can't respond in 15 seconds. Your LivenessProbeFailureSeconds
is the total time of seconds before the container restart. If
LivenessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -5446,6 +5516,16 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
readinessProbeFailureSeconds:
description: ReadinessProbeFailureSeconds defines the total failure
seconds of readiness Probe. Default failureThreshold is 3 and
the periodSeconds is 5, this means the readiness will fail if
the pod can't respond in 15 seconds. Your ReadinessProbeFailureSeconds
is the total time of seconds before pods becomes not ready.
If ReadinessProbeFailureSeconds can't be divided by defaultPeriodSeconds,
the failureThreshold will be rounded up.
format: int32
type: integer
replicas:
description: 'Replicas is the number of desired Pod. When HPA
policy is enabled with a fixed replica count: every time the
Expand Down Expand Up @@ -5559,13 +5639,13 @@ spec:
type: string
startupProbeFailureSeconds:
description: StartupProbeFailureSeconds defines the total failure
seconds of startupProbe. Default failureThreshold is 60 and
seconds of startup Probe. Default failureThreshold is 60 and
the periodSeconds is 5, this means the startup will fail if
the pod can't start in 300 seconds. Your StartupProbeFailureSeconds
is the total time of seconds before startupProbe give up and
fail the container start. If startupProbeFailureSeconds can't
be divided by defaultPeriodSeconds, the failureThreshold will
be rounded up
be rounded up.
format: int32
type: integer
storageVolumes:
Expand Down
24 changes: 24 additions & 0 deletions deploy/starrocks.com_starrocksclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
livenessProbeFailureSeconds:
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -515,6 +518,9 @@ spec:
additionalProperties:
type: string
type: object
readinessProbeFailureSeconds:
format: int32
type: integer
replicas:
format: int32
minimum: 0
Expand Down Expand Up @@ -1410,6 +1416,9 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
livenessProbeFailureSeconds:
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -1418,6 +1427,9 @@ spec:
additionalProperties:
type: string
type: object
readinessProbeFailureSeconds:
format: int32
type: integer
replicas:
format: int32
minimum: 0
Expand Down Expand Up @@ -1903,6 +1915,9 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
livenessProbeFailureSeconds:
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -1911,6 +1926,9 @@ spec:
additionalProperties:
type: string
type: object
readinessProbeFailureSeconds:
format: int32
type: integer
replicas:
format: int32
minimum: 0
Expand Down Expand Up @@ -2464,6 +2482,9 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
livenessProbeFailureSeconds:
format: int32
type: integer
nodeSelector:
additionalProperties:
type: string
Expand All @@ -2472,6 +2493,9 @@ spec:
additionalProperties:
type: string
type: object
readinessProbeFailureSeconds:
format: int32
type: integer
replicas:
format: int32
minimum: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ spec:
{{toYaml .Values.starrocksFESpec.tolerations | indent 4 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.starrocksFESpec.terminationGracePeriodSeconds }}
{{- if .Values.starrocksFESpec.startupProbeFailureSeconds }}
startupProbeFailureSeconds: {{ .Values.starrocksFESpec.startupProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksFESpec.livenessProbeFailureSeconds }}
livenessProbeFailureSeconds: {{ .Values.starrocksFESpec.livenessProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksFESpec.readinessProbeFailureSeconds }}
readinessProbeFailureSeconds: {{ .Values.starrocksFESpec.readinessProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksFESpec.secrets }}
secrets:
{{- range .Values.starrocksFESpec.secrets }}
Expand Down Expand Up @@ -243,6 +252,15 @@ spec:
{{toYaml .Values.starrocksBeSpec.tolerations | indent 4 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.starrocksBeSpec.terminationGracePeriodSeconds }}
{{- if .Values.starrocksBeSpec.startupProbeFailureSeconds }}
startupProbeFailureSeconds: {{ .Values.starrocksBeSpec.startupProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksBeSpec.livenessProbeFailureSeconds }}
livenessProbeFailureSeconds: {{ .Values.starrocksBeSpec.livenessProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksBeSpec.readinessProbeFailureSeconds }}
readinessProbeFailureSeconds: {{ .Values.starrocksBeSpec.readinessProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksBeSpec.secrets }}
secrets:
{{- range .Values.starrocksBeSpec.secrets }}
Expand Down Expand Up @@ -336,6 +354,15 @@ spec:
{{toYaml .Values.starrocksCnSpec.tolerations | indent 4 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.starrocksCnSpec.terminationGracePeriodSeconds }}
{{- if .Values.starrocksCnSpec.startupProbeFailureSeconds }}
startupProbeFailureSeconds: {{ .Values.starrocksCnSpec.startupProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksCnSpec.livenessProbeFailureSeconds }}
livenessProbeFailureSeconds: {{ .Values.starrocksCnSpec.livenessProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksCnSpec.readinessProbeFailureSeconds }}
readinessProbeFailureSeconds: {{ .Values.starrocksCnSpec.readinessProbeFailureSeconds }}
{{- end }}
{{- if and .Values.starrocksCluster.enabledCn .Values.starrocksCnSpec.autoScalingPolicy }}
autoScalingPolicy:
{{ toYaml .Values.starrocksCnSpec.autoScalingPolicy | indent 6 }}
Expand Down Expand Up @@ -451,4 +478,10 @@ spec:
tolerations:
{{- toYaml .Values.starrocksFeProxySpec.tolerations | nindent 6 }}
{{- end }}
{{- if .Values.starrocksFeProxySpec.livenessProbeFailureSeconds }}
livenessProbeFailureSeconds: {{ .Values.starrocksFeProxySpec.livenessProbeFailureSeconds }}
{{- end }}
{{- if .Values.starrocksFeProxySpec.readinessProbeFailureSeconds }}
readinessProbeFailureSeconds: {{ .Values.starrocksFeProxySpec.readinessProbeFailureSeconds }}
{{- end }}
{{- end }}
Loading

0 comments on commit 672c7d6

Please sign in to comment.