Class: KuberKit::Core::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/kuber_kit/core/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:, deployer_strategy:, deployer_namespace:, services_attributes:, build_servers:, global_build_vars:) ⇒ Configuration

Returns a new instance of Configuration.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/kuber_kit/core/configuration.rb', line 19

def initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:, 
               deployer_strategy:, deployer_namespace:, services_attributes:, build_servers:, 
               global_build_vars:)
  @name             = name
  @artifacts        = artifacts
  @registries       = registries
  @env_files        = env_files
  @templates        = templates
  @kubeconfig_path  = kubeconfig_path
  @deployer_strategy  = deployer_strategy
  @deployer_namespace = deployer_namespace
  @build_servers    = build_servers
  @services_attributes  = services_attributes
  @global_build_vars    = global_build_vars
end

Instance Attribute Details

#artifactsObject (readonly)

Returns the value of attribute artifacts.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def artifacts
  @artifacts
end

#build_serversObject (readonly)

Returns the value of attribute build_servers.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def build_servers
  @build_servers
end

#deployer_namespaceObject (readonly)

Returns the value of attribute deployer_namespace.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def deployer_namespace
  @deployer_namespace
end

#deployer_strategyObject (readonly)

Returns the value of attribute deployer_strategy.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def deployer_strategy
  @deployer_strategy
end

#env_filesObject (readonly)

Returns the value of attribute env_files.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def env_files
  @env_files
end

#global_build_varsObject (readonly)

Returns the value of attribute global_build_vars.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def global_build_vars
  @global_build_vars
end

#kubeconfig_pathObject (readonly)

Returns the value of attribute kubeconfig_path.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def kubeconfig_path
  @kubeconfig_path
end

#nameObject (readonly)

Returns the value of attribute name.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def name
  @name
end

#registriesObject (readonly)

Returns the value of attribute registries.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def registries
  @registries
end

#services_attributesObject (readonly)

Returns the value of attribute services_attributes.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def services_attributes
  @services_attributes
end

#templatesObject (readonly)

Returns the value of attribute templates.



2
3
4
# File 'lib/kuber_kit/core/configuration.rb', line 2

def templates
  @templates
end

Instance Method Details

#global_build_argsObject



39
40
41
42
43
44
# File 'lib/kuber_kit/core/configuration.rb', line 39

def global_build_args
  unless KuberKit.deprecation_warnings_disabled?
    puts "DEPRECATION: global_build_args is deprecated, please use global_build_vars instead"
  end
  global_build_vars
end

#service_attributes(service_name) ⇒ Object



35
36
37
# File 'lib/kuber_kit/core/configuration.rb', line 35

def service_attributes(service_name)
  services_attributes[service_name.to_sym] || {}
end