Class: Captive::Commands::EnvListKube
- Inherits:
-
Object
- Object
- Captive::Commands::EnvListKube
- Defined in:
- lib/captive/commands/env_list_kube.rb
Instance Method Summary collapse
-
#initialize(kubectl:) ⇒ EnvListKube
constructor
A new instance of EnvListKube.
- #run(app) ⇒ Object
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 |