lib/metatron/templates/replica_set.rb in metatron-0.1.9 vs lib/metatron/templates/replica_set.rb in metatron-0.2.0
- old
+ new
@@ -35,27 +35,15 @@
metadata: {
labels: { "#{label_namespace}/name": name }.merge(additional_pod_labels)
}.merge(formatted_pod_annotations),
spec: {
terminationGracePeriodSeconds:,
- containers: [
- {
- name: "app",
- image:,
- imagePullPolicy:,
- stdin: true,
- tty: true,
- resources: { limits: resource_limits, requests: resource_requests }
- }.merge(probes)
- .merge(formatted_environment)
- .merge(formatted_envfrom)
- .merge(formatted_ports)
- .merge(formatted_volume_mounts)
- .merge(formatted_container_security_context)
- ] + additional_containers
+ containers: containers.map(&:render),
+ init_containers: init_containers.any? ? init_containers.map(&:render) : nil
}.merge(formatted_volumes)
.merge(formatted_security_context)
.merge(formatted_tolerations)
+ .compact
}
}
}
end
# rubocop:enable Metrics/AbcSize