Class: Captive::Commands::EnvListKube

Inherits:
Object
  • Object
show all
Defined in:
lib/captive/commands/env_list_kube.rb

Instance Method Summary collapse

Constructor Details

#initialize(kubectl:) ⇒ EnvListKube

Returns a new instance of EnvListKube.



6
7
8
# File 'lib/captive/commands/env_list_kube.rb', line 6

def initialize(kubectl:)
  @kubectl = kubectl
end

Instance Method Details

#run(app) ⇒ Object



10
11
12
13
# File 'lib/captive/commands/env_list_kube.rb', line 10

def run(app)
  data = @kubectl.get_secret_data(app, "#{app}-env")
  data.map { |k, v| "#{k}=#{v}" }
end