Documentation
¶
Index ¶
- func ParseK8sYaml(filepath string) ([]runtime.Object, []*schema.GroupVersionKind, error)
- type Cluster
- func (c *Cluster) ApplyFiles(source string, namespace string) error
- func (c *Cluster) CreateMachine(namespace string, gnaSecretName string) error
- func (c *Cluster) CreateMachineDeployment(namespace string, gnaSecretName string, replicas int32) error
- func (c *Cluster) DeleteResources(source string, namespace string) error
- func (c *Cluster) FillClientSets() error
- func (c *Cluster) GetNumberOfNodes() int16
- func (c *Cluster) GetNumberOfReadyNodes() int16
- func (c *Cluster) GetSecretData(machineClassName string, secretRefs ...*v1.SecretReference) (map[string][]byte, error)
- func (c *Cluster) IsTestMachineDeleted() bool
- func (c *Cluster) ProbeNodes() error
- func (c *Cluster) VerifyControlClusterNamespace(isControlSeed string, controlClusterNamespace string) error
- type ResourcesTrackerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseK8sYaml ¶
ParseK8sYaml reads a yaml file and parses it based on the scheme
Types ¶
type Cluster ¶
type Cluster struct { Clientset *kubernetes.Clientset McmClient *mcmClientset.Clientset RbacClient *rbac.RbacV1Client KubeConfigFilePath string // contains filtered or unexported fields }
Cluster type to hold cluster specific details
func NewCluster ¶
NewCluster returns a Cluster struct
func (*Cluster) ApplyFiles ¶
ApplyFiles invokes ApplyFile on a each file
func (*Cluster) CreateMachine ¶
CreateMachine creates a test-machine using machineclass "test-mc"
func (*Cluster) CreateMachineDeployment ¶
func (c *Cluster) CreateMachineDeployment(namespace string, gnaSecretName string, replicas int32) error
CreateMachineDeployment creates a test-machine-deployment with 3 replicas and returns error if it occurs
func (*Cluster) DeleteResources ¶
DeleteResources invokes DeleteResource on a each file
func (*Cluster) FillClientSets ¶
FillClientSets checks whether the cluster is accessible and returns an error if not
func (*Cluster) GetNumberOfNodes ¶
GetNumberOfNodes tries to retrieve the list of node objects in the cluster.
func (*Cluster) GetNumberOfReadyNodes ¶
GetNumberOfReadyNodes tries to retrieve the list of node objects in the cluster.
func (*Cluster) GetSecretData ¶
func (c *Cluster) GetSecretData(machineClassName string, secretRefs ...*v1.SecretReference) (map[string][]byte, error)
GetSecretData combines secrets
func (*Cluster) IsTestMachineDeleted ¶ added in v0.42.0
IsTestMachineDeleted returns boolean value of presence of 'test-machine' object
func (*Cluster) ProbeNodes ¶
ProbeNodes tries to probe for nodes.
func (*Cluster) VerifyControlClusterNamespace ¶ added in v0.51.0
func (c *Cluster) VerifyControlClusterNamespace(isControlSeed string, controlClusterNamespace string) error
VerifyControlClusterNamespace validates the control namespace provided by the user. It checks the following:- 1. If it is a seed, then it should not use a default namespace as the control namespace. 2. The control namespace should be present in the control cluster.
type ResourcesTrackerInterface ¶
type ResourcesTrackerInterface interface { IsOrphanedResourcesAvailable() bool InitializeResourcesTracker( machineClass *v1alpha1.MachineClass, secretData map[string][]byte, clusterName string, ) error }
ResourcesTrackerInterface provides an interface to check for orphan resources. The implementation should handle probing for resources while contructing or calling New method And reporting orphan resources whenever IsOrphanedResourcesAvailable is invoked