lib/metatron/templates/concerns/pod_producer.rb in metatron-0.1.2 vs lib/metatron/templates/concerns/pod_producer.rb in metatron-0.1.3

- old
+ new

@@ -9,18 +9,19 @@ # base.extend ClassMethods base.class_eval do attr_accessor :image, :image_pull_policy, :additional_labels, :env, :envfrom, :resource_limits, :resource_requests, :probes, :ports, :security_context, :volume_mounts, :volumes, :additional_containers, - :container_security_context, :affinity + :container_security_context, :affinity, :termination_grace_period_seconds initializer :pod_producer_initialize alias_method :imagePullPolicy, :image_pull_policy alias_method :volumeMounts, :volume_mounts alias_method :securityContext, :security_context alias_method :environment, :env + alias_method :terminationGracePeriodSeconds, :termination_grace_period_seconds end end def pod_producer_initialize @image = "gcr.io/google_containers/pause" @@ -36,9 +37,10 @@ @volumes = [] @security_context = {} @container_security_context = {} @additional_containers = [] @additional_labels = {} + @termination_grace_period_seconds = 60 end def formatted_affinity affinity && !affinity.empty? ? { affinity: } : {} end