helpers

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseK8sYaml

func ParseK8sYaml(filepath string) ([]runtime.Object, []*schema.GroupVersionKind, error)

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

func NewCluster(kubeConfigPath string) (c *Cluster, e error)

NewCluster returns a Cluster struct

func (*Cluster) ApplyFiles

func (c *Cluster) ApplyFiles(source string, namespace string) error

ApplyFiles invokes ApplyFile on a each file

func (*Cluster) CreateMachine

func (c *Cluster) CreateMachine(namespace string) error

CreateMachine creates a test-machine using machineclass "test-mc"

func (*Cluster) CreateMachineDeployment

func (c *Cluster) CreateMachineDeployment(namespace string) error

CreateMachineDeployment creates a test-machine-deployment with 3 replicas and returns error if it occurs

func (*Cluster) DeleteResources

func (c *Cluster) DeleteResources(source string, namespace string) error

DeleteResources invokes DeleteResource on a each file

func (*Cluster) FillClientSets

func (c *Cluster) FillClientSets() error

FillClientSets checks whether the cluster is accessible and returns an error if not

func (*Cluster) GetNumberOfNodes

func (c *Cluster) GetNumberOfNodes() int16

GetNumberOfNodes tries to retrieve the list of node objects in the cluster.

func (*Cluster) GetNumberOfReadyNodes

func (c *Cluster) GetNumberOfReadyNodes() int16

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

func (c *Cluster) IsTestMachineDeleted() bool

IsTestMachineDeleted returns boolean value of presence of 'test-machine' object

func (*Cluster) ProbeNodes

func (c *Cluster) ProbeNodes() error

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

Jump to

Keyboard shortcuts

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