-
Notifications
You must be signed in to change notification settings - Fork 0
/
metric_status.cr
47 lines (39 loc) · 3.14 KB
/
metric_status.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
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# MetricStatus describes the last-read state of a single metric.
@[::K8S::Properties(
external: {type: Api::Autoscaling::V2beta1::ExternalMetricStatus, nilable: true, key: "external", getter: false, setter: false},
object: {type: Api::Autoscaling::V2beta1::ObjectMetricStatus, nilable: true, key: "object", getter: false, setter: false},
pods: {type: Api::Autoscaling::V2beta1::PodsMetricStatus, nilable: true, key: "pods", getter: false, setter: false},
resource: {type: Api::Autoscaling::V2beta1::ResourceMetricStatus, nilable: true, key: "resource", getter: false, setter: false},
type: {type: String, nilable: false, key: "type", getter: false, setter: false},
)]
class Api::Autoscaling::V2beta1::MetricStatus
include ::JSON::Serializable
include ::YAML::Serializable
# external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
@[::JSON::Field(key: "external", emit_null: false)]
@[::YAML::Field(key: "external", emit_null: false)]
property external : Api::Autoscaling::V2beta1::ExternalMetricStatus | Nil
# object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
@[::JSON::Field(key: "object", emit_null: false)]
@[::YAML::Field(key: "object", emit_null: false)]
property object : Api::Autoscaling::V2beta1::ObjectMetricStatus | Nil
# pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
@[::JSON::Field(key: "pods", emit_null: false)]
@[::YAML::Field(key: "pods", emit_null: false)]
property pods : Api::Autoscaling::V2beta1::PodsMetricStatus | Nil
# resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.
@[::JSON::Field(key: "resource", emit_null: false)]
@[::YAML::Field(key: "resource", emit_null: false)]
property resource : Api::Autoscaling::V2beta1::ResourceMetricStatus | Nil
# type is the type of metric source. It will be one of "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
@[::JSON::Field(key: "type", emit_null: true)]
@[::YAML::Field(key: "type", emit_null: true)]
property type : String
def initialize(*, @type : String, @external : Api::Autoscaling::V2beta1::ExternalMetricStatus | Nil = nil, @object : Api::Autoscaling::V2beta1::ObjectMetricStatus | Nil = nil, @pods : Api::Autoscaling::V2beta1::PodsMetricStatus | Nil = nil, @resource : Api::Autoscaling::V2beta1::ResourceMetricStatus | Nil = nil)
end
end
end