Sha256: 089ffdccf8e6c1da8e2e966904e1b9567a1caf2dc45c62c5aceaed7d8712ea12
Contents?: true
Size: 1.39 KB
Versions: 22
Compression:
Stored size: 1.39 KB
Contents
module Pfab module Templates class Job < Base def write_to(f) f << YAML.dump(job.deep_stringify_keys) end def job { apiVersion: "batch/v1", kind: "Job", metadata: { name: "job-#{@data['deployed_name']}-#{@data['sha']}", namespace: @data['env'], labels: { application: @data['application'], "deployed-name" => @data['deployed_name'], "application-type" => "job", } }, spec: { template: { metadata: { name: "#{@data['deployed_name']}-#{@data['sha']}", namespace: @data['env'], labels: { application: @data['application'], "deployed-name" => @data['deployed_name'], "application-type" => "job", }, }, spec: { containers: [ { image: image_name, name: @data['deployed_name'], command: app_vars["command"].split(" "), env: env_vars, resources: resources, }, ], restartPolicy: "Never", }, }, backoffLimit: 0, }, } end end end end
Version data entries
22 entries across 22 versions & 1 rubygems