Skip to content

Commit

Permalink
LivenessProbe for FE, BE and Broker (#22)
Browse files Browse the repository at this point in the history
* Refactor prometheus deployment to statefulset

* Refactor grafana deployment to statefulset

* Refactor loki deployment to statefulset

* update deploy resources

* fixbug: Incorrect loki volume mounting

* Add livenessProbe for fe, be, and broker

* Refactor Doris monitor K8s app resources (#21)

* Refactor prometheus deployment to statefulset

* Refactor grafana deployment to statefulset

* Refactor loki deployment to statefulset

* update deploy resources

* Refactor prometheus deployment to statefulset

* Refactor grafana deployment to statefulset

* Refactor loki deployment to statefulset
  • Loading branch information
Al-assad authored Nov 25, 2023
1 parent 94139d7 commit 616387d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/transformer/be_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ func MakeBeStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1.Sta
SuccessThreshold: 1,
FailureThreshold: 3,
},
LivenessProbe: &corev1.Probe{
ProbeHandler: util.NewTcpSocketProbeHandler(GetBeHeartbeatServicePort(cr)),
InitialDelaySeconds: 20,
TimeoutSeconds: 1,
PeriodSeconds: 5,
SuccessThreshold: 1,
FailureThreshold: 5,
},
}
// pod template: init container
privileged := true
Expand Down
8 changes: 8 additions & 0 deletions internal/transformer/broker_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ func MakeBrokerStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1
SuccessThreshold: 1,
FailureThreshold: 3,
},
LivenessProbe: &corev1.Probe{
ProbeHandler: util.NewTcpSocketProbeHandler(GetBrokerIpcPort(cr)),
InitialDelaySeconds: 20,
TimeoutSeconds: 1,
PeriodSeconds: 5,
SuccessThreshold: 1,
FailureThreshold: 5,
},
}
// pod template: merge additional pod containers configs defined by user
mainContainer.Env = append(mainContainer.Env, cr.Spec.Broker.AdditionalEnvs...)
Expand Down
8 changes: 8 additions & 0 deletions internal/transformer/cn_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ func MakeCnStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1.Sta
SuccessThreshold: 1,
FailureThreshold: 3,
},
LivenessProbe: &corev1.Probe{
ProbeHandler: util.NewTcpSocketProbeHandler(GetCnHeartbeatServicePort(cr)),
InitialDelaySeconds: 20,
TimeoutSeconds: 1,
PeriodSeconds: 5,
SuccessThreshold: 1,
FailureThreshold: 5,
},
}
// pod template: init container
privileged := true
Expand Down
8 changes: 8 additions & 0 deletions internal/transformer/fe_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ func MakeFeStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1.Sta
SuccessThreshold: 1,
FailureThreshold: 3,
},
LivenessProbe: &corev1.Probe{
ProbeHandler: util.NewTcpSocketProbeHandler(GetFeEditLogPort(cr)),
InitialDelaySeconds: 20,
TimeoutSeconds: 1,
PeriodSeconds: 5,
SuccessThreshold: 1,
FailureThreshold: 5,
},
}
// pod template: merge additional pod containers configs defined by user
mainContainer.Env = append(mainContainer.Env, cr.Spec.FE.AdditionalEnvs...)
Expand Down

0 comments on commit 616387d

Please sign in to comment.