lib/metatron/templates/stateful_set.rb in metatron-0.1.9 vs lib/metatron/templates/stateful_set.rb in metatron-0.2.0

- old
+ new

@@ -45,27 +45,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_security_context) - ] + additional_containers + containers: containers.map(&:render), + init_containers: init_containers.any? ? init_containers.map(&:render) : nil }.merge(formatted_volumes) .merge(formatted_affinity) .merge(formatted_tolerations) + .compact } } } end # rubocop:enable Metrics/AbcSize