lib/metatron/templates/deployment.rb in metatron-0.1.8 vs lib/metatron/templates/deployment.rb in metatron-0.1.9
- old
+ new
@@ -3,10 +3,11 @@
module Metatron
module Templates
# The Deployment Kubernetes resource
class Deployment < Template
include Concerns::Annotated
+ include Concerns::Namespaced
include Concerns::PodProducer
attr_accessor :replicas, :additional_labels
def initialize(name, replicas: 2)
@@ -32,10 +33,10 @@
matchLabels: { "#{label_namespace}/name": name }.merge(additional_pod_labels)
},
template: {
metadata: {
labels: { "#{label_namespace}/name": name }.merge(additional_pod_labels)
- }.merge(formatted_pod_annotations),
+ }.merge(formatted_pod_annotations).merge(formatted_namespace),
spec: {
terminationGracePeriodSeconds:,
containers: [
{
name: "app",