mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-08-25 19:08:55 +00:00
add TTL 3 hours
This commit is contained in:
parent
cd30c5ba11
commit
76148bc8b2
@ -51,6 +51,7 @@ const (
|
||||
artifactExporterIndexAnnotation = "build.kairos.io/export-index"
|
||||
ready = "Ready"
|
||||
)
|
||||
const threeHours = int32(10800)
|
||||
|
||||
var (
|
||||
requeue = ctrl.Result{RequeueAfter: requeueAfter}
|
||||
@ -351,7 +352,7 @@ func (r *OSArtifactReconciler) checkExport(ctx context.Context, artifact *osbuil
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
job.Spec.TTLSecondsAfterFinished = ptr(threeHours)
|
||||
if err := controllerutil.SetOwnerReference(artifact, job, r.Scheme); err != nil {
|
||||
log.FromContext(ctx).Error(err, "failed to set owner reference on job")
|
||||
return ctrl.Result{Requeue: true}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user