Sha256: 4caaa3167792ecf3b3f5997224583573eaeb6cb40adbd9b8340f416030f17238
Contents?: true
Size: 814 Bytes
Versions: 8
Compression:
Stored size: 814 Bytes
Contents
class KuberKit::Core::ServiceFactory AttributeNotSetError = Class.new(KuberKit::Error) def create(definition) service_attrs = definition.to_service_attrs if service_attrs.template_name.nil? raise AttributeNotSetError, "Please set template for service using #template method" end 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, deploy_strategy: service_attrs.deploy_strategy, ) end end
Version data entries
8 entries across 8 versions & 1 rubygems