cue.dev/x/k8s.io@v0.7.0

api/node/v1/schema.cue raw

  1package v1
  2
  3import (
  4	"cue.dev/x/k8s.io/apimachinery/pkg/api/resource"
  5	"cue.dev/x/k8s.io/apimachinery/pkg/apis/meta/v1"
  6	v1_9 "cue.dev/x/k8s.io/api/core/v1"
  7)
  8
  9// Overhead structure represents the resource overhead associated
 10// with running a pod.
 11#Overhead: {
 12	// podFixed represents the fixed resource overhead associated with
 13	// running a pod.
 14	"podFixed"?: [string]: resource.#Quantity
 15}
 16
 17// RuntimeClass defines a class of container runtime supported in
 18// the cluster. The RuntimeClass is used to determine which
 19// container runtime is used to run all containers in a pod.
 20// RuntimeClasses are manually defined by a user or cluster
 21// provisioner, and referenced in the PodSpec. The Kubelet is
 22// responsible for resolving the RuntimeClassName reference
 23// before running the pod. For more details, see
 24// https://kubernetes.io/docs/concepts/containers/runtime-class/
 25#RuntimeClass: {
 26	// APIVersion defines the versioned schema of this representation
 27	// of an object. Servers should convert recognized schemas to the
 28	// latest internal value, and may reject unrecognized values.
 29	// More info:
 30	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 31	"apiVersion": "node.k8s.io/v1"
 32
 33	// handler specifies the underlying runtime and configuration that
 34	// the CRI implementation will use to handle pods of this class.
 35	// The possible values are specific to the node & CRI
 36	// configuration. It is assumed that all handlers are available
 37	// on every node, and handlers of the same name are equivalent on
 38	// every node. For example, a handler called "runc" might specify
 39	// that the runc OCI runtime (using native Linux containers) will
 40	// be used to run the containers in a pod. The Handler must be
 41	// lowercase, conform to the DNS Label (RFC 1123) requirements,
 42	// and is immutable.
 43	"handler"!: string
 44
 45	// Kind is a string value representing the REST resource this
 46	// object represents. Servers may infer this from the endpoint
 47	// the client submits requests to. Cannot be updated. In
 48	// CamelCase. More info:
 49	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 50	"kind": "RuntimeClass"
 51
 52	// More info:
 53	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 54	"metadata"?: v1.#ObjectMeta
 55
 56	// overhead represents the resource overhead associated with
 57	// running a pod for a given RuntimeClass. For more details, see
 58	// https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/
 59	"overhead"?: #Overhead
 60
 61	// scheduling holds the scheduling constraints to ensure that pods
 62	// running with this RuntimeClass are scheduled to nodes that
 63	// support it. If scheduling is nil, this RuntimeClass is assumed
 64	// to be supported by all nodes.
 65	"scheduling"?: #Scheduling
 66}
 67
 68// RuntimeClassList is a list of RuntimeClass objects.
 69#RuntimeClassList: {
 70	// APIVersion defines the versioned schema of this representation
 71	// of an object. Servers should convert recognized schemas to the
 72	// latest internal value, and may reject unrecognized values.
 73	// More info:
 74	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 75	"apiVersion": "node.k8s.io/v1"
 76
 77	// items is a list of schema objects.
 78	"items"!: [...#RuntimeClass]
 79
 80	// Kind is a string value representing the REST resource this
 81	// object represents. Servers may infer this from the endpoint
 82	// the client submits requests to. Cannot be updated. In
 83	// CamelCase. More info:
 84	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 85	"kind": "RuntimeClassList"
 86
 87	// Standard list metadata. More info:
 88	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 89	"metadata"?: v1.#ListMeta
 90}
 91
 92// Scheduling specifies the scheduling constraints for nodes
 93// supporting a RuntimeClass.
 94#Scheduling: {
 95	// nodeSelector lists labels that must be present on nodes that
 96	// support this RuntimeClass. Pods using this RuntimeClass can
 97	// only be scheduled to a node matched by this selector. The
 98	// RuntimeClass nodeSelector is merged with a pod's existing
 99	// nodeSelector. Any conflicts will cause the pod to be rejected
100	// in admission.
101	"nodeSelector"?: [string]: string
102
103	// tolerations are appended (excluding duplicates) to pods running
104	// with this RuntimeClass during admission, effectively unioning
105	// the set of nodes tolerated by the pod and the RuntimeClass.
106	"tolerations"?: [...v1_9.#Toleration]
107}