clusterclient

package
v0.0.0-...-03e4ed8 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(kubeconfig string) (*client, error)

New creates and returns a Client, the kubeconfig argument is expected to be the string represenation of a valid kubeconfig.

func NewFactory

func NewFactory() *clientFactory

func NewFromDefaultSearchPath

func NewFromDefaultSearchPath(kubeconfigFile string, overrides tcmd.ConfigOverrides) (*client, error)

NewFromDefaultSearchPath creates and returns a Client. The kubeconfigFile argument is expected to be the path to a valid kubeconfig file.

Types

type Client

type Client interface {
	GetContextNamespace() string
	Apply(string) error
	Delete(string) error
	WaitForClusterV1alpha1Ready() error
	GetClusterObjectsInNamespace(string) ([]*clusterv1.Cluster, error)
	GetClusterObject(string, string) (*clusterv1.Cluster, error)
	GetMachineDeploymentObjects() ([]*clusterv1.MachineDeployment, error)
	GetMachineDeploymentObjectsInNamespace(string) ([]*clusterv1.MachineDeployment, error)
	GetMachineSetObjects() ([]*clusterv1.MachineSet, error)
	GetMachineSetObjectsInNamespace(string) ([]*clusterv1.MachineSet, error)
	GetMachineObjects() ([]*clusterv1.Machine, error)
	GetMachineObjectsInNamespace(ns string) ([]*clusterv1.Machine, error)
	CreateClusterObject(*clusterv1.Cluster) error
	CreateMachineDeploymentObjects([]*clusterv1.MachineDeployment, string) error
	CreateMachineSetObjects([]*clusterv1.MachineSet, string) error
	CreateMachineObjects([]*clusterv1.Machine, string) error
	DeleteClusterObjectsInNamespace(string) error
	DeleteClusterObjects() error
	DeleteMachineDeploymentObjectsInNamespace(string) error
	DeleteMachineDeploymentObjects() error
	DeleteMachineSetObjectsInNamespace(string) error
	DeleteMachineSetObjects() error
	DeleteMachineObjectsInNamespace(string) error
	DeleteMachineObjects() error
	UpdateClusterObjectEndpoint(string, string, string) error
	EnsureNamespace(string) error
	DeleteNamespace(string) error
	Close() error
}

Provides interaction with a cluster

type Factory

type Factory interface {
	NewClientFromKubeconfig(string) (Client, error)
	NewCoreClientsetFromKubeconfigFile(string) (*kubernetes.Clientset, error)
}

Factory can create cluster clients

Jump to

Keyboard shortcuts

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