diff --git a/api/app/instances/core/instance_service.py b/api/app/instances/core/instance_service.py index 677efbf..415279e 100644 --- a/api/app/instances/core/instance_service.py +++ b/api/app/instances/core/instance_service.py @@ -105,10 +105,15 @@ def update_instance(self, uuid: UUID, dto: InstanceUpdate) -> Instance: if dto.enabled is not None: instance.enabled = dto.enabled - # TODO: Handle Kubernetes sync when image/version/enabled changes - # This will be implemented when Kubernetes features are migrated + updated = self.repository.update(instance) - return self.repository.update(instance) + # Propagate image/version/enabled changes to Kubernetes + if self.db and ( + dto.image is not None or dto.version is not None or dto.enabled is not None + ): + self.sync_instance(uuid) + + return updated def get_instance(self, uuid: UUID) -> Instance: """Get instance by UUID."""