summaryrefslogtreecommitdiff
path: root/app/models/instance_metadata/kas.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/instance_metadata/kas.rb')
-rw-r--r--app/models/instance_metadata/kas.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/instance_metadata/kas.rb b/app/models/instance_metadata/kas.rb
new file mode 100644
index 00000000000..7d2d71120b5
--- /dev/null
+++ b/app/models/instance_metadata/kas.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class InstanceMetadata::Kas
+ attr_reader :enabled, :version, :external_url
+
+ def initialize
+ @enabled = Gitlab::Kas.enabled?
+ @version = Gitlab::Kas.version if @enabled
+ @external_url = Gitlab::Kas.external_url if @enabled
+ end
+
+ def self.declarative_policy_class
+ "InstanceMetadataPolicy"
+ end
+end