Sha256: 2689bbc419a74821673a1db6354c442071ab0cdc2ffe3ab94ad6ad4c34d9b954

Contents?: true

Size: 689 Bytes

Versions: 50

Compression:

Stored size: 689 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,
      dependencies:       service_attrs.dependencies,
      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

50 entries across 50 versions & 1 rubygems

Version Path
kuber_kit-1.1.5 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.3.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.1.4 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.2.7 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.2.6 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.2.5 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.2.4 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.2.2 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.1.2 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.2.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.2.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.1.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.0.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-1.0.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.9 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.8 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.7 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.6 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.5 lib/kuber_kit/core/service_factory.rb