Sha256: 7b591acdad44611f71273a6bf1fc1d568729a0e050cac361f1df61884c4602cc
Contents?: true
Size: 930 Bytes
Versions: 3
Compression:
Stored size: 930 Bytes
Contents
# frozen_string_literal: true require "cloud/sh/commands/base" module Cloud module Sh module Commands class K8sTail < Base def execute puts "Command: #{command}" puts "Env: #{env.inspect}\n" exec env, command end def command [ exe, "^" + (options[:pod] == "all" ? "." : options[:pod]), "--context #{options[:context]}", "--namespace #{options[:namespace]}", "--regex", "--tail #{options[:tail]}", "--since 240h", "--colored-output pod", "--follow true" ].join(" ") end def exe File.expand_path("../../../../exe/vendor/kubetail", __dir__) end def env { "KUBECONFIG" => Cloud::Sh::Providers::DigitalOcean.kube_config } end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cloud-sh-1.0.2 | lib/cloud/sh/commands/k8s_tail.rb |
cloud-sh-1.0.1 | lib/cloud/sh/commands/k8s_tail.rb |
cloud-sh-1.0.0 | lib/cloud/sh/commands/k8s_tail.rb |