1package v1
2
3import "cue.dev/x/k8s.io/apimachinery/pkg/apis/meta/v1"
4
5// PriorityClass defines mapping from a priority class name to the priority
6// integer value. The value can be any valid integer.
7#PriorityClass: {
8 // APIVersion defines the versioned schema of this representation of an object.
9 // Servers should convert recognized schemas to the latest internal value, and
10 // may reject unrecognized values. More info:
11 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
12 "apiVersion": "scheduling.k8s.io/v1"
13
14 // description is an arbitrary string that usually provides guidelines on when
15 // this priority class should be used.
16 "description"?: string
17
18 // globalDefault specifies whether this PriorityClass should be considered as
19 // the default priority for pods that do not have any priority class. Only one
20 // PriorityClass can be marked as `globalDefault`. However, if more than one
21 // PriorityClasses exists with their `globalDefault` field set to true, the
22 // smallest value of such global default PriorityClasses will be used as the
23 // default priority.
24 "globalDefault"?: bool
25
26 // Kind is a string value representing the REST resource this object represents.
27 // Servers may infer this from the endpoint the client submits requests to.
28 // Cannot be updated. In CamelCase. More info:
29 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
30 "kind": "PriorityClass"
31
32 // Standard object's metadata. More info:
33 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
34 "metadata"?: v1.#ObjectMeta
35
36 // preemptionPolicy is the Policy for preempting pods with lower priority. One
37 // of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
38 "preemptionPolicy"?: string
39
40 // value represents the integer value of this priority class. This is the actual
41 // priority that pods receive when they have the name of this class in their
42 // pod spec.
43 "value"?: int32 & int
44}
45
46// PriorityClassList is a collection of priority classes.
47#PriorityClassList: {
48 // APIVersion defines the versioned schema of this representation of an object.
49 // Servers should convert recognized schemas to the latest internal value, and
50 // may reject unrecognized values. More info:
51 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
52 "apiVersion": "scheduling.k8s.io/v1"
53
54 // items is the list of PriorityClasses
55 "items"!: [...#PriorityClass]
56
57 // Kind is a string value representing the REST resource this object represents.
58 // Servers may infer this from the endpoint the client submits requests to.
59 // Cannot be updated. In CamelCase. More info:
60 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
61 "kind": "PriorityClassList"
62
63 // Standard list metadata More info:
64 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
65 "metadata"?: v1.#ListMeta
66}