config

package
v0.0.0-...-bc30bd0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSchedulerName               = "godel-scheduler"
	DefaultClientConnectionContentType = "application/vnd.kubernetes.protobuf"
	DefaultClientConnectionQPS         = 10000.0
	DefaultClientConnectionBurst       = 10000
	DefaultInsecureBinderPort          = 10451
	// VolumeBindingTimeoutSeconds defines the default bind timeout
	VolumeBindingTimeoutSeconds = 100

	BinderDefaultLockObjectName      = "binder"
	DefaultReservationTimeOutSeconds = 60

	// DefaultGodelBinderAddress is the default address for the scheduler status server.
	// May be overridden by a flag at startup.
	DefaultGodelBinderAddress = "0.0.0.0"
	// DefaultIDC is default idc name for godel scheduler
	DefaultIDC = "lq"
	// DefaultCluster is default cluster name for godel scheduler
	DefaultCluster = "default"
	// DefaultTracer is default tracer name for godel scheduler
	DefaultTracer = string(tracing.NoopConfig)
)
View Source
const GroupName = "godelbinder.config.kubewharf.io"

GroupName is the group name used in this package

Variables

View Source
var (
	// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func SetDefaults_GodelBinderConfiguration

func SetDefaults_GodelBinderConfiguration(cfg *GodelBinderConfiguration)

func SetObjectDefaults_GodelBinderConfiguration

func SetObjectDefaults_GodelBinderConfiguration(in *GodelBinderConfiguration)

Types

type GodelBinderConfiguration

type GodelBinderConfiguration struct {
	metav1.TypeMeta `json:",inline"`

	// DebuggingConfiguration holds configuration for Debugging related features
	// TODO: We might wanna make this a substruct like Debugging componentbaseconfig.DebuggingConfiguration
	componentbaseconfig.DebuggingConfiguration

	// ClientConnection specifies the kubeconfig file and client connection
	// settings for the proxy server to use when communicating with the apiserver.
	ClientConnection componentbaseconfig.ClientConnectionConfiguration

	// SchedulerName specifies a scheduling system, scheduling components(dispatcher,
	// scheduler, binder) will not accept a pod, unless pod.Spec.SchedulerName == SchedulerName
	SchedulerName *string

	// LeaderElection defines the configuration of leader election client.
	LeaderElection componentbaseconfig.LeaderElectionConfiguration

	// HealthzBindAddress is the IP address and port for the health check server to serve on,
	// defaulting to 0.0.0.0:10451
	HealthzBindAddress string

	// MetricsBindAddress is the IP address and port for the metrics server to
	// serve on, defaulting to 0.0.0.0:10451.
	MetricsBindAddress string

	VolumeBindingTimeoutSeconds int64

	// Tracer defines the configuration of tracer
	Tracer *tracing.TracerConfiguration

	// reserved resources will be released after a period of time.
	ReservationTimeOutSeconds int64

	Profile *GodelBinderProfile `json:"profile"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object GodelBinderConfiguration configures a godel binder.

func (*GodelBinderConfiguration) DecodeNestedObjects

func (in *GodelBinderConfiguration) DecodeNestedObjects(d runtime.Decoder) error

DecodeNestedObjects decodes plugin args for known types.

func (*GodelBinderConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GodelBinderConfiguration.

func (*GodelBinderConfiguration) DeepCopyInto

func (in *GodelBinderConfiguration) DeepCopyInto(out *GodelBinderConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GodelBinderConfiguration) DeepCopyObject

func (in *GodelBinderConfiguration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GodelBinderConfiguration) EncodeNestedObjects

func (in *GodelBinderConfiguration) EncodeNestedObjects(e runtime.Encoder) error

EncodeNestedObjects encodes plugin args.

type GodelBinderProfile

type GodelBinderProfile struct {
	metav1.TypeMeta `json:",inline"`

	Plugins *Plugins `json:"plugins"`

	// PluginConfigs is an optional set of custom plugin arguments for each plugin.
	// Omitting config args for a plugin is equivalent to using the default config
	// for that plugin.
	PreemptionPluginConfigs []PluginConfig `json:"preemptionPluginConfigs,omitempty"`
	PluginConfigs           []PluginConfig `json:"pluginConfigs,omitempty"`
}

GodelBinderProfile is a scheduling profile.

func (*GodelBinderProfile) DeepCopy

func (in *GodelBinderProfile) DeepCopy() *GodelBinderProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GodelBinderProfile.

func (*GodelBinderProfile) DeepCopyInto

func (in *GodelBinderProfile) DeepCopyInto(out *GodelBinderProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GodelBinderProfile) DeepCopyObject

func (in *GodelBinderProfile) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type InterPodAffinityArgs

type InterPodAffinityArgs struct {
	metav1.TypeMeta `json:",inline"`

	// HardPodAffinityWeight is the scoring weight for existing pods with a
	// matching hard affinity to the incoming pod.
	HardPodAffinityWeight int32 `json:"hardPodAffinityWeight,omitempty"`
}

InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.

func (*InterPodAffinityArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterPodAffinityArgs.

func (*InterPodAffinityArgs) DeepCopyInto

func (in *InterPodAffinityArgs) DeepCopyInto(out *InterPodAffinityArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InterPodAffinityArgs) DeepCopyObject

func (in *InterPodAffinityArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeLabelArgs

type NodeLabelArgs struct {
	metav1.TypeMeta `json:",inline"`

	// PresentLabels should be present for the node to be considered a fit for hosting the pod
	PresentLabels []string `json:"presentLabels,omitempty"`
	// AbsentLabels should be absent for the node to be considered a fit for hosting the pod
	AbsentLabels []string `json:"absentLabels,omitempty"`
	// Nodes that have labels in the list will get a higher score.
	PresentLabelsPreference []string `json:"presentLabelsPreference,omitempty"`
	// Nodes that don't have labels in the list will get a higher score.
	AbsentLabelsPreference []string `json:"absentLabelsPreference,omitempty"`
}

NodeLabelArgs holds arguments used to configure the NodeLabel plugin.

func (*NodeLabelArgs) DeepCopy

func (in *NodeLabelArgs) DeepCopy() *NodeLabelArgs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLabelArgs.

func (*NodeLabelArgs) DeepCopyInto

func (in *NodeLabelArgs) DeepCopyInto(out *NodeLabelArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeLabelArgs) DeepCopyObject

func (in *NodeLabelArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeLoadArgs

type NodeLoadArgs struct {
	metav1.TypeMeta `json:",inline"`

	// LoadThreshold is the threshold to consider for node load limitation
	LoadThreshold float64 `json:"loadThreshold"`
}

NodeLoadArgs holds arguments used to configure the HighLoad plugin. TODO this should be confirmed later

func (*NodeLoadArgs) DeepCopy

func (in *NodeLoadArgs) DeepCopy() *NodeLoadArgs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLoadArgs.

func (*NodeLoadArgs) DeepCopyInto

func (in *NodeLoadArgs) DeepCopyInto(out *NodeLoadArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeLoadArgs) DeepCopyObject

func (in *NodeLoadArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeResourcesCheckArgs

type NodeResourcesCheckArgs struct {
	metav1.TypeMeta `json:",inline"`

	// IgnoredResources is the list of resources that NodeResources fit filter
	// should ignore.
	IgnoredResources []string `json:"ignoredResources,omitempty"`
	// IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore.
	// e.g. if group is ["example.com"], it will ignore all resource names that begin
	// with "example.com", such as "example.com/aaa" and "example.com/bbb".
	// A resource group name can't contain '/'.
	IgnoredResourceGroups []string `json:"ignoredResourceGroups,omitempty"`
}

NodeResourcesCheckArgs holds arguments used to configure the NodeResourcesCheck plugin.

func (*NodeResourcesCheckArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesCheckArgs.

func (*NodeResourcesCheckArgs) DeepCopyInto

func (in *NodeResourcesCheckArgs) DeepCopyInto(out *NodeResourcesCheckArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeResourcesCheckArgs) DeepCopyObject

func (in *NodeResourcesCheckArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeResourcesLeastAllocatedArgs

type NodeResourcesLeastAllocatedArgs struct {
	metav1.TypeMeta `json:",inline"`

	// Resources to be considered when scoring.
	// The default resource set includes "cpu" and "memory" with an equal weight.
	// Allowed weights go from 1 to 100.
	Resources []ResourceSpec `json:"resources,omitempty"`
}

NodeResourcesLeastAllocatedArgs holds arguments used to configure NodeResourcesLeastAllocated plugin.

func (*NodeResourcesLeastAllocatedArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesLeastAllocatedArgs.

func (*NodeResourcesLeastAllocatedArgs) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeResourcesLeastAllocatedArgs) DeepCopyObject

func (in *NodeResourcesLeastAllocatedArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeResourcesMostAllocatedArgs

type NodeResourcesMostAllocatedArgs struct {
	metav1.TypeMeta `json:",inline"`

	// Resources to be considered when scoring.
	// The default resource set includes "cpu" and "memory" with an equal weight.
	// Allowed weights go from 1 to 100.
	Resources []ResourceSpec `json:"resources,omitempty"`
}

NodeResourcesMostAllocatedArgs holds arguments used to configure NodeResourcesMostAllocated plugin.

func (*NodeResourcesMostAllocatedArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesMostAllocatedArgs.

func (*NodeResourcesMostAllocatedArgs) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeResourcesMostAllocatedArgs) DeepCopyObject

func (in *NodeResourcesMostAllocatedArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Plugin

type Plugin struct {
	// Name defines the name of plugin
	Name string `json:"name"`
	// Weight defines the weight of plugin, only used for Score plugins.
	Weight int64 `json:"weight,omitempty"`
}

Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.

func (*Plugin) DeepCopy

func (in *Plugin) DeepCopy() *Plugin

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin.

func (*Plugin) DeepCopyInto

func (in *Plugin) DeepCopyInto(out *Plugin)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PluginConfig

type PluginConfig struct {
	// Name defines the name of plugin being configured
	Name string `json:"name"`
	// Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.
	Args runtime.RawExtension `json:"args,omitempty"`
}

PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.

func (*PluginConfig) DecodeNestedObjects

func (c *PluginConfig) DecodeNestedObjects(d runtime.Decoder) error

func (*PluginConfig) DeepCopy

func (in *PluginConfig) DeepCopy() *PluginConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginConfig.

func (*PluginConfig) DeepCopyInto

func (in *PluginConfig) DeepCopyInto(out *PluginConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PluginConfig) EncodeNestedObjects

func (c *PluginConfig) EncodeNestedObjects(e runtime.Encoder) error

type Plugins

type Plugins struct {
	// Searching is a list of plugins that should be invoked in preemption phase
	VictimChecking *VictimCheckingPluginSet `json:"victimChecking,omitempty"`
}

func (*Plugins) DeepCopy

func (in *Plugins) DeepCopy() *Plugins

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins.

func (*Plugins) DeepCopyInto

func (in *Plugins) DeepCopyInto(out *Plugins)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodTopologySpreadArgs

type PodTopologySpreadArgs struct {
	metav1.TypeMeta `json:",inline"`

	// DefaultConstraints defines topology spread constraints to be applied to
	// pods that don't define any in `pod.spec.topologySpreadConstraints`.
	// `topologySpreadConstraint.labelSelectors` must be empty, as they are
	// deduced the pods' membership to Services, Replication Controllers, Replica
	// Sets or Stateful Sets.
	// Empty by default.
	DefaultConstraints []v1.TopologySpreadConstraint `json:"defaultConstraints,omitempty"`
}

PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.

func (*PodTopologySpreadArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTopologySpreadArgs.

func (*PodTopologySpreadArgs) DeepCopyInto

func (in *PodTopologySpreadArgs) DeepCopyInto(out *PodTopologySpreadArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodTopologySpreadArgs) DeepCopyObject

func (in *PodTopologySpreadArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RequestedToCapacityRatioArgs

type RequestedToCapacityRatioArgs struct {
	metav1.TypeMeta `json:",inline"`

	// Points defining priority function shape
	Shape []UtilizationShapePoint `json:"shape"`
	// Resources to be considered when scoring.
	// The default resource set includes "cpu" and "memory" with an equal weight.
	// Allowed weights go from 1 to 100.
	Resources []ResourceSpec `json:"resources,omitempty"`
}

RequestedToCapacityRatioArgs holds arguments used to configure RequestedToCapacityRatio plugin.

func (*RequestedToCapacityRatioArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedToCapacityRatioArgs.

func (*RequestedToCapacityRatioArgs) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RequestedToCapacityRatioArgs) DeepCopyObject

func (in *RequestedToCapacityRatioArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResourceSpec

type ResourceSpec struct {
	// Name of the resource.
	Name string `json:"name"`
	// Weight of the resource.
	Weight int64 `json:"weight,omitempty"`
}

ResourceSpec represents single resource.

func (*ResourceSpec) DeepCopy

func (in *ResourceSpec) DeepCopy() *ResourceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.

func (*ResourceSpec) DeepCopyInto

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceAffinityArgs

type ServiceAffinityArgs struct {
	metav1.TypeMeta `json:",inline"`

	// AffinityLabels are homogeneous for pods that are scheduled to a node.
	// (i.e. it returns true IFF this pod can be added to this node such that all other pods in
	// the same service are running on nodes with the exact same values for Labels).
	AffinityLabels []string `json:"affinityLabels,omitempty"`
	// AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring.
	AntiAffinityLabelsPreference []string `json:"antiAffinityLabelsPreference,omitempty"`
}

ServiceAffinityArgs holds arguments used to configure the ServiceAffinity plugin.

func (*ServiceAffinityArgs) DeepCopy

func (in *ServiceAffinityArgs) DeepCopy() *ServiceAffinityArgs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAffinityArgs.

func (*ServiceAffinityArgs) DeepCopyInto

func (in *ServiceAffinityArgs) DeepCopyInto(out *ServiceAffinityArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceAffinityArgs) DeepCopyObject

func (in *ServiceAffinityArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UtilizationShapePoint

type UtilizationShapePoint struct {
	// Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.
	Utilization int32 `json:"utilization"`
	// Score assigned to a given utilization (y axis). Valid values are 0 to 10.
	Score int32 `json:"score"`
}

UtilizationShapePoint represents a single point of a priority function shape.

func (*UtilizationShapePoint) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UtilizationShapePoint.

func (*UtilizationShapePoint) DeepCopyInto

func (in *UtilizationShapePoint) DeepCopyInto(out *UtilizationShapePoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VictimCheckingPluginCollection

type VictimCheckingPluginCollection struct {
	// if ForceQuickPass is true and result is PreemptionSucceed, return canBePreempted=true directly, no need to execute the rest of the preemption plugins
	ForceQuickPass bool `json:"forceQuickPass,omitempty"`
	// if EnableQuickPass is true and result is PreemptionSucceed, return canBePreempted=true, but need to execute the rest of the preemption plugins
	EnableQuickPass bool `json:"enableQuickPass,omitempty"`
	// PreemptionPlugins specifies preemption plugins in this collection
	Plugins []Plugin `json:"plugins,omitempty"`
}

func (*VictimCheckingPluginCollection) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VictimCheckingPluginCollection.

func (*VictimCheckingPluginCollection) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VictimCheckingPluginSet

type VictimCheckingPluginSet struct {
	// PluginCollections specifies preemption plugin collections that should be used.
	PluginCollections []VictimCheckingPluginCollection `json:"pluginCollections,omitempty"`
}

SearchingPluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.

func (*VictimCheckingPluginSet) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VictimCheckingPluginSet.

func (*VictimCheckingPluginSet) DeepCopyInto

func (in *VictimCheckingPluginSet) DeepCopyInto(out *VictimCheckingPluginSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeBindingArgs

type VolumeBindingArgs struct {
	metav1.TypeMeta `json:",inline"`

	// BindTimeoutSeconds is the timeout in seconds in volume binding operation.
	// Value must be non-negative integer. The value zero indicates no waiting.
	// If this value is nil, the default value will be used.
	BindTimeoutSeconds int64 `json:"bindTimeoutSeconds"`
}

VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.

func (*VolumeBindingArgs) DeepCopy

func (in *VolumeBindingArgs) DeepCopy() *VolumeBindingArgs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeBindingArgs.

func (*VolumeBindingArgs) DeepCopyInto

func (in *VolumeBindingArgs) DeepCopyInto(out *VolumeBindingArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeBindingArgs) DeepCopyObject

func (in *VolumeBindingArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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