tasks

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCertTask

func NewCertTask() workflow.Task

NewCertTask init a Certs task to generate all of karmada certs

func NewCheckApiserverHealthTask

func NewCheckApiserverHealthTask() workflow.Task

NewCheckApiserverHealthTask init wait-apiserver task

func NewComponentTask

func NewComponentTask() workflow.Task

NewComponentTask init a components task

func NewEtcdTask

func NewEtcdTask() workflow.Task

NewEtcdTask init a etcd task to install etcd component

func NewKarmadaAggregatedApiserverTask

func NewKarmadaAggregatedApiserverTask() workflow.Task

NewKarmadaAggregatedApiserverTask inits a task to install karmada-aggregated-apiserver component

func NewKarmadaApiserverTask

func NewKarmadaApiserverTask() workflow.Task

NewKarmadaApiserverTask inits a task to install karmada-apiserver component

func NewKarmadaResourcesTask

func NewKarmadaResourcesTask() workflow.Task

NewKarmadaResourcesTask init KarmadaResources task

func NewNamespaceTask

func NewNamespaceTask() workflow.Task

NewNamespaceTask init a task to create namespace

func NewPrepareCrdsTask

func NewPrepareCrdsTask() workflow.Task

NewPrepareCrdsTask init a prepare-crds task

func NewRBACTask added in v1.7.0

func NewRBACTask() workflow.Task

NewRBACTask init a RBAC task, it will create clusterrole for view/edit karmada resources

func NewUploadCertsTask

func NewUploadCertsTask() workflow.Task

NewUploadCertsTask init a Upload-Certs task

func NewUploadKubeconfigTask

func NewUploadKubeconfigTask() workflow.Task

NewUploadKubeconfigTask init a task to upload karmada kubeconfig and all of karmada certs to secret

func NewWaitControlPlaneTask

func NewWaitControlPlaneTask() workflow.Task

NewWaitControlPlaneTask init wait-controlPlane task

Types

type InitData

type InitData interface {
	certs.CertStore
	GetName() string
	GetNamespace() string
	SetControlplaneConfig(config *rest.Config)
	ControlplaneConfig() *rest.Config
	ControlplaneAddress() string
	RemoteClient() clientset.Interface
	KarmadaClient() clientset.Interface
	DataDir() string
	CrdTarball() operatorv1alpha1.CRDTarball
	CustomCertificate() operatorv1alpha1.CustomCertificate
	KarmadaVersion() string
	Components() *operatorv1alpha1.KarmadaComponents
	FeatureGates() map[string]bool
}

InitData is interface to operate the runData in workflow

type MyTestData added in v1.12.0

type MyTestData struct {
	Data string
}

MyTestData is a struct that implements the TestInterface.

func (*MyTestData) Get added in v1.12.0

func (m *MyTestData) Get() string

Get returns the data stored in the MyTestData struct.

type TestInitData added in v1.12.0

type TestInitData struct {
	Name                    string
	Namespace               string
	ControlplaneConfigREST  *rest.Config
	DataDirectory           string
	CrdTarballArchive       operatorv1alpha1.CRDTarball
	CustomCertificateConfig operatorv1alpha1.CustomCertificate
	KarmadaVersionRelease   string
	ComponentsUnits         *operatorv1alpha1.KarmadaComponents
	FeatureGatesOptions     map[string]bool
	RemoteClientConnector   clientset.Interface
	KarmadaClientConnector  clientset.Interface
	ControlplaneAddr        string
	Certs                   []*certs.KarmadaCert
}

TestInitData contains the configuration and state required to initialize Karmada components.

func (*TestInitData) AddCert added in v1.12.0

func (t *TestInitData) AddCert(cert *certs.KarmadaCert)

AddCert adds a Karmada certificate to the TestInitData.

func (*TestInitData) CertList added in v1.12.0

func (t *TestInitData) CertList() []*certs.KarmadaCert

CertList returns a list of all Karmada certificates stored in TestInitData.

func (*TestInitData) Components added in v1.12.0

Components returns the Karmada components used in the current installation.

func (*TestInitData) ControlplaneAddress added in v1.12.0

func (t *TestInitData) ControlplaneAddress() string

ControlplaneAddress returns the address of the control plane.

func (*TestInitData) ControlplaneConfig added in v1.12.0

func (t *TestInitData) ControlplaneConfig() *rest.Config

ControlplaneConfig returns the control plane configuration.

func (*TestInitData) CrdTarball added in v1.12.0

func (t *TestInitData) CrdTarball() operatorv1alpha1.CRDTarball

CrdTarball returns the CRD tarball used for Karmada installation.

func (*TestInitData) CustomCertificate added in v1.12.0

func (t *TestInitData) CustomCertificate() operatorv1alpha1.CustomCertificate

CustomCertificate returns the custom certificate config.

func (*TestInitData) DataDir added in v1.12.0

func (t *TestInitData) DataDir() string

DataDir returns the data directory used by Karmada.

func (*TestInitData) FeatureGates added in v1.12.0

func (t *TestInitData) FeatureGates() map[string]bool

FeatureGates returns the feature gates enabled for the current installation.

func (*TestInitData) GetCert added in v1.12.0

func (t *TestInitData) GetCert(name string) *certs.KarmadaCert

GetCert retrieves a Karmada certificate by its name.

func (*TestInitData) GetName added in v1.12.0

func (t *TestInitData) GetName() string

GetName returns the name of the current Karmada installation.

func (*TestInitData) GetNamespace added in v1.12.0

func (t *TestInitData) GetNamespace() string

GetNamespace returns the namespace of the current Karmada installation.

func (*TestInitData) KarmadaClient added in v1.12.0

func (t *TestInitData) KarmadaClient() clientset.Interface

KarmadaClient returns the Kubernetes client for interacting with Karmada.

func (*TestInitData) KarmadaVersion added in v1.12.0

func (t *TestInitData) KarmadaVersion() string

KarmadaVersion returns the version of Karmada being used.

func (*TestInitData) LoadCertFromSecret added in v1.12.0

func (t *TestInitData) LoadCertFromSecret(secret *corev1.Secret) error

LoadCertFromSecret loads a Karmada certificate from a Kubernetes secret.

func (*TestInitData) RemoteClient added in v1.12.0

func (t *TestInitData) RemoteClient() clientset.Interface

RemoteClient returns the Kubernetes client for remote interactions.

func (*TestInitData) SetControlplaneConfig added in v1.12.0

func (t *TestInitData) SetControlplaneConfig(config *rest.Config)

SetControlplaneConfig sets the control plane configuration for Karmada.

type TestInterface added in v1.12.0

type TestInterface interface {
	// Get returns the data from the test instance.
	Get() string
}

TestInterface defines the interface for retrieving test data.

Jump to

Keyboard shortcuts

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