Class: KubeDeployTools::ArtifactRegistry
- Defined in:
- lib/kube_deploy_tools/artifact_registry.rb,
lib/kube_deploy_tools/artifact_registry/driver.rb,
lib/kube_deploy_tools/artifact_registry/driver_base.rb
Overview
Read-only model for artifact_registries[] array element in KDT deploy.yaml configuration file.
Defined Under Namespace
Modules: Driver
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#driver_name ⇒ Object
Returns the value of attribute driver_name.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(h) ⇒ ArtifactRegistry
constructor
A new instance of ArtifactRegistry.
Constructor Details
#initialize(h) ⇒ ArtifactRegistry
Returns a new instance of ArtifactRegistry.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kube_deploy_tools/artifact_registry.rb', line 10 def initialize(h) @name = h['name'] @driver_name = h['driver'] @config = h['config'] if !ArtifactRegistry::Driver::MAPPINGS.key?(@driver_name) Logger.warn("Unsupported .artifact_registries.driver: #{@driver_name}") else @driver = ArtifactRegistry::Driver::MAPPINGS .fetch(@driver_name) .new(config: @config) end end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
8 9 10 |
# File 'lib/kube_deploy_tools/artifact_registry.rb', line 8 def config @config end |
#driver ⇒ Object
Returns the value of attribute driver.
8 9 10 |
# File 'lib/kube_deploy_tools/artifact_registry.rb', line 8 def driver @driver end |
#driver_name ⇒ Object
Returns the value of attribute driver_name.
8 9 10 |
# File 'lib/kube_deploy_tools/artifact_registry.rb', line 8 def driver_name @driver_name end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/kube_deploy_tools/artifact_registry.rb', line 8 def name @name end |
Instance Method Details
#==(o) ⇒ Object
24 25 26 27 28 |
# File 'lib/kube_deploy_tools/artifact_registry.rb', line 24 def ==(o) @name == o.name @driver == o.driver @config == o.config end |