k8s_pb/api/node/v1alpha1/
mod.rs

1// This file is @generated by prost-build.
2/// Overhead structure represents the resource overhead associated with running a pod.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Overhead {
5    /// podFixed represents the fixed resource overhead associated with running a pod.
6    /// +optional
7    #[prost(btree_map = "string, message", tag = "1")]
8    pub pod_fixed: ::prost::alloc::collections::BTreeMap<
9        ::prost::alloc::string::String,
10        super::super::super::apimachinery::pkg::api::resource::Quantity,
11    >,
12}
13/// RuntimeClass defines a class of container runtime supported in the cluster.
14/// The RuntimeClass is used to determine which container runtime is used to run
15/// all containers in a pod. RuntimeClasses are (currently) manually defined by a
16/// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is
17/// responsible for resolving the RuntimeClassName reference before running the
18/// pod.  For more details, see
19/// <https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class>
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct RuntimeClass {
22    /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
23    /// +optional
24    #[prost(message, optional, tag = "1")]
25    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
26    /// spec represents specification of the RuntimeClass
27    /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
28    #[prost(message, optional, tag = "2")]
29    pub spec: ::core::option::Option<RuntimeClassSpec>,
30}
31/// RuntimeClassList is a list of RuntimeClass objects.
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct RuntimeClassList {
34    /// Standard list metadata.
35    /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
36    /// +optional
37    #[prost(message, optional, tag = "1")]
38    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
39    /// items is a list of schema objects.
40    #[prost(message, repeated, tag = "2")]
41    pub items: ::prost::alloc::vec::Vec<RuntimeClass>,
42}
43/// RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters
44/// that are required to describe the RuntimeClass to the Container Runtime
45/// Interface (CRI) implementation, as well as any other components that need to
46/// understand how the pod will be run. The RuntimeClassSpec is immutable.
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct RuntimeClassSpec {
49    /// runtimeHandler specifies the underlying runtime and configuration that the
50    /// CRI implementation will use to handle pods of this class. The possible
51    /// values are specific to the node & CRI configuration.  It is assumed that
52    /// all handlers are available on every node, and handlers of the same name are
53    /// equivalent on every node.
54    /// For example, a handler called "runc" might specify that the runc OCI
55    /// runtime (using native Linux containers) will be used to run the containers
56    /// in a pod.
57    /// The runtimeHandler must be lowercase, conform to the DNS Label (RFC 1123)
58    /// requirements, and is immutable.
59    #[prost(string, optional, tag = "1")]
60    pub runtime_handler: ::core::option::Option<::prost::alloc::string::String>,
61    /// overhead represents the resource overhead associated with running a pod for a
62    /// given RuntimeClass. For more details, see
63    /// <https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md>
64    /// +optional
65    #[prost(message, optional, tag = "2")]
66    pub overhead: ::core::option::Option<Overhead>,
67    /// scheduling holds the scheduling constraints to ensure that pods running
68    /// with this RuntimeClass are scheduled to nodes that support it.
69    /// If scheduling is nil, this RuntimeClass is assumed to be supported by all
70    /// nodes.
71    /// +optional
72    #[prost(message, optional, tag = "3")]
73    pub scheduling: ::core::option::Option<Scheduling>,
74}
75/// Scheduling specifies the scheduling constraints for nodes supporting a
76/// RuntimeClass.
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct Scheduling {
79    /// nodeSelector lists labels that must be present on nodes that support this
80    /// RuntimeClass. Pods using this RuntimeClass can only be scheduled to a
81    /// node matched by this selector. The RuntimeClass nodeSelector is merged
82    /// with a pod's existing nodeSelector. Any conflicts will cause the pod to
83    /// be rejected in admission.
84    /// +optional
85    /// +mapType=atomic
86    #[prost(btree_map = "string, string", tag = "1")]
87    pub node_selector:
88        ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
89    /// tolerations are appended (excluding duplicates) to pods running with this
90    /// RuntimeClass during admission, effectively unioning the set of nodes
91    /// tolerated by the pod and the RuntimeClass.
92    /// +optional
93    /// +listType=atomic
94    #[prost(message, repeated, tag = "2")]
95    pub tolerations: ::prost::alloc::vec::Vec<super::super::core::v1::Toleration>,
96}