lib/metatron/templates/replica_set.rb in metatron-0.1.8 vs lib/metatron/templates/replica_set.rb in metatron-0.1.9
- old
+ new
@@ -4,10 +4,11 @@
module Templates
# The ReplicaSet Kubernetes resource
class ReplicaSet < Template
include Concerns::Annotated
include Concerns::PodProducer
+ include Concerns::Namespaced
attr_accessor :replicas, :additional_labels
def initialize(name, replicas: 2)
super(name)
@@ -22,10 +23,10 @@
apiVersion:,
kind:,
metadata: {
name:,
labels: { "#{label_namespace}/name": name }.merge(additional_labels)
- }.merge(formatted_annotations),
+ }.merge(formatted_annotations).merge(formatted_namespace),
spec: {
replicas:,
selector: {
matchLabels: { "#{label_namespace}/name": name }.merge(additional_pod_labels)
},