Method: Krane::DeployTask#initialize
- Defined in:
- lib/krane/deploy_task.rb
#initialize(namespace:, context:, current_sha: nil, logger: nil, kubectl_instance: nil, bindings: {}, global_timeout: nil, selector: nil, selector_as_filter: false, filenames: [], protected_namespaces: nil, render_erb: false, kubeconfig: nil) ⇒ DeployTask
Initializes the deploy task
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/krane/deploy_task.rb', line 107 def initialize(namespace:, context:, current_sha: nil, logger: nil, kubectl_instance: nil, bindings: {}, global_timeout: nil, selector: nil, selector_as_filter: false, filenames: [], protected_namespaces: nil, render_erb: false, kubeconfig: nil) @logger = logger || Krane::FormattedLogger.build(namespace, context) @template_sets = TemplateSets.from_dirs_and_files(paths: filenames, logger: @logger, render_erb: render_erb) @task_config = Krane::TaskConfig.new(context, namespace, @logger, kubeconfig) @bindings = bindings @namespace = namespace = [] @context = context @current_sha = current_sha @kubectl = kubectl_instance @global_timeout = global_timeout @selector = selector @selector_as_filter = selector_as_filter @protected_namespaces = protected_namespaces || PROTECTED_NAMESPACES @render_erb = render_erb end |