Class: Eien::InitTask

Inherits:
Task
  • Object
show all
Defined in:
lib/eien/init_task.rb

Instance Attribute Summary

Attributes inherited from Task

#context, #namespace, #task_config

Instance Method Summary collapse

Methods inherited from Task

#initialize

Methods included from Helpers::TimeHelpers

#summarize_age

Constructor Details

This class inherits a constructor from Eien::Task

Instance Method Details

#run!Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/eien/init_task.rb', line 5

def run!
  logger.reset

  logger.heading("Deploying CustomResourceDefinitions")

  Krane::CLI::GlobalDeployCommand.from_options(
    task_config.context,
    Eien.prepare_krane_options(Krane::CLI::GlobalDeployCommand::OPTIONS).merge(
      filenames: [Eien.crd_dir],
      selector: "owner=#{Eien::CRD_OWNER_SELECTOR_VALUE}",
    ),
  )

  Eien.config.context = context
  Eien.config.save!
end