Sha256: 3cbb6bf811080b3054e850e8461c65534977c8d82f7430ee16a1616e2e4540c9

Contents?: true

Size: 862 Bytes

Versions: 35

Compression:

Stored size: 862 Bytes

Contents

class KuberKit::Actions::KubectlDescribe
  include KuberKit::Import[
    "shell.kubectl_commands",
    "shell.local_shell",
    "kubernetes.resource_selector",
    "ui"
  ]

  Contract Maybe[String], Hash => Any
  def call(resource_name, options)
    kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
    deployer_namespace = KuberKit.current_configuration.deployer_namespace

    if !resource_name 
      resource_name  = resource_selector.call("describe", include_ingresses: true, include_pods: true)
    end

    args = nil
    if options[:follow]
      args = "-f"
    end

    kubectl_commands.describe(
      local_shell, resource_name,
      args: args,
      kubeconfig_path: kubeconfig_path, 
      namespace: deployer_namespace
    )

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

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
kuber_kit-0.9.8 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.7 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.6 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.5 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.4 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.3 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.2 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.1 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.9.0 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.8 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.7 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.6 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.5 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.4 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.3 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.2 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.1 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.8.0 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.7.1 lib/kuber_kit/actions/kubectl_describe.rb
kuber_kit-0.7.0 lib/kuber_kit/actions/kubectl_describe.rb