Documentation ¶
Index ¶
- func NewCertTask() workflow.Task
- func NewCheckApiserverHealthTask() workflow.Task
- func NewComponentTask() workflow.Task
- func NewEtcdTask() workflow.Task
- func NewKarmadaAggregatedApiserverTask() workflow.Task
- func NewKarmadaApiserverTask() workflow.Task
- func NewKarmadaResourcesTask() workflow.Task
- func NewNamespaceTask() workflow.Task
- func NewPrepareCrdsTask() workflow.Task
- func NewRBACTask() workflow.Task
- func NewUploadCertsTask() workflow.Task
- func NewUploadKubeconfigTask() workflow.Task
- func NewWaitControlPlaneTask() workflow.Task
- type InitData
- type MyTestData
- type TestInitData
- func (t *TestInitData) AddCert(cert *certs.KarmadaCert)
- func (t *TestInitData) CertList() []*certs.KarmadaCert
- func (t *TestInitData) Components() *operatorv1alpha1.KarmadaComponents
- func (t *TestInitData) ControlplaneAddress() string
- func (t *TestInitData) ControlplaneConfig() *rest.Config
- func (t *TestInitData) CrdTarball() operatorv1alpha1.CRDTarball
- func (t *TestInitData) CustomCertificate() operatorv1alpha1.CustomCertificate
- func (t *TestInitData) DataDir() string
- func (t *TestInitData) FeatureGates() map[string]bool
- func (t *TestInitData) GetCert(name string) *certs.KarmadaCert
- func (t *TestInitData) GetName() string
- func (t *TestInitData) GetNamespace() string
- func (t *TestInitData) KarmadaClient() clientset.Interface
- func (t *TestInitData) KarmadaVersion() string
- func (t *TestInitData) LoadCertFromSecret(secret *corev1.Secret) error
- func (t *TestInitData) RemoteClient() clientset.Interface
- func (t *TestInitData) SetControlplaneConfig(config *rest.Config)
- type TestInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCertTask ¶
NewCertTask init a Certs task to generate all of karmada certs
func NewCheckApiserverHealthTask ¶
NewCheckApiserverHealthTask init wait-apiserver task
func NewComponentTask ¶
NewComponentTask init a components task
func NewEtcdTask ¶
NewEtcdTask init a etcd task to install etcd component
func NewKarmadaAggregatedApiserverTask ¶
NewKarmadaAggregatedApiserverTask inits a task to install karmada-aggregated-apiserver component
func NewKarmadaApiserverTask ¶
NewKarmadaApiserverTask inits a task to install karmada-apiserver component
func NewKarmadaResourcesTask ¶
NewKarmadaResourcesTask init KarmadaResources task
func NewNamespaceTask ¶
NewNamespaceTask init a task to create namespace
func NewPrepareCrdsTask ¶
NewPrepareCrdsTask init a prepare-crds task
func NewRBACTask ¶ added in v1.7.0
NewRBACTask init a RBAC task, it will create clusterrole for view/edit karmada resources
func NewUploadCertsTask ¶
NewUploadCertsTask init a Upload-Certs task
func NewUploadKubeconfigTask ¶
NewUploadKubeconfigTask init a task to upload karmada kubeconfig and all of karmada certs to secret
func NewWaitControlPlaneTask ¶
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
func (t *TestInitData) Components() *operatorv1alpha1.KarmadaComponents
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.