 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func ExtractControlPlaneMachines(machines []*clusterv1.Machine) ([]*clusterv1.Machine, []*clusterv1.Machine, error)
- func GetClusterAPIObject(client Client, clusterName, namespace string) (*clusterv1.Cluster, *clusterv1.Machine, []*clusterv1.Machine, error)
- func New(kubeconfig string) (*client, error)
- func NewFactory() *clientFactory
- func NewFromDefaultSearchPath(kubeconfigFile string, overrides tcmd.ConfigOverrides) (*client, error)
- type Client
- type Factory
Constants ¶
      View Source
      
  
const (
	TimeoutMachineReady = "CLUSTER_API_MACHINE_READY_TIMEOUT"
)
    Variables ¶
This section is empty.
Functions ¶
func ExtractControlPlaneMachines ¶
func ExtractControlPlaneMachines(machines []*clusterv1.Machine) ([]*clusterv1.Machine, []*clusterv1.Machine, error)
ExtractControlPlaneMachines separates the machines running the control plane from the incoming machines. This is currently done by looking at which machine specifies the control plane version.
func GetClusterAPIObject ¶
func New ¶
New creates and returns a Client, the kubeconfig argument is expected to be the string representation of a valid kubeconfig.
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 {
	Apply(string) error
	Close() error
	CreateSecret(*corev1.Secret) error
	CreateClusterObject(*clusterv1.Cluster) error
	CreateMachineDeployments([]*clusterv1.MachineDeployment, string) error
	CreateMachineSets([]*clusterv1.MachineSet, string) error
	CreateMachines([]*clusterv1.Machine, string) error
	CreateUnstructuredObject(*unstructured.Unstructured) error
	Delete(string) error
	DeleteClusters(string) error
	DeleteNamespace(string) error
	DeleteMachineDeployments(string) error
	DeleteMachineSets(string) error
	DeleteMachines(string) error
	ForceDeleteSecret(namespace, name string) error
	ForceDeleteCluster(namespace, name string) error
	ForceDeleteMachine(namespace, name string) error
	ForceDeleteMachineSet(namespace, name string) error
	ForceDeleteMachineDeployment(namespace, name string) error
	ForceDeleteUnstructuredObject(*unstructured.Unstructured) error
	EnsureNamespace(string) error
	GetKubeconfigFromSecret(namespace, clusterName string) (string, error)
	GetClusterSecrets(*clusterv1.Cluster) ([]*corev1.Secret, error)
	GetClusters(string) ([]*clusterv1.Cluster, error)
	GetCluster(string, string) (*clusterv1.Cluster, error)
	GetContextNamespace() string
	GetMachineDeployment(namespace, name string) (*clusterv1.MachineDeployment, error)
	GetMachineDeploymentsForCluster(*clusterv1.Cluster) ([]*clusterv1.MachineDeployment, error)
	GetMachineDeployments(string) ([]*clusterv1.MachineDeployment, error)
	GetMachineSet(namespace, name string) (*clusterv1.MachineSet, error)
	GetMachineSets(namespace string) ([]*clusterv1.MachineSet, error)
	GetMachineSetsForCluster(*clusterv1.Cluster) ([]*clusterv1.MachineSet, error)
	GetMachineSetsForMachineDeployment(*clusterv1.MachineDeployment) ([]*clusterv1.MachineSet, error)
	GetMachines(namespace string) ([]*clusterv1.Machine, error)
	GetMachinesForCluster(*clusterv1.Cluster) ([]*clusterv1.Machine, error)
	GetMachinesForMachineSet(*clusterv1.MachineSet) ([]*clusterv1.Machine, error)
	GetUnstructuredObject(*unstructured.Unstructured) error
	ScaleDeployment(namespace, name string, scale int32) error
	WaitForClusterV1alpha2Ready() error
	WaitForResourceStatuses() error
	SetClusterOwnerRef(runtime.Object, *clusterv1.Cluster) error
}
    Provides interaction with a cluster
 Click to show internal directories. 
   Click to hide internal directories.