Documentation ¶
Index ¶
- Constants
- func Decompress(key string, value []byte) (string, string)
- func DumpConfiguration()
- func FlattenConfigMaps(configMaps []*v1.ConfigMap) map[string]string
- func GetBuildInfoMap() map[string]string
- func GetBuildInfoString() string
- func GetDefaultKubeConfigPath() string
- func GetSchedulerNamespace() string
- func SetSchedulerConf(conf *SchedulerConf)
- func UpdateConfigMaps(configMaps []*v1.ConfigMap, initial bool) error
- type SchedulerConf
- func (conf *SchedulerConf) Clone() *SchedulerConf
- func (conf *SchedulerConf) GetKubeConfigPath() string
- func (conf *SchedulerConf) GetSchedulingInterval() time.Duration
- func (conf *SchedulerConf) IsOperatorPluginEnabled(name string) bool
- func (conf *SchedulerConf) IsTestMode() bool
- func (conf *SchedulerConf) SetTestMode(testMode bool)
- type SchedulerConfFactory
Constants ¶
View Source
const ( // env vars EnvHome = "HOME" EnvKubeConfig = "KUBECONFIG" EnvNamespace = "NAMESPACE" // prefixes PrefixService = "service." PrefixLog = "log." PrefixKubernetes = "kubernetes." PrefixAdmissionController = "admissionController." // service CMSvcClusterID = PrefixService + "clusterId" CMSvcPolicyGroup = PrefixService + "policyGroup" CMSvcSchedulingInterval = PrefixService + "schedulingInterval" CMSvcVolumeBindTimeout = PrefixService + "volumeBindTimeout" CMSvcEventChannelCapacity = PrefixService + "eventChannelCapacity" CMSvcDispatchTimeout = PrefixService + "dispatchTimeout" CMSvcOperatorPlugins = PrefixService + "operatorPlugins" CMSvcDisableGangScheduling = PrefixService + "disableGangScheduling" CMSvcEnableConfigHotRefresh = PrefixService + "enableConfigHotRefresh" CMSvcPlaceholderImage = PrefixService + "placeholderImage" CMSvcNodeInstanceTypeNodeLabelKey = PrefixService + "nodeInstanceTypeNodeLabelKey" // kubernetes CMKubeQPS = PrefixKubernetes + "qps" CMKubeBurst = PrefixKubernetes + "burst" // admissioncontroller PrefixAMFiltering = PrefixAdmissionController + "filtering." AMFilteringGenerateUniqueAppIds = PrefixAMFiltering + "generateUniqueAppId" // defaults DefaultNamespace = "default" DefaultClusterID = "mycluster" DefaultPolicyGroup = "queues" DefaultSchedulingInterval = time.Second DefaultVolumeBindTimeout = 10 * time.Second DefaultEventChannelCapacity = 1024 * 1024 DefaultDispatchTimeout = 300 * time.Second DefaultOperatorPlugins = "general" DefaultDisableGangScheduling = false DefaultEnableConfigHotRefresh = true DefaultKubeQPS = 1000 DefaultKubeBurst = 1000 DefaultAMFilteringGenerateUniqueAppIds = false )
Variables ¶
This section is empty.
Functions ¶
func DumpConfiguration ¶ added in v1.2.0
func DumpConfiguration()
func FlattenConfigMaps ¶ added in v1.2.0
func GetBuildInfoMap ¶ added in v1.4.0
func GetBuildInfoString ¶ added in v1.4.0
func GetBuildInfoString() string
func GetDefaultKubeConfigPath ¶ added in v1.2.0
func GetDefaultKubeConfigPath() string
func GetSchedulerNamespace ¶ added in v1.2.0
func GetSchedulerNamespace() string
func SetSchedulerConf ¶ added in v1.2.0
func SetSchedulerConf(conf *SchedulerConf)
Types ¶
type SchedulerConf ¶
type SchedulerConf struct { SchedulerName string `json:"schedulerName"` ClusterID string `json:"clusterId"` ClusterVersion string `json:"clusterVersion"` PolicyGroup string `json:"policyGroup"` Interval time.Duration `json:"schedulingIntervalSecond"` KubeConfig string `json:"absoluteKubeConfigFilePath"` VolumeBindTimeout time.Duration `json:"volumeBindTimeout"` TestMode bool `json:"testMode"` EventChannelCapacity int `json:"eventChannelCapacity"` DispatchTimeout time.Duration `json:"dispatchTimeout"` KubeQPS int `json:"kubeQPS"` KubeBurst int `json:"kubeBurst"` OperatorPlugins string `json:"operatorPlugins"` EnableConfigHotRefresh bool `json:"enableConfigHotRefresh"` DisableGangScheduling bool `json:"disableGangScheduling"` UserLabelKey string `json:"userLabelKey"` PlaceHolderImage string `json:"placeHolderImage"` InstanceTypeNodeLabelKey string `json:"instanceTypeNodeLabelKey"` Namespace string `json:"namespace"` GenerateUniqueAppIds bool `json:"generateUniqueAppIds"` sync.RWMutex }
func CreateDefaultConfig ¶ added in v1.2.0
func CreateDefaultConfig() *SchedulerConf
CreateDefaultConfig creates and returns a configuration representing all default values
func GetSchedulerConf ¶
func GetSchedulerConf() *SchedulerConf
func (*SchedulerConf) Clone ¶ added in v1.2.0
func (conf *SchedulerConf) Clone() *SchedulerConf
func (*SchedulerConf) GetKubeConfigPath ¶
func (conf *SchedulerConf) GetKubeConfigPath() string
func (*SchedulerConf) GetSchedulingInterval ¶
func (conf *SchedulerConf) GetSchedulingInterval() time.Duration
func (*SchedulerConf) IsOperatorPluginEnabled ¶
func (conf *SchedulerConf) IsOperatorPluginEnabled(name string) bool
func (*SchedulerConf) IsTestMode ¶
func (conf *SchedulerConf) IsTestMode() bool
func (*SchedulerConf) SetTestMode ¶
func (conf *SchedulerConf) SetTestMode(testMode bool)
type SchedulerConfFactory ¶
type SchedulerConfFactory = func() *SchedulerConf
Click to show internal directories.
Click to hide internal directories.