feat(crd): add update custom resource status

This commit is contained in:
2024-12-01 23:55:58 +03:30
parent fb646086b0
commit 3e77ac121a
8 changed files with 100 additions and 13 deletions

View File

@@ -44,6 +44,8 @@ func (job *ManagedJob) cycle() {
}
return
}
job.crd.SetJobStatus(job.def.UID, string(job.state.Status))
// Check for set running or error state
if job.state.Status == JobStatusCreating || job.state.Status == JobStatusFailing {
err := job.checkStatus()
@@ -72,6 +74,6 @@ func (job *ManagedJob) cycle() {
job.restore()
return
}
lc.Logger.Warn("[managed-job] [cycle]", zap.String("unhanded job status", string(job.state.Status)))
lc.Logger.Warn("[managed-job] [cycle]", zap.String("unhanded job status", string(job.state.Status)))
}