-
Notifications
You must be signed in to change notification settings - Fork 0
/
endpoint_slice.cr
118 lines (110 loc) · 7.04 KB
/
endpoint_slice.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
116
117
118
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
@[::K8S::GroupVersionKind(group: "discovery.k8s.io", kind: "EndpointSlice", version: "v1alpha1", full: "io.k8s.api.discovery.v1alpha1.EndpointSlice")]
@[::K8S::Properties(
address_type: {type: String, nilable: true, key: "addressType", getter: false, setter: false},
api_version: {type: String, nilable: true, key: "apiVersion", getter: false, setter: false},
endpoints: {type: Array(Api::Discovery::V1alpha1::Endpoint), nilable: true, key: "endpoints", 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},
ports: {type: Array(Api::Discovery::V1alpha1::EndpointPort), nilable: true, key: "ports", getter: false, setter: false},
)]
@[::K8S::Action(name: "post", verb: "post",
path: "/apis/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices", 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/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices", 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: "timeout_seconds", type: Int32 | Nil, default: nil},
{name: "watch", type: Bool | Nil, default: nil},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "deletecollection", verb: "delete",
path: "/apis/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices", 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: "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: "timeout_seconds", type: Int32 | Nil, default: nil},
{name: "watch", type: Bool | Nil, default: nil},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "get", verb: "get",
path: "/apis/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices/{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},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "put", verb: "put",
path: "/apis/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices/{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/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices/{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/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices/{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::Discovery::V1alpha1::EndpointSlice < ::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 = "discovery/v1alpha1"
getter kind : String = "EndpointSlice"
# addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. Default is IP
@[::JSON::Field(key: "addressType", emit_null: false)]
@[::YAML::Field(key: "addressType", emit_null: false)]
property address_type : String | Nil
# endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
@[::JSON::Field(key: "endpoints", emit_null: false)]
@[::YAML::Field(key: "endpoints", emit_null: false)]
property endpoints : Array(Api::Discovery::V1alpha1::Endpoint) | Nil
# Standard object's metadata.
@[::JSON::Field(key: "metadata", emit_null: false)]
@[::YAML::Field(key: "metadata", emit_null: false)]
property metadata : Apimachinery::Apis::Meta::V1::ObjectMeta | Nil
# ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
@[::JSON::Field(key: "ports", emit_null: false)]
@[::YAML::Field(key: "ports", emit_null: false)]
property ports : Array(Api::Discovery::V1alpha1::EndpointPort) | Nil
def initialize(*, @address_type : String | Nil = nil, @endpoints : Array | Nil = nil, @metadata : Apimachinery::Apis::Meta::V1::ObjectMeta | Nil = nil, @ports : Array | Nil = nil)
end
end
module Resources::Discovery::V1alpha1
alias EndpointSlice = ::K8S::Api::Discovery::V1alpha1::EndpointSlice
end
end