lib/metatron/templates/job.rb in metatron-0.2.2 vs lib/metatron/templates/job.rb in metatron-0.2.3
- old
+ new
@@ -21,12 +21,10 @@
def initialize(name)
super(name)
@api_version = "batch/v1"
end
- # rubocop:disable Metrics/AbcSize
- # rubocop:disable Metrics/MethodLength
def render
{
apiVersion:,
kind:,
metadata: {
@@ -38,25 +36,12 @@
backoffLimit:,
activeDeadlineSeconds:,
completions:,
parallelism:,
podFailurePolicy:,
- ttlSecondsAfterFinished:,
- template: {
- spec: {
- terminationGracePeriodSeconds:,
- restartPolicy:,
- 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
- }.compact
- }.compact
+ ttlSecondsAfterFinished:
+ }.merge(pod_template).compact
}
end
- # rubocop:enable Metrics/AbcSize
- # rubocop:enable Metrics/MethodLength
end
end
end