Sha256: 69c4d78a72e814a3ca253c69b86f360a76922862c54f6ed3c5eb9c396a682960

Contents?: true

Size: 693 Bytes

Versions: 7

Compression:

Stored size: 693 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'kubernetes-deploy'
require 'kubernetes-deploy/runner_task'
require 'optparse'

template = "task-runner-template"
entrypoint = nil
env_vars = []

ARGV.options do |opts|
  opts.on("--template=TEMPLATE") { |n| template = n }
  opts.on("--env-vars=ENV_VARS") { |vars| env_vars = n.split(",")}
  opts.on("--entrypoint=ENTRYPOINT") { |c| entrypoint = [c] }
  opts.parse!
end

runner = KubernetesDeploy::RunnerTask.new(
  namespace: ARGV[0],
  context: ARGV[1],
)

 KubernetesDeploy::Runner.with_friendly_errors do
  runner.run(
    task_template: template,
    entrypoint: entrypoint,
    args: ARGV[2..-1],
    env_vars: env_vars
  )
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kubernetes-deploy-0.6.6 exe/kubernetes-run
kubernetes-deploy-0.6.5 exe/kubernetes-run
kubernetes-deploy-0.6.4 exe/kubernetes-run
kubernetes-deploy-0.6.3 exe/kubernetes-run
kubernetes-deploy-0.6.2 exe/kubernetes-run
kubernetes-deploy-0.6.1 exe/kubernetes-run
kubernetes-deploy-0.6.0 exe/kubernetes-run