Documentation ¶
Index ¶
- Constants
- Variables
- func KarmadaDeschedulerImage(o *CommandAddonsEnableOption) string
- func KarmadaSchedulerEstimatorImage(o *CommandAddonsEnableOption) string
- func KarmadaSearchImage(o *CommandAddonsEnableOption) string
- type Addon
- type CommandAddonsDisableOption
- type CommandAddonsEnableOption
- type CommandAddonsListOption
- type GlobalCommandOptions
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 ( // DefaultKarmadaDeschedulerImage Karmada descheduler image DefaultKarmadaDeschedulerImage string // DefaultKarmadaSchedulerEstimatorImage Karmada scheduler-estimator image DefaultKarmadaSchedulerEstimatorImage string // DefaultKarmadaSearchImage Karmada search estimator image DefaultKarmadaSearchImage string )
var Addons = map[string]*Addon{}
Addons hosts the optional components that support by karmada
Functions ¶
func KarmadaDeschedulerImage ¶ added in v1.6.0
func KarmadaDeschedulerImage(o *CommandAddonsEnableOption) string
KarmadaDeschedulerImage get karmada descheduler image
func KarmadaSchedulerEstimatorImage ¶ added in v1.6.0
func KarmadaSchedulerEstimatorImage(o *CommandAddonsEnableOption) string
KarmadaSchedulerEstimatorImage get karmada scheduler-estimator image
func KarmadaSearchImage ¶ added in v1.6.0
func KarmadaSearchImage(o *CommandAddonsEnableOption) string
KarmadaSearchImage get karmada search image
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 Force bool }
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 ImageRegistry string WaitComponentReadyTimeout int WaitAPIServiceReadyTimeout int MemberKubeConfig string MemberContext string HostClusterDomain 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.