Sha256: 406fead834359e52e3d9c949d73fb2f833add785087be1ee9c66561fecbf4fa6

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

class KuberKit::Core::Configuration
  attr_reader :name, :artifacts, :registries, :env_files, :templates, :kubeconfig_path, 
              :deploy_strategy, :deploy_namespace, :services_attributes, :build_servers,
              :global_build_vars

  Contract KeywordArgs[
    name:            Symbol,
    artifacts:       Hash,
    registries:      Hash,
    env_files:       Hash,
    templates:       Hash,
    kubeconfig_path: Maybe[String],
    deploy_strategy:  Symbol,
    deploy_namespace: Maybe[Symbol],
    services_attributes: HashOf[Symbol => Hash],
    build_servers:   ArrayOf[KuberKit::Core::BuildServers::AbstractBuildServer],
    global_build_vars:   HashOf[Symbol => Any],
  ] => Any
  def initialize(name:, artifacts:, registries:, env_files:, templates:, kubeconfig_path:, 
                 deploy_strategy:, deploy_namespace:, services_attributes:, build_servers:, 
                 global_build_vars:)
    @name             = name
    @artifacts        = artifacts
    @registries       = registries
    @env_files        = env_files
    @templates        = templates
    @kubeconfig_path  = kubeconfig_path
    @deploy_strategy  = deploy_strategy
    @deploy_namespace = deploy_namespace
    @build_servers    = build_servers
    @services_attributes  = services_attributes
    @global_build_vars    = global_build_vars
  end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kuber_kit-0.2.8 lib/kuber_kit/core/configuration.rb