Parse out spec data
This commit is contained in:
parent
c4522e31e8
commit
912842bd82
1 changed files with 13 additions and 0 deletions
|
@ -584,3 +584,16 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
|||
if e.status == 404:
|
||||
return None
|
||||
raise
|
||||
|
||||
@cached_property
|
||||
def spec(self):
|
||||
if not self.kubernetes_object:
|
||||
return {}
|
||||
if not (spec := self.kubernetes_object.get("spec")):
|
||||
return {}
|
||||
|
||||
# Remove fields that shouldn't be displayed
|
||||
spec = spec.copy()
|
||||
spec.pop("resourceRef", None)
|
||||
spec.pop("writeConnectionSecretToRef", None)
|
||||
return spec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue