Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: made the startup probe consistent for nodespec and druidspec #122

Merged
Merged
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
4 changes: 2 additions & 2 deletions apis/druid/v1alpha1/druid_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ type DruidNodeSpec struct {
// +optional
ReadinessProbe *v1.Probe `json:"readinessProbe,omitempty"`

// StartUpProbes
// StartUpProbe
// +optional
StartUpProbes *v1.Probe `json:"startUpProbes,omitempty"`
StartUpProbe *v1.Probe `json:"startUpProbe,omitempty"`

// IngressAnnotations `Ingress` annotations to be populated in ingress spec.
// +optional
Expand Down
4 changes: 2 additions & 2 deletions apis/druid/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions chart/templates/crds/druid.apache.org_druids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6512,8 +6512,8 @@ spec:
type: object
type: object
type: array
startUpProbes:
description: StartUpProbes
startUpProbe:
description: StartUpProbe
properties:
exec:
description: Exec specifies the action to take.
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/druid.apache.org_druids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6512,8 +6512,8 @@ spec:
type: object
type: object
type: array
startUpProbes:
description: StartUpProbes
startUpProbe:
description: StartUpProbe
properties:
exec:
description: Exec specifies the action to take.
Expand Down
2 changes: 1 addition & 1 deletion config/druid.apache.org_druids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5926,7 +5926,7 @@ spec:
type: object
type: object
type: array
startUpProbes:
startUpProbe:
description: StartupProbe for nodeSpec
properties:
exec:
Expand Down
2 changes: 1 addition & 1 deletion controllers/druid/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ func setReadinessProbe(nodeSpec *v1alpha1.DruidNodeSpec, m *v1alpha1.Druid) *v1.
func setStartUpProbe(nodeSpec *v1alpha1.DruidNodeSpec, m *v1alpha1.Druid) *v1.Probe {
probeType := "startup"
startUpProbe := updateDefaultPortInProbe(
firstNonNilValue(nodeSpec.StartUpProbes, m.Spec.StartUpProbe).(*v1.Probe),
firstNonNilValue(nodeSpec.StartUpProbe, m.Spec.StartUpProbe).(*v1.Probe),
nodeSpec.DruidPort)
if startUpProbe == nil && m.Spec.DefaultProbes {
startUpProbe = setDefaultProbe(nodeSpec.DruidPort, nodeSpec.NodeType, probeType)
Expand Down
4 changes: 2 additions & 2 deletions docs/api_specifications/druid.md
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ Port is set to <code>druid.port</code> if not specified with httpGet handler.</p
</tr>
<tr>
<td>
<code>startUpProbes</code><br>
<code>startUpProbe</code><br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#probe-v1-core">
Kubernetes core/v1.Probe
Expand All @@ -1455,7 +1455,7 @@ Kubernetes core/v1.Probe
</td>
<td>
<em>(Optional)</em>
<p>StartUpProbes</p>
<p>StartUpProbe</p>
</td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions e2e/configs/druid-mmless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
startUpProbes:
startUpProbe:
failureThreshold: 20
httpGet:
path: /druid/historical/v1/loadstatus
Expand Down Expand Up @@ -272,7 +272,7 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
startUpProbes:
startUpProbe:
failureThreshold: 20
httpGet:
path: /druid/historical/v1/loadstatus
Expand Down
4 changes: 2 additions & 2 deletions examples/tiny-cluster-mmless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
startUpProbes:
startUpProbe:
failureThreshold: 20
httpGet:
path: /druid/historical/v1/loadstatus
Expand Down Expand Up @@ -274,7 +274,7 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
startUpProbes:
startUpProbe:
failureThreshold: 20
httpGet:
path: /druid/historical/v1/loadstatus
Expand Down
Loading