Add read-only settings for IS_K8S

This commit is contained in:
Jake McDermott 2021-06-22 11:13:20 -04:00 committed by Shane McDonald
parent 77b0b9a4e3
commit f08bf4766d
No known key found for this signature in database
GPG Key ID: 6F374AF6E9EB9374

View File

@ -692,6 +692,15 @@ register(
unit=_('seconds'),
)
register(
'IS_K8S',
field_class=fields.BooleanField,
read_only=True,
category=_('System'),
category_slug='system',
help_text=_('Indicates whether the instance is part of a kubernetes-based deployment.'),
)
def logging_validate(serializer, attrs):
if not serializer.instance or not hasattr(serializer.instance, 'LOG_AGGREGATOR_HOST') or not hasattr(serializer.instance, 'LOG_AGGREGATOR_TYPE'):