lib/metatron/templates/service.rb in metatron-0.6.0 vs lib/metatron/templates/service.rb in metatron-0.6.1
- old
+ new
@@ -11,11 +11,11 @@
:additional_selector_labels, :publish_not_ready_addresses
def initialize(name, port = nil)
super(name)
@type = "ClusterIP"
- @selector = { "#{label_namespace}/name": name }
+ @selector = base_labels
@additional_labels = {}
@additional_selector_labels = {}
@publish_not_ready_addresses = false
return unless port
@@ -39,10 +39,10 @@
{
apiVersion:,
kind:,
metadata: {
name:,
- labels: { "#{label_namespace}/name": name }.merge(additional_labels)
+ labels: base_labels.merge(additional_labels)
}.merge(formatted_annotations).merge(formatted_namespace),
spec: {
type:,
selector: selector.merge(additional_selector_labels),
publishNotReadyAddresses: