Class: Eien::Deploy::GenerateTask
- Defined in:
- lib/eien/deploy/generate_task.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Attributes inherited from Task
#context, #namespace, #task_config
Instance Method Summary collapse
-
#initialize(context, app) ⇒ GenerateTask
constructor
A new instance of GenerateTask.
- #run! ⇒ Object
Methods included from Helpers::TimeHelpers
Constructor Details
#initialize(context, app) ⇒ GenerateTask
Returns a new instance of GenerateTask.
8 9 10 11 |
# File 'lib/eien/deploy/generate_task.rb', line 8 def initialize(context, app) @app = app super(context) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
6 7 8 |
# File 'lib/eien/deploy/generate_task.rb', line 6 def app @app end |
Instance Method Details
#run! ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/eien/deploy/generate_task.rb', line 13 def run! the_app = Eien.app_from_name(context, app) client = kubeclient_builder.build_eien_kubeclient(context) target_namespace = the_app.spec.namespace resources = [] processes = client.get_processes(namespace: target_namespace) routes = client.get_routes(namespace: target_namespace) resources += generate_for_processes(processes, the_app) resources += generate_for_routes(routes, the_app) resources end |