Sha256: 4474c421bb6e2e320801abd710414f8e3a051de7891e3162a34a9cdf142f29d1

Contents?: true

Size: 692 Bytes

Versions: 82

Compression:

Stored size: 692 Bytes

Contents

class KuberKit::Actions::KubectlApplier
  include KuberKit::Import[
    "shell.kubectl_commands",
    "shell.local_shell",
    "ui"
  ]

  Contract String, Hash => Any
  def call(file_path, options)
    kubeconfig_path  = KuberKit.current_configuration.kubeconfig_path
    deployer_namespace = KuberKit.current_configuration.deployer_namespace
    ui.create_task("Applying file: #{file_path}") do |task|
      kubectl_commands.apply_file(local_shell, file_path, kubeconfig_path: kubeconfig_path, namespace: deployer_namespace)
      task.update_title("Applied file: #{file_path}")
    end

    true
  rescue KuberKit::Error => e
    ui.print_error("Error", e.message)
    
    false
  end
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
kuber_kit-1.3.8 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.7 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.1.8 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.6 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.1.7 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.5 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.4 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.1.6 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.3 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.2 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.1.5 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.1 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.3.0 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.1.4 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.2.7 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.2.6 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.2.5 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.2.4 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.2.2 lib/kuber_kit/actions/kubectl_applier.rb
kuber_kit-1.1.2 lib/kuber_kit/actions/kubectl_applier.rb