Documentation ¶
Index ¶
Constants ¶
const ( // AddonDisabledStatus describe a karmada addon is not installed AddonDisabledStatus = "disabled" // AddonEnabledStatus describe a karmada addon is installed AddonEnabledStatus = "enabled" // AddonUnhealthyStatus describe a karmada addon is unhealthy AddonUnhealthyStatus = "unhealthy" // AddonUnknownStatus describe a karmada addon is unknown AddonUnknownStatus = "unknown" )
const ( // DeschedulerResourceName define Descheduler Addon and component installed name DeschedulerResourceName = "karmada-descheduler" // EstimatorResourceName define Estimator Addon and component installed name EstimatorResourceName = "karmada-scheduler-estimator" // SearchResourceName define Search Addon and component installed name SearchResourceName = "karmada-search" )
Variables ¶
var Addons = map[string]*Addon{}
Addons hosts the optional components that support by karmada
Functions ¶
This section is empty.
Types ¶
type Addon ¶
type Addon struct { Name string // Status return current addon install status Status func(opts *CommandAddonsListOption) (string, error) // Enable install current addon in host cluster and Karmada control plane Enable func(opts *CommandAddonsEnableOption) error // Disable uninstall current addon in host cluster and Karmada control plane Disable func(opts *CommandAddonsDisableOption) error }
Addon describe how to enable or disable an optional component that support by karmada
type CommandAddonsDisableOption ¶
type CommandAddonsDisableOption struct { GlobalCommandOptions KarmadaKubeClientSet *kubernetes.Clientset WaitPodReadyTimeout int }
CommandAddonsDisableOption options for addons list.
func (*CommandAddonsDisableOption) Complete ¶
func (o *CommandAddonsDisableOption) Complete() error
Complete the conditions required to be able to run disable.
func (*CommandAddonsDisableOption) Run ¶
func (o *CommandAddonsDisableOption) Run(args []string) error
Run start disable Karmada addons
func (*CommandAddonsDisableOption) Validate ¶
func (o *CommandAddonsDisableOption) Validate(args []string) error
Validate Check that there are enough conditions to run the disable.
type CommandAddonsEnableOption ¶
type CommandAddonsEnableOption struct { GlobalCommandOptions KarmadaSearchImage string KarmadaSearchReplicas int32 KarmadaDeschedulerImage string KarmadaDeschedulerReplicas int32 KarmadaSchedulerEstimatorImage string KarmadaEstimatorReplicas int32 KarmadaKubeClientSet *kubernetes.Clientset WaitPodReadyTimeout int WaitAPIServiceReadyTimeout int MemberKubeConfig string MemberContext string }
CommandAddonsEnableOption options for addons list.
func (*CommandAddonsEnableOption) Complete ¶
func (o *CommandAddonsEnableOption) Complete() error
Complete the conditions required to be able to run enable.
func (*CommandAddonsEnableOption) Run ¶
func (o *CommandAddonsEnableOption) Run(args []string) error
Run start enable Karmada addons
func (*CommandAddonsEnableOption) Validate ¶
func (o *CommandAddonsEnableOption) Validate(args []string) error
Validate Check that there are enough conditions to run addon enable.
type CommandAddonsListOption ¶
type CommandAddonsListOption struct {
GlobalCommandOptions
}
CommandAddonsListOption options for addons list.
func (*CommandAddonsListOption) Complete ¶
func (o *CommandAddonsListOption) Complete() error
Complete the conditions required to be able to run list.
func (*CommandAddonsListOption) Run ¶
func (o *CommandAddonsListOption) Run() error
Run start list Karmada addons
type GlobalCommandOptions ¶
type GlobalCommandOptions struct { // KubeConfig holds host cluster KUBECONFIG file path. KubeConfig string Context string // KubeConfig holds karmada control plane KUBECONFIG file path. KarmadaConfig string KarmadaContext string // Namespace holds the namespace where Karmada components intalled Namespace string // Cluster holds the name of member cluster to enable or disable scheduler estimator Cluster string KubeClientSet *kubernetes.Clientset KarmadaRestConfig *rest.Config KarmadaAggregatorClientSet *aggregator.Clientset }
GlobalCommandOptions holds the configuration shared by the all sub-commands of `karmadactl`.
func (*GlobalCommandOptions) AddFlags ¶
func (o *GlobalCommandOptions) AddFlags(flags *pflag.FlagSet)
AddFlags adds flags to the specified FlagSet.
func (*GlobalCommandOptions) Complete ¶
func (o *GlobalCommandOptions) Complete() error
Complete the conditions required to be able to run list.