Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit 25923f3

Browse files
committed
fix: add restart policy handling & default health status
1 parent c12a30e commit 25923f3

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

internal/master/state/postgres_pods.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func (s *PostgresStateStore) ListPodsByLabels(namespace string, labels map[strin
348348
var pods []types.Pod
349349
for rows.Next() {
350350
var pod types.Pod
351-
var ns, nodeID, message, reason sql.NullString
351+
var ns, nodeID, restartPolicy, message, reason sql.NullString
352352
var scheduledAt, startedAt, finishedAt sql.NullTime
353353
var labelsJSON, annotationsJSON, containersJSON []byte
354354

@@ -361,7 +361,7 @@ func (s *PostgresStateStore) ListPodsByLabels(namespace string, labels map[strin
361361
&containersJSON,
362362
&pod.Status,
363363
&nodeID,
364-
&pod.RestartPolicy,
364+
&restartPolicy,
365365
&pod.CreatedAt,
366366
&scheduledAt,
367367
&startedAt,
@@ -379,6 +379,9 @@ func (s *PostgresStateStore) ListPodsByLabels(namespace string, labels map[strin
379379
if nodeID.Valid {
380380
pod.NodeID = nodeID.String
381381
}
382+
if restartPolicy.Valid {
383+
pod.RestartPolicy = types.RestartPolicy(restartPolicy.String)
384+
}
382385
if message.Valid {
383386
pod.Message = message.String
384387
}

internal/worker/agent/pod_executor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ func (a *Agent) createPodContainers(ctx context.Context, pod *types.Pod, executi
159159

160160
container.ContainerID = containerID
161161
container.Status = types.ContainerRunning
162+
if container.LivenessProbe == nil {
163+
container.HealthStatus = types.HealthStatusHealthy
164+
}
162165

163166
if err := a.startContainer(ctx, pod, container, execution); err != nil {
164167
return err

0 commit comments

Comments
 (0)