k8s

package
v0.0.0-...-a8f3bf5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*kubernetes.Clientset
}

Client is en embedded type of kubernetes clientset

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient initializes a new clientset for the given config

func (*Client) GetPodFromListByName

func (c *Client) GetPodFromListByName(name string, pods *v1.PodList) (*v1.Pod, error)

GetPodFromListByName returns a pod in the PodList corresponding to the given name

func (*Client) GetPodList

func (c *Client) GetPodList(namespace string) (*v1.PodList, error)

GetPodList returns a list of pods for the given namespace without any option if namespace is empty, all pods in all namespaces will be returned

func (*Client) GetPodListWithOpts

func (c *Client) GetPodListWithOpts(namespace string, kind, label, field string, uninitialized, watch bool, resource string) (*v1.PodList, error)

GetPodListWithOpts returns a list of pods for all namespaces corresponding to certains given options

type Config

type Config struct {
	*rest.Config
}

Config is an embedded type of Kubernetes' rest client Config

func NewConfigFromRestTlsData

func NewConfigFromRestTlsData(serverName, host string, port int, apiPath string, caData, certData, keyData []byte) *Config

NewConfigFromRestTls returns a new config with TLS certificate data

func NewConfigFromRestTlsFile

func NewConfigFromRestTlsFile(serverName, host string, port int, apiPath, caFile, certFile, keyFile string) *Config

NewConfigFromRestTls returns a new config with TLS certificate files

Jump to

Keyboard shortcuts

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