Sha256: 39e8434511c90ef35ea9714722b3f42c708ca63e227ed7e63ee650501b1cff84

Contents?: true

Size: 627 Bytes

Versions: 11

Compression:

Stored size: 627 Bytes

Contents

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

  Contract String, Hash => Any
  def call(pod_name, options)
    kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
    deploy_namespace = KuberKit.current_configuration.deploy_namespace

    kubectl_commands.exec(
      local_shell, pod_name, "bash", args: "-it", 
      kubeconfig_path: kubeconfig_path, 
      interactive: true,
      namespace: deploy_namespace
    )

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kuber_kit-0.3.1 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.3.0 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.9 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.8 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.7 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.6 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.5 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.4 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.3 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.2 lib/kuber_kit/actions/kubectl_attacher.rb
kuber_kit-0.2.1 lib/kuber_kit/actions/kubectl_attacher.rb