kubernetes

package
v0.0.0-...-a7b1af8 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractServiceNodePort

func ExtractServiceNodePort(svc *v1.Service, port int32) (int32, error)

func GetClient

func GetClient(configPath string) (*kubernetes.Clientset, *rest.Config, error)

func GetLabelSelector

func GetLabelSelector(labelsMap map[string]string) labels.Selector

Types

type Operator

type Operator struct {
	OperatorConfig
	// contains filtered or unexported fields
}

func NewOperator

func NewOperator(config OperatorConfig) (*Operator, error)

func (*Operator) GetNode

func (op *Operator) GetNode(name string) (*v1.Node, error)

func (*Operator) GetNodeIP

func (op *Operator) GetNodeIP() (string, error)

func (*Operator) GetService

func (op *Operator) GetService(namespace string, name string) (*v1.Service, error)

func (*Operator) ListNodes

func (op *Operator) ListNodes(labelsMap map[string]string) (*v1.NodeList, error)

func (*Operator) WatchServices

func (op *Operator) WatchServices(namespace string, labelsMap map[string]string) (watch.Interface, error)

type OperatorConfig

type OperatorConfig struct {
	// Client is k8s client
	Client *kubernetes.Clientset
	// Config is rest client config
	Config *rest.Config
}

func (*OperatorConfig) CheckAndSetDefaults

func (c *OperatorConfig) CheckAndSetDefaults() error

Jump to

Keyboard shortcuts

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