From b9f7342a8c181f8eeb05ae2b4606cf48b896b1a8 Mon Sep 17 00:00:00 2001 From: Murad Biashimov Date: Thu, 14 Nov 2024 09:57:42 +0100 Subject: [PATCH] fix: autoscaler enabled detection --- controllers/generic_service_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/generic_service_handler.go b/controllers/generic_service_handler.go index 55256a46..c293fb77 100644 --- a/controllers/generic_service_handler.go +++ b/controllers/generic_service_handler.go @@ -56,7 +56,7 @@ func (h *genericServiceHandler) createOrUpdate(ctx context.Context, avn *aiven.C } diskSpace := v1alpha1.ConvertDiskSpace(o.getDiskSpace()) - if diskSpace > 0 { + if diskSpace > 0 && exists { for _, v := range oldService.ServiceIntegrations { if v.IntegrationType == service.IntegrationTypeAutoscaler { return fmt.Errorf("cannot set disk space for service with autoscaler integration enabled")