-
Notifications
You must be signed in to change notification settings - Fork 0
/
service.cr
114 lines (107 loc) · 6.5 KB
/
service.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
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
@[::K8S::GroupVersionKind(group: "", kind: "Service", version: "v1", full: "io.k8s.api.core.v1.Service")]
@[::K8S::Properties(
api_version: {type: String, nilable: true, key: "apiVersion", 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},
spec: {type: Api::Core::V1::ServiceSpec, nilable: true, key: "spec", getter: false, setter: false},
status: {type: Api::Core::V1::ServiceStatus, nilable: true, key: "status", getter: false, setter: false},
)]
@[::K8S::Action(name: "post", verb: "post",
path: "/api/v1/namespaces/{namespace}/services", 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: "/api/v1/namespaces/{namespace}/services", 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: "get", verb: "get",
path: "/api/v1/namespaces/{namespace}/services/{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: "/api/v1/namespaces/{namespace}/services/{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: "/api/v1/namespaces/{namespace}/services/{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: "/api/v1/namespaces/{namespace}/services/{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}]
)]
@[::K8S::Action(name: "get", verb: "get",
path: "/api/v1/namespaces/{namespace}/services/{name}/status", toplevel: true,
args: [{name: "name", type: String},
{name: "context", type: String | Nil, default: nil},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "put", verb: "put",
path: "/api/v1/namespaces/{namespace}/services/{name}/status", 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: "/api/v1/namespaces/{namespace}/services/{name}/status", 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}]
)]
class Api::Core::V1::Service < ::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 = "v1"
getter kind : String = "Service"
# Standard object's metadata. 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
# Spec defines the behavior of a service. [https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
@[::JSON::Field(key: "spec", emit_null: false)]
@[::YAML::Field(key: "spec", emit_null: false)]
property spec : Api::Core::V1::ServiceSpec | Nil
# Most recently observed status of the service. Populated by the system. Read-only. More info: [https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
@[::JSON::Field(key: "status", emit_null: false)]
@[::YAML::Field(key: "status", emit_null: false)]
property status : Api::Core::V1::ServiceStatus | Nil
def initialize(*, @metadata : Apimachinery::Apis::Meta::V1::ObjectMeta | Nil = nil, @spec : Api::Core::V1::ServiceSpec | Nil = nil, @status : Api::Core::V1::ServiceStatus | Nil = nil)
end
end
module Resources::V1
alias Service = ::K8S::Api::Core::V1::Service
end
end