-
Notifications
You must be signed in to change notification settings - Fork 0
/
scale.cr
79 lines (72 loc) · 4.29 KB
/
scale.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
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# Scale represents a scaling request for a resource.
@[::K8S::GroupVersionKind(group: "apps", kind: "Scale", version: "v1beta1", full: "io.k8s.api.apps.v1beta1.Scale")]
@[::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::Apps::V1beta1::ScaleSpec, nilable: true, key: "spec", getter: false, setter: false},
status: {type: Api::Apps::V1beta1::ScaleStatus, nilable: true, key: "status", getter: false, setter: false},
)]
@[::K8S::Action(name: "get", verb: "get",
path: "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale", 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: "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil}]
)]
@[::K8S::Action(name: "patch", verb: "path",
path: "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil}]
)]
@[::K8S::Action(name: "get", verb: "get",
path: "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale", 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: "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil}]
)]
@[::K8S::Action(name: "patch", verb: "path",
path: "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil}]
)]
class Api::Apps::V1beta1::Scale < ::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 = "apps/v1beta1"
getter kind : String = "Scale"
# Standard object metadata; More info: [https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.](https://git.k8s.io/community/contributors/devel/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
# defines the behavior of the scale. More info: [https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.](https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.)
@[::JSON::Field(key: "spec", emit_null: false)]
@[::YAML::Field(key: "spec", emit_null: false)]
property spec : Api::Apps::V1beta1::ScaleSpec | Nil
# current status of the scale. More info: [https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.](https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.)
@[::JSON::Field(key: "status", emit_null: false)]
@[::YAML::Field(key: "status", emit_null: false)]
property status : Api::Apps::V1beta1::ScaleStatus | Nil
def initialize(*, @metadata : Apimachinery::Apis::Meta::V1::ObjectMeta | Nil = nil, @spec : Api::Apps::V1beta1::ScaleSpec | Nil = nil, @status : Api::Apps::V1beta1::ScaleStatus | Nil = nil)
end
end
module Resources::Apps::V1beta1
alias Scale = ::K8S::Api::Apps::V1beta1::Scale
end
end