From f08bf4766dbffb6a1bb8ec6268ae1850c711f24a Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Tue, 22 Jun 2021 11:13:20 -0400 Subject: [PATCH] Add read-only settings for IS_K8S --- awx/main/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/awx/main/conf.py b/awx/main/conf.py index 7d2f6f979a..d8e8b97206 100644 --- a/awx/main/conf.py +++ b/awx/main/conf.py @@ -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'):