Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions api/app/instances/core/instance_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
Loading