/
types.go
24 lines (21 loc) · 1.03 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package api
import (
"k8s.io/kubernetes/pkg/api/unversioned"
)
// ProjectRequestLimitConfig is the configuration for the project request limit plug-in
// It contains an ordered list of limits based on user label selectors. Selectors will
// be checked in order and the first one that applies will be used as the limit.
type ProjectRequestLimitConfig struct {
unversioned.TypeMeta
Limits []ProjectLimitBySelector
}
// ProjectLimitBySelector specifies the maximum number of projects allowed for a given user label selector
type ProjectLimitBySelector struct {
// Selector is a user label selector. An empty selector selects everything.
Selector map[string]string
// MaxProjects is the number of projects allowed for this class of users. If MaxProjects is nil,
// there is no limit to the number of projects users can request. An unlimited number of projects
// is useful in the case a limit is specified as the default for all users and only users with a
// specific set of labels should be allowed unlimited project creation.
MaxProjects *int
}