-
Notifications
You must be signed in to change notification settings - Fork 0
/
pods_metric_source.cr
35 lines (29 loc) · 1.92 KB
/
pods_metric_source.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
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# PodsMetricSource indicates how to scale on 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.
@[::K8S::Properties(
metric_name: {type: String, nilable: false, key: "metricName", getter: false, setter: false},
selector: {type: Apimachinery::Apis::Meta::V1::LabelSelector, nilable: true, key: "selector", getter: false, setter: false},
target_average_value: {type: Int32 | String, nilable: false, key: "targetAverageValue", getter: false, setter: false},
)]
class Api::Autoscaling::V2beta1::PodsMetricSource
include ::JSON::Serializable
include ::YAML::Serializable
# metricName is the name of the metric in question
@[::JSON::Field(key: "metricName", emit_null: true)]
@[::YAML::Field(key: "metricName", emit_null: true)]
property metric_name : String
# selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.
@[::JSON::Field(key: "selector", emit_null: false)]
@[::YAML::Field(key: "selector", emit_null: false)]
property selector : Apimachinery::Apis::Meta::V1::LabelSelector | Nil
# targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)
@[::JSON::Field(key: "targetAverageValue", emit_null: true)]
@[::YAML::Field(key: "targetAverageValue", emit_null: true)]
property target_average_value : Int32 | String
def initialize(*, @metric_name : String, @target_average_value : Int32 | String, @selector : Apimachinery::Apis::Meta::V1::LabelSelector | Nil = nil)
end
end
end