Sha256: 80bde7d1d8974c89e28188d6ae44681b27f7861292537b0ba4fdd9de7054cd30

Contents?: true

Size: 749 Bytes

Versions: 10

Compression:

Stored size: 749 Bytes

Contents

class KuberKit::Core::ServiceFactory
  def create(definition)
    service_attrs = definition.to_service_attrs

    configuration_attributes = KuberKit.current_configuration.service_attributes(service_attrs.name)
    attributes = (service_attrs.attributes || {}).merge(configuration_attributes)

    KuberKit::Core::Service.new(
      name:               service_attrs.name,
      initializers:       service_attrs.initializers,
      template_name:      service_attrs.template_name,
      tags:               service_attrs.tags,
      images:             service_attrs.images,
      attributes:         attributes,
      deployer_strategy:  service_attrs.deployer_strategy,
      generator_strategy: service_attrs.generator_strategy,
    )
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kuber_kit-1.3.8 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.7 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.1.8 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.6 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.1.7 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.5 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.4 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.1.6 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.3 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.2 lib/kuber_kit/core/service_factory.rb