Sha256: 279b42f8fab59331d775c15d5f43b867038ed68ea659f598874315b984899eec

Contents?: true

Size: 635 Bytes

Versions: 15

Compression:

Stored size: 635 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,
      template_name:      service_attrs.template_name,
      tags:               service_attrs.tags,
      images:             service_attrs.images,
      attributes:         attributes,
      deployer_strategy:  service_attrs.deployer_strategy,
    )
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kuber_kit-0.5.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.5.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.9 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.8 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.7 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.6 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.5 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.4 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.3 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.2 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.4.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.3.11 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.3.10 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.3.9 lib/kuber_kit/core/service_factory.rb