lib/metatron/templates/service.rb in metatron-0.1.8 vs lib/metatron/templates/service.rb in metatron-0.1.9

- old
+ new

@@ -3,10 +3,11 @@ module Metatron module Templates # The Service Kubernetes resource class Service < Template include Concerns::Annotated + include Concerns::Namespaced attr_accessor :type, :selector, :additional_labels, :ports, :additional_selector_labels, :publish_not_ready_addresses def initialize(name, port = nil) @@ -39,10 +40,10 @@ apiVersion:, kind:, metadata: { name:, labels: { "#{label_namespace}/name": name }.merge(additional_labels) - }.merge(formatted_annotations), + }.merge(formatted_annotations).merge(formatted_namespace), spec: { type:, selector: selector.merge(additional_selector_labels), publishNotReadyAddresses: }.merge(formatted_ports)