quotaforestmanager

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Quota Manager Forest Name
	QuotaManagerForestName string = "MCAD-CONTROLLER-FOREST"

	// Default Tree Name
	DefaultQuotaTreeName = "UNKNOWNTREENAME"

	// Default Tree Node Name
	DefaultQuotaNodeName = "UNKNOWNTREENODENAME"

	MaxInt = int(^uint(0) >> 1)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type QuotaGroup

type QuotaGroup struct {
	GroupContext string `json:"groupcontext"`
	GroupId      string `json:"groupid"`
}

type QuotaManager

type QuotaManager struct {
	// contains filtered or unexported fields
}

QuotaManager implements a QuotaManagerInterface.

func NewQuotaManager

func NewQuotaManager(dispatchedAWDemands map[string]*clusterstateapi.Resource, dispatchedAWs map[string]*arbv1.AppWrapper,
	awJobLister listersv1beta1.AppWrapperLister, restConfig *rest.Config, mcadConfig *config.MCADConfiguration) (*QuotaManager, error)

func (*QuotaManager) Fits

func (qm *QuotaManager) Fits(aw *arbv1.AppWrapper, awResDemands *clusterstateapi.Resource, clusterResources *clusterstateapi.Resource,
	proposedPreemptions []*arbv1.AppWrapper) (bool, []*arbv1.AppWrapper, string)

func (*QuotaManager) GetValidQuotaLabels added in v1.32.0

func (qm *QuotaManager) GetValidQuotaLabels() []string

func (*QuotaManager) Release

func (qm *QuotaManager) Release(aw *arbv1.AppWrapper) bool

type QuotaResponse

type QuotaResponse struct {
	Id          string       `json:"id"`
	Groups      []QuotaGroup `json:"groups"`
	Demand      []int        `json:"demand"`
	Priority    int          `json:"priority"`
	Preemptable bool         `json:"preemptable"`
	PreemptIds  []string     `json:"preemptedIds"`
	CreateDate  string       `json:"dateCreated"`
}

type Request

type Request struct {
	Id          string       `json:"id"`
	Groups      []QuotaGroup `json:"groups"`
	Demand      []int        `json:"demand"`
	Priority    int          `json:"priority"`
	Preemptable bool         `json:"preemptable"`
}

type TreeNode

type TreeNode struct {
	Allocation string     `json:"allocation"`
	Quota      string     `json:"quota"`
	Name       string     `json:"name"`
	Hard       bool       `json:"hard"`
	Children   []TreeNode `json:"children"`
	Parent     string     `json:"parent"`
}

Directories

Path Synopsis
qm_lib_backend_with_quotasubt_mgr
quotasubtmgr/util
------------------------------------------------------ {COPYRIGHT-TOP} --- Copyright 2019, 2021, 2022, 2023 The Multi-Cluster App Dispatcher Authors.
------------------------------------------------------ {COPYRIGHT-TOP} --- Copyright 2019, 2021, 2022, 2023 The Multi-Cluster App Dispatcher Authors.

Jump to

Keyboard shortcuts

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