kubernetes

package
v0.25.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(
	binPath,
	workDir,
	kubeconfig string,
	serverSide,
	skipNotFound,
	clientVersion bool,
	executor execx.Executor,
) *Client

func (*Client) DeleteFromPath

func (c *Client) DeleteFromPath(path string, params ...string) (string, error)

func (*Client) DeleteResource

func (c *Client) DeleteResource(name, res, ns string) (string, error)

DeleteResource deletes the specified resource in the specified namespace.

func (*Client) DeleteResources

func (c *Client) DeleteResources(res, ns string) (string, error)

DeleteResources deletes the specified resources in the specified namespace.

func (*Client) DeleteResourcesInAllNamespaces

func (c *Client) DeleteResourcesInAllNamespaces(res string) (string, error)

DeleteResourcesInAllNamespaces deletes the specified resources in all namespaces.

func (*Client) GetIngresses

func (c *Client) GetIngresses() ([]Ingress, error)

GetIngresses returns a list of ingresses in the cluster, this is done by using the jsonpath format option of kubectl to get a valid json output to be unmarshalled.

func (*Client) GetLoadBalancers

func (c *Client) GetLoadBalancers() ([]string, error)

func (*Client) GetPersistentVolumes

func (c *Client) GetPersistentVolumes() ([]string, error)

func (*Client) HasResourceType

func (c *Client) HasResourceType(typ string) (bool, error)

func (*Client) ListNamespaceResources

func (c *Client) ListNamespaceResources(resName, ns string) ([]Resource, error)

func (*Client) ResourceExists

func (c *Client) ResourceExists(name, res, ns string) (bool, error)

func (*Client) ToolVersion

func (c *Client) ToolVersion() (string, error)

type Ingress

type Ingress struct {
	Name string
	Host []string
}

type Resource

type Resource struct {
	Name string
	Kind string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL