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:, kubectl_entrypoint:, services_attributes:, enabled_services:, disabled_services:, default_services:, pre_deploy_services:, post_deploy_services:, build_servers:, global_build_vars:, deployer_strategy:, deployer_namespace:, deployer_require_confirmation:, shell_launcher_strategy:, generator_strategy:) ⇒ Configuration

Returns a new instance of Configuration.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/kuber_kit/core/configuration.rb', line 30

def initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:, kubectl_entrypoint:,
               services_attributes:, enabled_services:, disabled_services:, default_services:, 
               pre_deploy_services:, post_deploy_services:, build_servers:, global_build_vars:,
               deployer_strategy:, deployer_namespace:, deployer_require_confirmation:, shell_launcher_strategy:, generator_strategy:)
  @name                 = name
  @artifacts            = artifacts
  @registries           = registries
  @env_files            = env_files
  @templates            = templates
  @kubeconfig_path      = kubeconfig_path
  @kubectl_entrypoint   = kubectl_entrypoint
  @build_servers        = build_servers
  @services_attributes  = services_attributes
  @enabled_services     = enabled_services
  @disabled_services    = disabled_services
  @default_services     = default_services
  @pre_deploy_services  = pre_deploy_services
  @post_deploy_services = post_deploy_services
  @global_build_vars    = global_build_vars
  @deployer_strategy              = deployer_strategy
  @deployer_namespace             = deployer_namespace
  @deployer_require_confirmation  = deployer_require_confirmation
  @shell_launcher_strategy        = shell_launcher_strategy
  @generator_strategy             = generator_strategy
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

#default_servicesObject (readonly)

Returns the value of attribute default_services.



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

def default_services
  @default_services
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_require_confirmationObject (readonly)

Returns the value of attribute deployer_require_confirmation.



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

def deployer_require_confirmation
  @deployer_require_confirmation
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

#disabled_servicesObject (readonly)

Returns the value of attribute disabled_services.



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

def disabled_services
  @disabled_services
end

#enabled_servicesObject (readonly)

Returns the value of attribute enabled_services.



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

def enabled_services
  @enabled_services
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

#generator_strategyObject (readonly)

Returns the value of attribute generator_strategy.



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

def generator_strategy
  @generator_strategy
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

#kubectl_entrypointObject (readonly)

Returns the value of attribute kubectl_entrypoint.



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

def kubectl_entrypoint
  @kubectl_entrypoint
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

#post_deploy_servicesObject (readonly)

Returns the value of attribute post_deploy_services.



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

def post_deploy_services
  @post_deploy_services
end

#pre_deploy_servicesObject (readonly)

Returns the value of attribute pre_deploy_services.



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

def pre_deploy_services
  @pre_deploy_services
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

#shell_launcher_strategyObject (readonly)

Returns the value of attribute shell_launcher_strategy.



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

def shell_launcher_strategy
  @shell_launcher_strategy
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



60
61
62
63
64
65
# File 'lib/kuber_kit/core/configuration.rb', line 60

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



56
57
58
# File 'lib/kuber_kit/core/configuration.rb', line 56

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