feat(v0.1.59): in-cluster registry:2 — insecure HTTP mode, ImageExists error handling
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user