-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtime_class.cr
115 lines (107 loc) · 7.78 KB
/
runtime_class.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see [https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md](https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md)
@[::K8S::GroupVersionKind(group: "node.k8s.io", kind: "RuntimeClass", version: "v1beta1", full: "io.k8s.api.node.v1beta1.RuntimeClass")]
@[::K8S::Properties(
api_version: {type: String, nilable: true, key: "apiVersion", getter: false, setter: false},
handler: {type: String, nilable: false, key: "handler", getter: false, setter: false},
kind: {type: String, nilable: true, key: "kind", getter: false, setter: false},
metadata: {type: Apimachinery::Apis::Meta::V1::ObjectMeta, nilable: true, key: "metadata", getter: false, setter: false},
overhead: {type: Api::Node::V1beta1::Overhead, nilable: true, key: "overhead", getter: false, setter: false},
scheduling: {type: Api::Node::V1beta1::Scheduling, nilable: true, key: "scheduling", getter: false, setter: false},
)]
@[::K8S::Action(name: "post", verb: "post",
path: "/apis/node.k8s.io/v1beta1/runtimeclasses", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_manager", type: String | Nil, default: nil}]
)]
@[::K8S::Action(name: "list", verb: "get",
path: "/apis/node.k8s.io/v1beta1/runtimeclasses", toplevel: true,
args: [{name: "context", type: String | Nil, default: nil},
{name: "allow_watch_bookmarks", type: Bool | Nil, default: nil},
{name: "continue", type: String | Nil, default: nil},
{name: "field_selector", type: String | Nil, default: nil},
{name: "label_selector", type: String | Nil, default: nil},
{name: "limit", type: Int32 | Nil, default: nil},
{name: "resource_version", type: String | Nil, default: nil},
{name: "resource_version_match", type: String | Nil, default: nil},
{name: "timeout_seconds", type: Int32 | Nil, default: nil},
{name: "watch", type: Bool | Nil, default: nil}]
)]
@[::K8S::Action(name: "deletecollection", verb: "delete",
path: "/apis/node.k8s.io/v1beta1/runtimeclasses", toplevel: true,
args: [{name: "context", type: String | Nil, default: nil},
{name: "continue", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_selector", type: String | Nil, default: nil},
{name: "grace_period_seconds", type: Int32 | Nil, default: nil},
{name: "label_selector", type: String | Nil, default: nil},
{name: "limit", type: Int32 | Nil, default: nil},
{name: "orphan_dependents", type: Bool | Nil, default: nil},
{name: "propagation_policy", type: String | Nil, default: nil},
{name: "resource_version", type: String | Nil, default: nil},
{name: "resource_version_match", type: String | Nil, default: nil},
{name: "timeout_seconds", type: Int32 | Nil, default: nil}]
)]
@[::K8S::Action(name: "get", verb: "get",
path: "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}", toplevel: true,
args: [{name: "name", type: String},
{name: "context", type: String | Nil, default: nil},
{name: "exact", type: Bool | Nil, default: nil},
{name: "export", type: Bool | Nil, default: nil}]
)]
@[::K8S::Action(name: "put", verb: "put",
path: "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_manager", type: String | Nil, default: nil}]
)]
@[::K8S::Action(name: "patch", verb: "path",
path: "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_manager", type: String | Nil, default: nil},
{name: "force", type: Bool | Nil, default: nil}]
)]
@[::K8S::Action(name: "delete", verb: "delete",
path: "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "grace_period_seconds", type: Int32 | Nil, default: nil},
{name: "orphan_dependents", type: Bool | Nil, default: nil},
{name: "propagation_policy", type: String | Nil, default: nil}]
)]
class Api::Node::V1beta1::RuntimeClass < ::K8S::Kubernetes::Resource
include ::K8S::Kubernetes::Resource::Object
include ::JSON::Serializable
include ::YAML::Serializable
@[::JSON::Field(key: "apiVersion")]
@[::YAML::Field(key: "apiVersion")]
getter api_version : String = "node/v1beta1"
getter kind : String = "RuntimeClass"
# Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable.
@[::JSON::Field(key: "handler", emit_null: true)]
@[::YAML::Field(key: "handler", emit_null: true)]
property handler : String
# More info: [https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata)
@[::JSON::Field(key: "metadata", emit_null: false)]
@[::YAML::Field(key: "metadata", emit_null: false)]
property metadata : Apimachinery::Apis::Meta::V1::ObjectMeta | Nil
# Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see [https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.](https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.)
@[::JSON::Field(key: "overhead", emit_null: false)]
@[::YAML::Field(key: "overhead", emit_null: false)]
property overhead : Api::Node::V1beta1::Overhead | Nil
# Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
@[::JSON::Field(key: "scheduling", emit_null: false)]
@[::YAML::Field(key: "scheduling", emit_null: false)]
property scheduling : Api::Node::V1beta1::Scheduling | Nil
def initialize(*, @handler : String, @metadata : Apimachinery::Apis::Meta::V1::ObjectMeta | Nil = nil, @overhead : Api::Node::V1beta1::Overhead | Nil = nil, @scheduling : Api::Node::V1beta1::Scheduling | Nil = nil)
end
end
module Resources::Node::V1beta1
alias RuntimeClass = ::K8S::Api::Node::V1beta1::RuntimeClass
end
end