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 GetClusterAPIObject(client Client, clusterName, namespace string) (*clusterv1.Cluster, *clusterv1.Machine, []*clusterv1.Machine, error)
func New ¶
func New(kubeconfig string) (*client, error)
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
CreateClusterObject(*clusterv1.Cluster) error
CreateMachineClass(*clusterv1.MachineClass) error
CreateMachineDeployments([]*clusterv1.MachineDeployment, string) error
CreateMachineSets([]*clusterv1.MachineSet, string) error
CreateMachines([]*clusterv1.Machine, string) error
Delete(string) error
DeleteClusters(string) error
DeleteNamespace(string) error
DeleteMachineClasses(string) error
DeleteMachineClass(namespace, name string) error
DeleteMachineDeployments(string) error
DeleteMachineSets(string) error
DeleteMachines(string) error
ForceDeleteCluster(namespace, name string) error
ForceDeleteMachine(namespace, name string) error
ForceDeleteMachineSet(namespace, name string) error
ForceDeleteMachineDeployment(namespace, name string) error
EnsureNamespace(string) error
GetClusters(string) ([]*clusterv1.Cluster, error)
GetCluster(string, string) (*clusterv1.Cluster, error)
GetContextNamespace() string
GetMachineClasses(namespace string) ([]*clusterv1.MachineClass, error)
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)
ScaleStatefulSet(namespace, name string, scale int32) error
WaitForClusterV1alpha1Ready() error
UpdateClusterObjectEndpoint(string, string, string) error
WaitForResourceStatuses() error
}
Provides interaction with a cluster
Click to show internal directories.
Click to hide internal directories.