Class: Cuber::Commands::Logs
- Inherits:
-
Object
- Object
- Cuber::Commands::Logs
- Includes:
- Utils
- Defined in:
- lib/cuber/commands/logs.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options) ⇒ Logs
constructor
A new instance of Logs.
Methods included from Utils
Constructor Details
#initialize(options) ⇒ Logs
Returns a new instance of Logs.
5 6 7 |
# File 'lib/cuber/commands/logs.rb', line 5 def initialize @options = end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/cuber/commands/logs.rb', line 9 def execute pod = ARGV.first cmd = ['logs'] cmd += pod ? [pod] : ['-l', "app.kubernetes.io/name=#{@options[:app]}"] cmd += ['--all-containers'] kubectl *cmd end |