feat(v0.1.59): in-cluster registry:2 — insecure HTTP mode, ImageExists error handling

This commit is contained in:
Naeel
2026-03-23 06:41:30 +03:00
parent 9edd43edc5
commit c033adec11
6 changed files with 143 additions and 79 deletions
+6 -1
View File
@@ -124,7 +124,12 @@ func (r *FunctionJobReconciler) startJobBuild(ctx context.Context, fj *slessv1al
imageRef := r.Builder.ImageRef(r.OperatorNamespace, fj.Name, fj.Spec.S3Key)
// Проверяем: образ с этим тегом уже существует в registry?
if r.Builder.ImageExists(ctx, imageRef) {
// Если registry недоступен — requeue, не запускаем сборку.
exists, err := r.Builder.ImageExists(ctx, imageRef)
if err != nil {
return ctrl.Result{RequeueAfter: 10 * time.Second}, fmt.Errorf("check image exists: %w", err)
}
if exists {
logger.Info("image already exists in registry, skipping build", "imageRef", imageRef)
if fj.Annotations == nil {