Documentation ¶
Index ¶
Constants ¶
View Source
const ( NoneFilterCondition = "" NoneFilterName = "none" )
View Source
const (
PodQOSFilterName = "podQOS"
)
Variables ¶
This section is empty.
Functions ¶
func NoneFilter ¶ added in v1.1.0
func NoneFilter() *noneFilter
NoneFilter returns a Filter which skip filtering anything (into the same condition)
func PodQOSFilter ¶ added in v1.1.0
func PodQOSFilter() *podQOSFilter
PodQOSFilter returns a Filter which filters pod qos class
func RegisterCgroupReconciler ¶
func RegisterCgroupReconciler(level ReconcilerLevel, cgroupFile system.Resource, description string, fn reconcileFunc, filter Filter, conditions ...string)
RegisterCgroupReconciler registers a cgroup reconciler according to the cgroup file, reconcile function and filter conditions. A cgroup file of one level can have multiple reconcile functions with different filtered conditions.
e.g. pod-level cfs_quota can be registered both by cpuset hook and batchresource hook. While cpuset hook reconciles cfs_quota for LSE and LSR pods, batchresource reconciles pods of other QoS classes.
TODO: support priority+qos filter.
Types ¶
type Filter ¶ added in v1.1.0
type Filter interface { Name() string Filter(podMeta *statesinformer.PodMeta) string }
Filter & Conditions: 1. a condition for one cgroup file should have no more than one filter/index func 2. different indexes of one cgroup file can have different reconcile functions 3. indexes for one cgroup should be enumerable
type Reconciler ¶
type Reconciler interface {
Run(stopCh <-chan struct{}) error
}
func NewReconciler ¶
func NewReconciler(s statesinformer.StatesInformer) Reconciler
type ReconcilerLevel ¶
type ReconcilerLevel string
const ( KubeQOSLevel ReconcilerLevel = "kubeqos" PodLevel ReconcilerLevel = "pod" ContainerLevel ReconcilerLevel = "container" )
Click to show internal directories.
Click to hide internal directories.