Class: AppConfig::KasMetadata
- Inherits:
-
Object
- Object
- AppConfig::KasMetadata
- Defined in:
- app/models/app_config/kas_metadata.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#external_k8s_proxy_url ⇒ Object
readonly
Returns the value of attribute external_k8s_proxy_url.
-
#external_url ⇒ Object
readonly
Returns the value of attribute external_url.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ KasMetadata
constructor
A new instance of KasMetadata.
Constructor Details
#initialize ⇒ KasMetadata
Returns a new instance of KasMetadata.
11 12 13 14 15 16 |
# File 'app/models/app_config/kas_metadata.rb', line 11 def initialize @enabled = Gitlab::Kas.enabled? @version = Gitlab::Kas::ServerInfo.new.version_info if @enabled @external_url = Gitlab::Kas.external_url if @enabled @external_k8s_proxy_url = Gitlab::Kas.tunnel_url if @enabled end |
Instance Attribute Details
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
5 6 7 |
# File 'app/models/app_config/kas_metadata.rb', line 5 def enabled @enabled end |
#external_k8s_proxy_url ⇒ Object (readonly)
Returns the value of attribute external_k8s_proxy_url.
5 6 7 |
# File 'app/models/app_config/kas_metadata.rb', line 5 def external_k8s_proxy_url @external_k8s_proxy_url end |
#external_url ⇒ Object (readonly)
Returns the value of attribute external_url.
5 6 7 |
# File 'app/models/app_config/kas_metadata.rb', line 5 def external_url @external_url end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
5 6 7 |
# File 'app/models/app_config/kas_metadata.rb', line 5 def version @version end |
Class Method Details
.declarative_policy_class ⇒ Object
7 8 9 |
# File 'app/models/app_config/kas_metadata.rb', line 7 def self.declarative_policy_class "AppConfig::InstanceMetadataPolicy" end |