Sha256: c19696c4aa7c7bd4a34620719cf4c3c0b7bb7246018b0344901580626ab20a9f
Contents?: true
Size: 784 Bytes
Versions: 12
Compression:
Stored size: 784 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'optparse' require 'kubernetes-deploy' require 'kubernetes-deploy/restart_task' raw_deployments = nil max_watch_seconds = nil ARGV.options do |opts| opts.on("--deployments=LIST") { |v| raw_deployments = v.split(",") } opts.on("--max-watch-seconds=seconds") { |t| max_watch_seconds = t.to_i } opts.parse! end namespace = ARGV[0] context = ARGV[1] logger = KubernetesDeploy::FormattedLogger.build(namespace, context) restart = KubernetesDeploy::RestartTask.new(namespace: namespace, context: context, logger: logger, max_watch_seconds: max_watch_seconds) begin restart.perform!(raw_deployments) rescue KubernetesDeploy::DeploymentTimeoutError exit 70 rescue KubernetesDeploy::FatalDeploymentError exit 1 end
Version data entries
12 entries across 12 versions & 1 rubygems