Documentation ¶
Index ¶
- type GenericConfiguration
- type MetricsConfiguration
- type QoSConfiguration
- func (c *QoSConfiguration) CheckDedicatedQoS(annotations map[string]string) (bool, error)
- func (c *QoSConfiguration) CheckDedicatedQoSForPod(pod *v1.Pod) (bool, error)
- func (c *QoSConfiguration) CheckReclaimedQoS(annotations map[string]string) (bool, error)
- func (c *QoSConfiguration) CheckReclaimedQoSForPod(pod *v1.Pod) (bool, error)
- func (c *QoSConfiguration) CheckSharedQoS(annotations map[string]string) (bool, error)
- func (c *QoSConfiguration) CheckSharedQoSForPod(pod *v1.Pod) (bool, error)
- func (c *QoSConfiguration) CheckSystemQoS(annotations map[string]string) (bool, error)
- func (c *QoSConfiguration) CheckSystemQoSForPod(pod *v1.Pod) (bool, error)
- func (c *QoSConfiguration) FilterQoSAndEnhancement(annotations map[string]string) (map[string]string, error)
- func (c *QoSConfiguration) FilterQoSMap(annotations map[string]string) map[string]string
- func (c *QoSConfiguration) GetQoSEnhancements(annotations map[string]string) map[string]string
- func (c *QoSConfiguration) GetQoSEnhancementsForPod(pod *v1.Pod) map[string]string
- func (c *QoSConfiguration) GetQoSLevel(annotations map[string]string) (string, error)
- func (c *QoSConfiguration) GetQoSLevelForPod(pod *v1.Pod) (string, error)
- func (c *QoSConfiguration) SetExpandQoSEnhancementSelector(enhancementAdapter map[string]string)
- func (c *QoSConfiguration) SetExpandQoSLevelSelector(qosLevel string, selectorMap map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericConfiguration ¶
type GenericConfiguration struct { GenericEndpoint string GenericEndpointHandleChains []string GenericAuthStaticUser string GenericAuthStaticPasswd string *QoSConfiguration *MetricsConfiguration }
GenericConfiguration stores all the generic configurations needed by core katalyst components
func NewGenericConfiguration ¶
func NewGenericConfiguration() *GenericConfiguration
NewGenericConfiguration creates a new generic configuration.
type MetricsConfiguration ¶
MetricsConfiguration defines metrics used by metrics, including all kinds of metrics implementations and metrics pool implementations.
func NewMetricsConfiguration ¶
func NewMetricsConfiguration() *MetricsConfiguration
type QoSConfiguration ¶
type QoSConfiguration struct { sync.RWMutex // QoSClassAnnotationSelector is used as an expanded way to match legacy specified // QoS annotations into standard katalyst QoS level // - if no expended selector is configured // --- only use the default key-value instead // - if multiple expended selectors are defined // --- returns true if anyone matches // - we should also do validation QoSClassAnnotationSelector map[string]map[string]string // QoSEnhancementAnnotationKey is used as an expanded way to match legacy specified // QoS annotations into standard katalyst QoS enhancement QoSEnhancementAnnotationSelector map[string]string // contains filtered or unexported fields }
QoSConfiguration stores the qos configurations needed by core katalyst components. since we may have legacy QoS judgement ways, we should map those legacy configs into standard katalyst QoS Level.
func NewQoSConfiguration ¶
func NewQoSConfiguration() *QoSConfiguration
NewQoSConfiguration creates a new qos configuration.
func (*QoSConfiguration) CheckDedicatedQoS ¶
func (c *QoSConfiguration) CheckDedicatedQoS(annotations map[string]string) (bool, error)
CheckDedicatedQoS returns true if the annotation indicates for DedicatedCores; - returns error if different QoS configurations conflict with each other.
func (*QoSConfiguration) CheckDedicatedQoSForPod ¶
func (c *QoSConfiguration) CheckDedicatedQoSForPod(pod *v1.Pod) (bool, error)
func (*QoSConfiguration) CheckReclaimedQoS ¶
func (c *QoSConfiguration) CheckReclaimedQoS(annotations map[string]string) (bool, error)
CheckReclaimedQoS returns true if the annotation indicates for ReclaimedCores; - returns error if different QoS configurations conflict with each other.
func (*QoSConfiguration) CheckReclaimedQoSForPod ¶
func (c *QoSConfiguration) CheckReclaimedQoSForPod(pod *v1.Pod) (bool, error)
func (*QoSConfiguration) CheckSharedQoS ¶
func (c *QoSConfiguration) CheckSharedQoS(annotations map[string]string) (bool, error)
CheckSharedQoS returns true if the annotation indicates for SharedCores; - returns error if different QoS configurations conflict with each other.
func (*QoSConfiguration) CheckSharedQoSForPod ¶
func (c *QoSConfiguration) CheckSharedQoSForPod(pod *v1.Pod) (bool, error)
func (*QoSConfiguration) CheckSystemQoS ¶
func (c *QoSConfiguration) CheckSystemQoS(annotations map[string]string) (bool, error)
CheckSystemQoS returns true if the annotation indicates for SystemCores; - returns error if different QoS configurations conflict with each other.
func (*QoSConfiguration) CheckSystemQoSForPod ¶
func (c *QoSConfiguration) CheckSystemQoSForPod(pod *v1.Pod) (bool, error)
func (*QoSConfiguration) FilterQoSAndEnhancement ¶
func (c *QoSConfiguration) FilterQoSAndEnhancement(annotations map[string]string) (map[string]string, error)
FilterQoSAndEnhancement filter map that are related to katalyst QoS and katalyst Enhancement. for enhancements,we should unmarshal and store the unmarshal key-value. it works both for default katalyst QoS keys and expanded QoS keys.
func (*QoSConfiguration) FilterQoSMap ¶
func (c *QoSConfiguration) FilterQoSMap(annotations map[string]string) map[string]string
FilterQoSMap filter map that are related to katalyst QoS. it works both for default katalyst QoS keys and expanded QoS keys
func (*QoSConfiguration) GetQoSEnhancements ¶
func (c *QoSConfiguration) GetQoSEnhancements(annotations map[string]string) map[string]string
GetQoSEnhancements returns the standard katalyst QoS Enhancement Map for given annotations; - ignore conflict cases: default enhancement key always prior to expand enhancement key
func (*QoSConfiguration) GetQoSEnhancementsForPod ¶
func (c *QoSConfiguration) GetQoSEnhancementsForPod(pod *v1.Pod) map[string]string
func (*QoSConfiguration) GetQoSLevel ¶
func (c *QoSConfiguration) GetQoSLevel(annotations map[string]string) (string, error)
GetQoSLevel returns the standard katalyst QoS Level for given annotations; - returns error if there is conflict in qos level annotations or can't get valid qos level. - returns defaultQoSLevel if nothing matches and isNotDefaultQoSLevel is false.
func (*QoSConfiguration) GetQoSLevelForPod ¶
func (c *QoSConfiguration) GetQoSLevelForPod(pod *v1.Pod) (string, error)
func (*QoSConfiguration) SetExpandQoSEnhancementSelector ¶
func (c *QoSConfiguration) SetExpandQoSEnhancementSelector(enhancementAdapter map[string]string)
func (*QoSConfiguration) SetExpandQoSLevelSelector ¶
func (c *QoSConfiguration) SetExpandQoSLevelSelector(qosLevel string, selectorMap map[string]string)