Service Instance Update #61

Merged
rixx merged 12 commits from 29-service-instance-update into main 2025-05-21 07:39:18 +00:00
Showing only changes of commit fd3cb6a1d4 - Show all commits

View file

@ -651,6 +651,20 @@ class ServiceInstance(ServalaModelMixin, models.Model):
spec.pop("writeConnectionSecretToRef", None)
return spec
@cached_property
def spec_object(self):
"""Dynamically generated CRD object."""
return self.context.django_model(
name=self.name,
organization=self.organization,
context=self.context,
spec=self.spec,
# We pass -1 as ID in order to make it clear that a) this object exists (remotely),
# and b) its not a normal database object. This allows us to treat e.g. update
# forms differently from create forms.
pk=-1,
)
@cached_property
def status_conditions(self):
if not self.kubernetes_object: