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-0.9.4 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.3 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.2 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.9.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.8 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.7 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.6 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.5 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.4 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.3 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.2 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.8.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.7.1 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.7.0 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.6.4 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.6.3 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.6.2 lib/kuber_kit/core/service_factory.rb
kuber_kit-0.6.1 lib/kuber_kit/core/service_factory.rb