Sha256: 29d44399b47fe901c22f3a867bde8ad65caa169b27572f5dd478ea542493f4db
Contents?: true
Size: 1.49 KB
Versions: 4
Compression:
Stored size: 1.49 KB
Contents
module Pfab module Templates class Job < Base def write_to(f) f << YAML.dump(job.deep_stringify_keys) end def application_type "job" 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" => application_type, "deploy-id" => deploy_id } }, 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pfab-0.23.0 | lib/pfab/templates/job.rb |
pfab-0.22.0 | lib/pfab/templates/job.rb |
pfab-0.21.0 | lib/pfab/templates/job.rb |
pfab-0.20.0 | lib/pfab/templates/job.rb |