[hot-fix] update pulses

mine
derailed 2025-07-05 10:54:34 -06:00
parent 00b28ceeee
commit 457e4b86db
2 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,7 @@ import (
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
) )
const pulseRate = 15 * time.Second const pulseRate = 10 * time.Second
type HealthPoint struct { type HealthPoint struct {
GVR *client.GVR GVR *client.GVR

View File

@ -206,7 +206,7 @@ func (p *Pod) defaultRow(pwm *PodWithMetrics, row *model1.Row) error {
} }
// Healthy checks component health. // Healthy checks component health.
func (p Pod) Healthy(_ context.Context, o any) error { func (p *Pod) Healthy(_ context.Context, o any) error {
pwm, ok := o.(*PodWithMetrics) pwm, ok := o.(*PodWithMetrics)
if !ok { if !ok {
slog.Error("Expected *PodWithMetrics", slogs.Type, fmt.Sprintf("%T", o)) slog.Error("Expected *PodWithMetrics", slogs.Type, fmt.Sprintf("%T", o))
@ -224,7 +224,8 @@ func (p Pod) Healthy(_ context.Context, o any) error {
} }
dt := pwm.Raw.GetDeletionTimestamp() dt := pwm.Raw.GetDeletionTimestamp()
phase := p.Phase(dt, spec, &st) phase := p.Phase(dt, spec, &st)
cr, ct, _, _ := p.ContainerStats(st.ContainerStatuses) cr, _, _, _ := p.ContainerStats(st.ContainerStatuses)
ct := len(st.ContainerStatuses)
icr, ict, _ := p.initContainerStats(spec.InitContainers, st.InitContainerStatuses) icr, ict, _ := p.initContainerStats(spec.InitContainers, st.InitContainerStatuses)
cr += icr cr += icr