Skip to content

Commit

Permalink
fix: made the startup probe consistent for nodespec and druidspec (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
avtarOPS authored Dec 26, 2023
1 parent 99639e5 commit 81ac979
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
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

0 comments on commit 81ac979

Please sign in to comment.