Commit 77d7f9cf authored by Mike Dame's avatar Mike Dame

Generate files and modifications for autoscaling/v2beta2 and custom_metrics/v1beta2

parent f407700a
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1600,6 +1600,56 @@ ...@@ -1600,6 +1600,56 @@
"targetValue": { "targetValue": {
"type": "string", "type": "string",
"description": "targetValue is the target value of the metric (as a quantity)." "description": "targetValue is the target value of the metric (as a quantity)."
},
"selector": {
"$ref": "v1.LabelSelector",
"description": "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."
},
"averageValue": {
"type": "string",
"description": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)"
}
}
},
"v1.LabelSelector": {
"id": "v1.LabelSelector",
"description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
"properties": {
"matchLabels": {
"type": "object",
"description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed."
},
"matchExpressions": {
"type": "array",
"items": {
"$ref": "v1.LabelSelectorRequirement"
},
"description": "matchExpressions is a list of label selector requirements. The requirements are ANDed."
}
}
},
"v1.LabelSelectorRequirement": {
"id": "v1.LabelSelectorRequirement",
"description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
"required": [
"key",
"operator"
],
"properties": {
"key": {
"type": "string",
"description": "key is the label key that the selector applies to."
},
"operator": {
"type": "string",
"description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch."
} }
} }
}, },
...@@ -1618,6 +1668,10 @@ ...@@ -1618,6 +1668,10 @@
"targetAverageValue": { "targetAverageValue": {
"type": "string", "type": "string",
"description": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)" "description": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)"
},
"selector": {
"$ref": "v1.LabelSelector",
"description": "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."
} }
} }
}, },
...@@ -1668,48 +1722,6 @@ ...@@ -1668,48 +1722,6 @@
} }
} }
}, },
"v1.LabelSelector": {
"id": "v1.LabelSelector",
"description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
"properties": {
"matchLabels": {
"type": "object",
"description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed."
},
"matchExpressions": {
"type": "array",
"items": {
"$ref": "v1.LabelSelectorRequirement"
},
"description": "matchExpressions is a list of label selector requirements. The requirements are ANDed."
}
}
},
"v1.LabelSelectorRequirement": {
"id": "v1.LabelSelectorRequirement",
"description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
"required": [
"key",
"operator"
],
"properties": {
"key": {
"type": "string",
"description": "key is the label key that the selector applies to."
},
"operator": {
"type": "string",
"description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch."
}
}
},
"v2beta1.HorizontalPodAutoscalerStatus": { "v2beta1.HorizontalPodAutoscalerStatus": {
"id": "v2beta1.HorizontalPodAutoscalerStatus", "id": "v2beta1.HorizontalPodAutoscalerStatus",
"description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.",
...@@ -1804,6 +1816,14 @@ ...@@ -1804,6 +1816,14 @@
"currentValue": { "currentValue": {
"type": "string", "type": "string",
"description": "currentValue is the current value of the metric (as a quantity)." "description": "currentValue is the current value of the metric (as a quantity)."
},
"selector": {
"$ref": "v1.LabelSelector",
"description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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."
},
"averageValue": {
"type": "string",
"description": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)"
} }
} }
}, },
...@@ -1822,6 +1842,10 @@ ...@@ -1822,6 +1842,10 @@
"currentAverageValue": { "currentAverageValue": {
"type": "string", "type": "string",
"description": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)" "description": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)"
},
"selector": {
"$ref": "v1.LabelSelector",
"description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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."
} }
} }
}, },
......
...@@ -54,6 +54,10 @@ ...@@ -54,6 +54,10 @@
"description": "API at /apis/autoscaling/v2beta1" "description": "API at /apis/autoscaling/v2beta1"
}, },
{ {
"path": "/apis/autoscaling/v2beta2",
"description": "API at /apis/autoscaling/v2beta2"
},
{
"path": "/apis/autoscaling", "path": "/apis/autoscaling",
"description": "get information of a group" "description": "get information of a group"
}, },
......
...@@ -249,6 +249,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ ...@@ -249,6 +249,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
{Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9}, {Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9},
{Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15}, {Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15},
{Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9}, {Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9},
{Group: "autoscaling", Version: "v2beta2"}: {group: 17500, version: 1},
{Group: "batch", Version: "v1"}: {group: 17400, version: 15}, {Group: "batch", Version: "v1"}: {group: 17400, version: 15},
{Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9}, {Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9},
{Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9}, {Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9},
......
...@@ -1034,6 +1034,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } ...@@ -1034,6 +1034,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -1306,6 +1313,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } ...@@ -1306,6 +1313,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -2012,6 +2026,20 @@ Examples:<br> ...@@ -2012,6 +2026,20 @@ Examples:<br>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">averageValue</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">averageValue is the target value of the average of the metric across all relevant pods (as a quantity)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -2122,6 +2150,20 @@ Examples:<br> ...@@ -2122,6 +2150,20 @@ Examples:<br>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">averageValue</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">averageValue is the current value of the average of the metric across all relevant pods (as a quantity)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -30,6 +30,6 @@ func init() { ...@@ -30,6 +30,6 @@ func init() {
// RegisterConversions adds conversion functions to the given scheme. // RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes. // Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error { func RegisterConversions(s *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs() return nil
} }
...@@ -21,6 +21,7 @@ limitations under the License. ...@@ -21,6 +21,7 @@ limitations under the License.
package autoscaling package autoscaling
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
...@@ -43,7 +44,7 @@ func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference { ...@@ -43,7 +44,7 @@ func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) { func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Target.DeepCopyInto(&out.Target) in.Target.DeepCopyInto(&out.Target)
return return
} }
...@@ -61,7 +62,7 @@ func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource { ...@@ -61,7 +62,7 @@ func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) { func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Current.DeepCopyInto(&out.Current) in.Current.DeepCopyInto(&out.Current)
return return
} }
...@@ -223,17 +224,22 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopy() *HorizontalPodAutoscalerStat ...@@ -223,17 +224,22 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopy() *HorizontalPodAutoscalerStat
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MetricIdent) DeepCopyInto(out *MetricIdent) { func (in *MetricIdentifier) DeepCopyInto(out *MetricIdentifier) {
*out = *in *out = *in
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdent. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdentifier.
func (in *MetricIdent) DeepCopy() *MetricIdent { func (in *MetricIdentifier) DeepCopy() *MetricIdentifier {
if in == nil { if in == nil {
return nil return nil
} }
out := new(MetricIdent) out := new(MetricIdentifier)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
...@@ -377,7 +383,7 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) { ...@@ -377,7 +383,7 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) {
*out = *in *out = *in
out.DescribedObject = in.DescribedObject out.DescribedObject = in.DescribedObject
in.Target.DeepCopyInto(&out.Target) in.Target.DeepCopyInto(&out.Target)
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
return return
} }
...@@ -394,7 +400,7 @@ func (in *ObjectMetricSource) DeepCopy() *ObjectMetricSource { ...@@ -394,7 +400,7 @@ func (in *ObjectMetricSource) DeepCopy() *ObjectMetricSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) { func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Current.DeepCopyInto(&out.Current) in.Current.DeepCopyInto(&out.Current)
out.DescribedObject = in.DescribedObject out.DescribedObject = in.DescribedObject
return return
...@@ -413,7 +419,7 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus { ...@@ -413,7 +419,7 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) { func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Target.DeepCopyInto(&out.Target) in.Target.DeepCopyInto(&out.Target)
return return
} }
...@@ -431,7 +437,7 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource { ...@@ -431,7 +437,7 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) { func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Current.DeepCopyInto(&out.Current) in.Current.DeepCopyInto(&out.Current)
return return
} }
......
...@@ -76,6 +76,7 @@ go_test( ...@@ -76,6 +76,7 @@ go_test(
"//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library",
"//staging/src/k8s.io/client-go/scale/fake:go_default_library", "//staging/src/k8s.io/client-go/scale/fake:go_default_library",
"//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library",
"//staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1:go_default_library",
"//staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1beta2:go_default_library", "//staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1beta2:go_default_library",
"//staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1:go_default_library", "//staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1:go_default_library",
"//staging/src/k8s.io/metrics/pkg/apis/metrics/v1alpha1:go_default_library", "//staging/src/k8s.io/metrics/pkg/apis/metrics/v1alpha1:go_default_library",
......
...@@ -33,6 +33,7 @@ openapi_library( ...@@ -33,6 +33,7 @@ openapi_library(
"k8s.io/api/authorization/v1beta1", "k8s.io/api/authorization/v1beta1",
"k8s.io/api/autoscaling/v1", "k8s.io/api/autoscaling/v1",
"k8s.io/api/autoscaling/v2beta1", "k8s.io/api/autoscaling/v2beta1",
"k8s.io/api/autoscaling/v2beta2",
"k8s.io/api/batch/v1", "k8s.io/api/batch/v1",
"k8s.io/api/batch/v1beta1", "k8s.io/api/batch/v1beta1",
"k8s.io/api/batch/v2alpha1", "k8s.io/api/batch/v2alpha1",
...@@ -72,6 +73,7 @@ openapi_library( ...@@ -72,6 +73,7 @@ openapi_library(
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1",
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1",
"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1", "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1",
"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2",
"k8s.io/metrics/pkg/apis/external_metrics/v1beta1", "k8s.io/metrics/pkg/apis/external_metrics/v1beta1",
"k8s.io/metrics/pkg/apis/metrics/v1alpha1", "k8s.io/metrics/pkg/apis/metrics/v1alpha1",
"k8s.io/metrics/pkg/apis/metrics/v1beta1", "k8s.io/metrics/pkg/apis/metrics/v1beta1",
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -18,6 +12,7 @@ go_library( ...@@ -18,6 +12,7 @@ go_library(
"services.go", "services.go",
], ],
importpath = "k8s.io/kubernetes/pkg/master", importpath = "k8s.io/kubernetes/pkg/master",
visibility = ["//visibility:public"],
deps = [ deps = [
"//pkg/apis/admission/install:go_default_library", "//pkg/apis/admission/install:go_default_library",
"//pkg/apis/admissionregistration/install:go_default_library", "//pkg/apis/admissionregistration/install:go_default_library",
...@@ -83,6 +78,7 @@ go_library( ...@@ -83,6 +78,7 @@ go_library(
"//staging/src/k8s.io/api/authorization/v1beta1:go_default_library", "//staging/src/k8s.io/api/authorization/v1beta1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1:go_default_library",
"//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library",
"//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library",
...@@ -199,4 +195,5 @@ filegroup( ...@@ -199,4 +195,5 @@ filegroup(
"//pkg/master/tunneler:all-srcs", "//pkg/master/tunneler:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -67,7 +67,10 @@ func validNewHorizontalPodAutoscaler(name string) *autoscaling.HorizontalPodAuto ...@@ -67,7 +67,10 @@ func validNewHorizontalPodAutoscaler(name string) *autoscaling.HorizontalPodAuto
Type: autoscaling.ResourceMetricSourceType, Type: autoscaling.ResourceMetricSourceType,
Resource: &autoscaling.ResourceMetricSource{ Resource: &autoscaling.ResourceMetricSource{
Name: api.ResourceCPU, Name: api.ResourceCPU,
TargetAverageUtilization: &cpu, Target: autoscaling.MetricTarget{
Type: autoscaling.UtilizationMetricType,
AverageUtilization: &cpu,
},
}, },
}, },
}, },
......
...@@ -12,6 +12,7 @@ go_library( ...@@ -12,6 +12,7 @@ go_library(
deps = [ deps = [
"//pkg/api/legacyscheme:go_default_library", "//pkg/api/legacyscheme:go_default_library",
"//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling:go_default_library",
"//pkg/apis/autoscaling/v2beta2:go_default_library",
"//pkg/registry/autoscaling/horizontalpodautoscaler/storage:go_default_library", "//pkg/registry/autoscaling/horizontalpodautoscaler/storage:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library",
......
...@@ -25,6 +25,7 @@ import ( ...@@ -25,6 +25,7 @@ import (
serverstorage "k8s.io/apiserver/pkg/server/storage" serverstorage "k8s.io/apiserver/pkg/server/storage"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling"
autoscalingapiv2beta2 "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta2"
horizontalpodautoscalerstore "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage" horizontalpodautoscalerstore "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage"
) )
...@@ -35,6 +36,9 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag ...@@ -35,6 +36,9 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
// If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities. // If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities.
// TODO refactor the plumbing to provide the information in the APIGroupInfo // TODO refactor the plumbing to provide the information in the APIGroupInfo
if apiResourceConfigSource.VersionEnabled(autoscalingapiv2beta2.SchemeGroupVersion) {
apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv2beta2.SchemeGroupVersion.Version] = p.v2beta2Storage(apiResourceConfigSource, restOptionsGetter)
}
if apiResourceConfigSource.VersionEnabled(autoscalingapiv2beta1.SchemeGroupVersion) { if apiResourceConfigSource.VersionEnabled(autoscalingapiv2beta1.SchemeGroupVersion) {
apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv2beta1.SchemeGroupVersion.Version] = p.v2beta1Storage(apiResourceConfigSource, restOptionsGetter) apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv2beta1.SchemeGroupVersion.Version] = p.v2beta1Storage(apiResourceConfigSource, restOptionsGetter)
} }
...@@ -65,6 +69,16 @@ func (p RESTStorageProvider) v2beta1Storage(apiResourceConfigSource serverstorag ...@@ -65,6 +69,16 @@ func (p RESTStorageProvider) v2beta1Storage(apiResourceConfigSource serverstorag
return storage return storage
} }
func (p RESTStorageProvider) v2beta2Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
storage := map[string]rest.Storage{}
// horizontalpodautoscalers
hpaStorage, hpaStatusStorage := horizontalpodautoscalerstore.NewREST(restOptionsGetter)
storage["horizontalpodautoscalers"] = hpaStorage
storage["horizontalpodautoscalers/status"] = hpaStatusStorage
return storage
}
func (p RESTStorageProvider) GroupName() string { func (p RESTStorageProvider) GroupName() string {
return autoscaling.GroupName return autoscaling.GroupName
} }
...@@ -132,6 +132,7 @@ filegroup( ...@@ -132,6 +132,7 @@ filegroup(
"//staging/src/k8s.io/client-go/listers/authorization/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/listers/authorization/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/listers/autoscaling/v1:all-srcs", "//staging/src/k8s.io/client-go/listers/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/client-go/listers/autoscaling/v2beta1:all-srcs", "//staging/src/k8s.io/client-go/listers/autoscaling/v2beta1:all-srcs",
"//staging/src/k8s.io/client-go/listers/autoscaling/v2beta2:all-srcs",
"//staging/src/k8s.io/client-go/listers/batch/v1:all-srcs", "//staging/src/k8s.io/client-go/listers/batch/v1:all-srcs",
"//staging/src/k8s.io/client-go/listers/batch/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/listers/batch/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/listers/batch/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/listers/batch/v2alpha1:all-srcs",
......
...@@ -69,6 +69,7 @@ filegroup( ...@@ -69,6 +69,7 @@ filegroup(
"//staging/src/k8s.io/api/authorization/v1beta1:all-srcs", "//staging/src/k8s.io/api/authorization/v1beta1:all-srcs",
"//staging/src/k8s.io/api/autoscaling/v1:all-srcs", "//staging/src/k8s.io/api/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/api/autoscaling/v2beta1:all-srcs", "//staging/src/k8s.io/api/autoscaling/v2beta1:all-srcs",
"//staging/src/k8s.io/api/autoscaling/v2beta2:all-srcs",
"//staging/src/k8s.io/api/batch/v1:all-srcs", "//staging/src/k8s.io/api/batch/v1:all-srcs",
"//staging/src/k8s.io/api/batch/v1beta1:all-srcs", "//staging/src/k8s.io/api/batch/v1beta1:all-srcs",
"//staging/src/k8s.io/api/batch/v2alpha1:all-srcs", "//staging/src/k8s.io/api/batch/v2alpha1:all-srcs",
......
...@@ -258,10 +258,11 @@ message ObjectMetricSource { ...@@ -258,10 +258,11 @@ message ObjectMetricSource {
// targetValue is the target value of the metric (as a quantity). // targetValue is the target value of the metric (as a quantity).
optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric.
// it is the string-encoded form of a standard kubernetes label selector // 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.
// +optional // +optional
optional string selector = 4; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
// averageValue is the target value of the average of the // averageValue is the target value of the average of the
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
...@@ -281,10 +282,11 @@ message ObjectMetricStatus { ...@@ -281,10 +282,11 @@ message ObjectMetricStatus {
// currentValue is the current value of the metric (as a quantity). // currentValue is the current value of the metric (as a quantity).
optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // When set in the ObjectMetricSource, 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.
// +optional // +optional
optional string selector = 4; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
// averageValue is the current value of the average of the // averageValue is the current value of the average of the
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
...@@ -304,14 +306,11 @@ message PodsMetricSource { ...@@ -304,14 +306,11 @@ message PodsMetricSource {
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2; optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // 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.
// +optional // +optional
optional string selector = 3; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
// value is the target value of the metric (as a quantity).
// +optional
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 4;
} }
// PodsMetricStatus indicates the current value of a metric describing each pod in // PodsMetricStatus indicates the current value of a metric describing each pod in
...@@ -324,14 +323,11 @@ message PodsMetricStatus { ...@@ -324,14 +323,11 @@ message PodsMetricStatus {
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2; optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
// +optional // When unset, just the metricName will be used to gather metrics.
optional string selector = 3;
// value is the current value of the metric (as a quantity)
// +optional // +optional
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 4; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
} }
// ResourceMetricSource indicates how to scale on a resource metric known to // ResourceMetricSource indicates how to scale on a resource metric known to
......
...@@ -152,7 +152,7 @@ var map_ObjectMetricSource = map[string]string{ ...@@ -152,7 +152,7 @@ var map_ObjectMetricSource = map[string]string{
"target": "target is the described Kubernetes object.", "target": "target is the described Kubernetes object.",
"metricName": "metricName is the name of the metric in question.", "metricName": "metricName is the name of the metric in question.",
"targetValue": "targetValue is the target value of the metric (as a quantity).", "targetValue": "targetValue is the target value of the metric (as a quantity).",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "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.",
"averageValue": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", "averageValue": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
} }
...@@ -165,7 +165,7 @@ var map_ObjectMetricStatus = map[string]string{ ...@@ -165,7 +165,7 @@ var map_ObjectMetricStatus = map[string]string{
"target": "target is the described Kubernetes object.", "target": "target is the described Kubernetes object.",
"metricName": "metricName is the name of the metric in question.", "metricName": "metricName is the name of the metric in question.",
"currentValue": "currentValue is the current value of the metric (as a quantity).", "currentValue": "currentValue is the current value of the metric (as a quantity).",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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.",
"averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", "averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
} }
...@@ -177,8 +177,7 @@ var map_PodsMetricSource = map[string]string{ ...@@ -177,8 +177,7 @@ var map_PodsMetricSource = map[string]string{
"": "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.", "": "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.",
"metricName": "metricName is the name of the metric in question", "metricName": "metricName is the name of the metric in question",
"targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "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.",
"value": "value is the target value of the metric (as a quantity).",
} }
func (PodsMetricSource) SwaggerDoc() map[string]string { func (PodsMetricSource) SwaggerDoc() map[string]string {
...@@ -189,8 +188,7 @@ var map_PodsMetricStatus = map[string]string{ ...@@ -189,8 +188,7 @@ var map_PodsMetricStatus = map[string]string{
"": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
"metricName": "metricName is the name of the metric in question", "metricName": "metricName is the name of the metric in question",
"currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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.",
"value": "value is the current value of the metric (as a quantity)",
} }
func (PodsMetricStatus) SwaggerDoc() map[string]string { func (PodsMetricStatus) SwaggerDoc() map[string]string {
......
...@@ -311,6 +311,11 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) { ...@@ -311,6 +311,11 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) {
*out = *in *out = *in
out.Target = in.Target out.Target = in.Target
out.TargetValue = in.TargetValue.DeepCopy() out.TargetValue = in.TargetValue.DeepCopy()
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(metav1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.AverageValue != nil { if in.AverageValue != nil {
in, out := &in.AverageValue, &out.AverageValue in, out := &in.AverageValue, &out.AverageValue
x := (*in).DeepCopy() x := (*in).DeepCopy()
...@@ -334,6 +339,11 @@ func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) { ...@@ -334,6 +339,11 @@ func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) {
*out = *in *out = *in
out.Target = in.Target out.Target = in.Target
out.CurrentValue = in.CurrentValue.DeepCopy() out.CurrentValue = in.CurrentValue.DeepCopy()
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(metav1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.AverageValue != nil { if in.AverageValue != nil {
in, out := &in.AverageValue, &out.AverageValue in, out := &in.AverageValue, &out.AverageValue
x := (*in).DeepCopy() x := (*in).DeepCopy()
...@@ -356,10 +366,10 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus { ...@@ -356,10 +366,10 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus {
func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) { func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) {
*out = *in *out = *in
out.TargetAverageValue = in.TargetAverageValue.DeepCopy() out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
if in.Value != nil { if in.Selector != nil {
in, out := &in.Value, &out.Value in, out := &in.Selector, &out.Selector
x := (*in).DeepCopy() *out = new(metav1.LabelSelector)
*out = &x (*in).DeepCopyInto(*out)
} }
return return
} }
...@@ -378,10 +388,10 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource { ...@@ -378,10 +388,10 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource {
func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) { func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) {
*out = *in *out = *in
out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
if in.Value != nil { if in.Selector != nil {
in, out := &in.Value, &out.Value in, out := &in.Selector, &out.Selector
x := (*in).DeepCopy() *out = new(metav1.LabelSelector)
*out = &x (*in).DeepCopyInto(*out)
} }
return return
} }
......
...@@ -275,10 +275,11 @@ message ObjectMetricSource { ...@@ -275,10 +275,11 @@ message ObjectMetricSource {
// targetValue is the target value of the metric (as a quantity). // targetValue is the target value of the metric (as a quantity).
optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // 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.
// +optional // +optional
optional string selector = 4; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
// averageValue is the target value of the average of the // averageValue is the target value of the average of the
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
...@@ -298,10 +299,11 @@ message ObjectMetricStatus { ...@@ -298,10 +299,11 @@ message ObjectMetricStatus {
// currentValue is the current value of the metric (as a quantity). // currentValue is the current value of the metric (as a quantity).
optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // When set in the ObjectMetricSource, 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.
// +optional // +optional
optional string selector = 4; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
// averageValue is the current value of the average of the // averageValue is the current value of the average of the
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
...@@ -321,14 +323,11 @@ message PodsMetricSource { ...@@ -321,14 +323,11 @@ message PodsMetricSource {
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2; optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // 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.
// +optional // +optional
optional string selector = 3; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
// value is the target value of the metric (as a quantity).
// +optional
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 4;
} }
// PodsMetricStatus indicates the current value of a metric describing each pod in // PodsMetricStatus indicates the current value of a metric describing each pod in
...@@ -341,14 +340,11 @@ message PodsMetricStatus { ...@@ -341,14 +340,11 @@ message PodsMetricStatus {
// metric across all relevant pods (as a quantity) // metric across all relevant pods (as a quantity)
optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2; optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
// +optional // When unset, just the metricName will be used to gather metrics.
optional string selector = 3;
// value is the current value of the metric (as a quantity)
// +optional // +optional
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 4; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
} }
// ResourceMetricSource indicates how to scale on a resource metric known to // ResourceMetricSource indicates how to scale on a resource metric known to
......
...@@ -153,7 +153,7 @@ var map_ObjectMetricSource = map[string]string{ ...@@ -153,7 +153,7 @@ var map_ObjectMetricSource = map[string]string{
"target": "target is the described Kubernetes object.", "target": "target is the described Kubernetes object.",
"metricName": "metricName is the name of the metric in question.", "metricName": "metricName is the name of the metric in question.",
"targetValue": "targetValue is the target value of the metric (as a quantity).", "targetValue": "targetValue is the target value of the metric (as a quantity).",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "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.",
"averageValue": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", "averageValue": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
} }
...@@ -166,7 +166,7 @@ var map_ObjectMetricStatus = map[string]string{ ...@@ -166,7 +166,7 @@ var map_ObjectMetricStatus = map[string]string{
"target": "target is the described Kubernetes object.", "target": "target is the described Kubernetes object.",
"metricName": "metricName is the name of the metric in question.", "metricName": "metricName is the name of the metric in question.",
"currentValue": "currentValue is the current value of the metric (as a quantity).", "currentValue": "currentValue is the current value of the metric (as a quantity).",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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.",
"averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", "averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
} }
...@@ -178,8 +178,7 @@ var map_PodsMetricSource = map[string]string{ ...@@ -178,8 +178,7 @@ var map_PodsMetricSource = map[string]string{
"": "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.", "": "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.",
"metricName": "metricName is the name of the metric in question", "metricName": "metricName is the name of the metric in question",
"targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "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.",
"value": "value is the target value of the metric (as a quantity).",
} }
func (PodsMetricSource) SwaggerDoc() map[string]string { func (PodsMetricSource) SwaggerDoc() map[string]string {
...@@ -190,8 +189,7 @@ var map_PodsMetricStatus = map[string]string{ ...@@ -190,8 +189,7 @@ var map_PodsMetricStatus = map[string]string{
"": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
"metricName": "metricName is the name of the metric in question", "metricName": "metricName is the name of the metric in question",
"currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
"selector": "selector is the selector for the given metric it is the string-encoded form of a standard kubernetes label selector", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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.",
"value": "value is the current value of the metric (as a quantity)",
} }
func (PodsMetricStatus) SwaggerDoc() map[string]string { func (PodsMetricStatus) SwaggerDoc() map[string]string {
......
...@@ -322,6 +322,11 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) { ...@@ -322,6 +322,11 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) {
*out = *in *out = *in
out.Target = in.Target out.Target = in.Target
out.TargetValue = in.TargetValue.DeepCopy() out.TargetValue = in.TargetValue.DeepCopy()
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.AverageValue != nil { if in.AverageValue != nil {
in, out := &in.AverageValue, &out.AverageValue in, out := &in.AverageValue, &out.AverageValue
x := (*in).DeepCopy() x := (*in).DeepCopy()
...@@ -345,6 +350,11 @@ func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) { ...@@ -345,6 +350,11 @@ func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) {
*out = *in *out = *in
out.Target = in.Target out.Target = in.Target
out.CurrentValue = in.CurrentValue.DeepCopy() out.CurrentValue = in.CurrentValue.DeepCopy()
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.AverageValue != nil { if in.AverageValue != nil {
in, out := &in.AverageValue, &out.AverageValue in, out := &in.AverageValue, &out.AverageValue
x := (*in).DeepCopy() x := (*in).DeepCopy()
...@@ -367,10 +377,10 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus { ...@@ -367,10 +377,10 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus {
func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) { func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) {
*out = *in *out = *in
out.TargetAverageValue = in.TargetAverageValue.DeepCopy() out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
if in.Value != nil { if in.Selector != nil {
in, out := &in.Value, &out.Value in, out := &in.Selector, &out.Selector
x := (*in).DeepCopy() *out = new(v1.LabelSelector)
*out = &x (*in).DeepCopyInto(*out)
} }
return return
} }
...@@ -389,10 +399,10 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource { ...@@ -389,10 +399,10 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource {
func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) { func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) {
*out = *in *out = *in
out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
if in.Value != nil { if in.Selector != nil {
in, out := &in.Value, &out.Value in, out := &in.Selector, &out.Selector
x := (*in).DeepCopy() *out = new(v1.LabelSelector)
*out = &x (*in).DeepCopyInto(*out)
} }
return return
} }
......
...@@ -26,7 +26,6 @@ import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; ...@@ -26,7 +26,6 @@ import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
// Package-wide variables from generator "generated". // Package-wide variables from generator "generated".
option go_package = "v2beta2"; option go_package = "v2beta2";
...@@ -48,16 +47,20 @@ message CrossVersionObjectReference { ...@@ -48,16 +47,20 @@ message CrossVersionObjectReference {
// any Kubernetes object (for example length of queue in cloud // any Kubernetes object (for example length of queue in cloud
// messaging service, or QPS from loadbalancer running outside of cluster). // messaging service, or QPS from loadbalancer running outside of cluster).
message ExternalMetricSource { message ExternalMetricSource {
optional MetricIdent metric = 1; // metric identifies the target metric by name and selector
optional MetricIdentifier metric = 1;
optional MetricTarget metricTarget = 2; // target specifies the target value for the given metric
optional MetricTarget target = 2;
} }
// ExternalMetricStatus indicates the current value of a global metric // ExternalMetricStatus indicates the current value of a global metric
// not associated with any Kubernetes object. // not associated with any Kubernetes object.
message ExternalMetricStatus { message ExternalMetricStatus {
optional MetricIdent metric = 1; // metric identifies the target metric by name and selector
optional MetricIdentifier metric = 1;
// current contains the current value for the given metric
optional MetricValueStatus current = 2; optional MetricValueStatus current = 2;
} }
...@@ -136,6 +139,7 @@ message HorizontalPodAutoscalerSpec { ...@@ -136,6 +139,7 @@ message HorizontalPodAutoscalerSpec {
// number of pods. Ergo, metrics used must decrease as the pod count is // number of pods. Ergo, metrics used must decrease as the pod count is
// increased, and vice-versa. See the individual metric source types for // increased, and vice-versa. See the individual metric source types for
// more information about how each type of metric must respond. // more information about how each type of metric must respond.
// If not set, the default metric will be set to 80% average CPU utilization.
// +optional // +optional
repeated MetricSpec metrics = 4; repeated MetricSpec metrics = 4;
} }
...@@ -168,15 +172,16 @@ message HorizontalPodAutoscalerStatus { ...@@ -168,15 +172,16 @@ message HorizontalPodAutoscalerStatus {
repeated HorizontalPodAutoscalerCondition conditions = 6; repeated HorizontalPodAutoscalerCondition conditions = 6;
} }
// MetricIdent defines the name and optionally selector for a metric // MetricIdentifier defines the name and optionally selector for a metric
message MetricIdent { message MetricIdentifier {
// Name is the name of the given metric // name is the name of the given metric
optional string name = 1; optional string name = 1;
// selector is the selector for the given metric // selector is the string-encoded form of a standard kubernetes label selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector // 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.
// +optional // +optional
optional string selector = 2; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
} }
// MetricSpec specifies how to scale based on a single metric // MetricSpec specifies how to scale based on a single metric
...@@ -250,23 +255,35 @@ message MetricStatus { ...@@ -250,23 +255,35 @@ message MetricStatus {
// MetricTarget defines the target value, average value, or average utilization of a specific metric // MetricTarget defines the target value, average value, or average utilization of a specific metric
message MetricTarget { message MetricTarget {
// Type represents whether the metric type is Utilization, Value, or AverageValue // type represents whether the metric type is Utilization, Value, or AverageValue
optional string type = 1; optional string type = 1;
// value is the target value of the metric (as a quantity).
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2; optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2;
// averageValue is the target value of the average of the
// metric across all relevant pods (as a quantity)
optional k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 3; optional k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 3;
// averageUtilization is the target value of the average of the
// resource metric across all relevant pods, represented as a percentage of
// the requested value of the resource for the pods.
// Currently only valid for Resource metric source type // Currently only valid for Resource metric source type
optional int32 averageUtilization = 4; optional int32 averageUtilization = 4;
} }
// MetricValueStatus holds the current value for a metric // MetricValueStatus holds the current value for a metric
message MetricValueStatus { message MetricValueStatus {
// value is the current value of the metric (as a quantity).
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 1; optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 1;
// averageValue is the current value of the average of the
// metric across all relevant pods (as a quantity)
optional k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 2; optional k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 2;
// currentAverageUtilization is the current value of the average of the
// resource metric across all relevant pods, represented as a percentage of
// the requested value of the resource for the pods.
optional int32 averageUtilization = 3; optional int32 averageUtilization = 3;
} }
...@@ -275,16 +292,20 @@ message MetricValueStatus { ...@@ -275,16 +292,20 @@ message MetricValueStatus {
message ObjectMetricSource { message ObjectMetricSource {
optional CrossVersionObjectReference describedObject = 1; optional CrossVersionObjectReference describedObject = 1;
// target specifies the target value for the given metric
optional MetricTarget target = 2; optional MetricTarget target = 2;
optional MetricIdent metric = 3; // metric identifies the target metric by name and selector
optional MetricIdentifier metric = 3;
} }
// ObjectMetricStatus indicates the current value of a metric describing a // ObjectMetricStatus indicates the current value of a metric describing a
// kubernetes object (for example, hits-per-second on an Ingress object). // kubernetes object (for example, hits-per-second on an Ingress object).
message ObjectMetricStatus { message ObjectMetricStatus {
optional MetricIdent metric = 1; // metric identifies the target metric by name and selector
optional MetricIdentifier metric = 1;
// current contains the current value for the given metric
optional MetricValueStatus current = 2; optional MetricValueStatus current = 2;
optional CrossVersionObjectReference describedObject = 3; optional CrossVersionObjectReference describedObject = 3;
...@@ -295,16 +316,20 @@ message ObjectMetricStatus { ...@@ -295,16 +316,20 @@ message ObjectMetricStatus {
// The values will be averaged together before being compared to the target // The values will be averaged together before being compared to the target
// value. // value.
message PodsMetricSource { message PodsMetricSource {
optional MetricIdent metric = 1; // metric identifies the target metric by name and selector
optional MetricIdentifier metric = 1;
// target specifies the target value for the given metric
optional MetricTarget target = 2; optional MetricTarget target = 2;
} }
// PodsMetricStatus indicates the current value of a metric describing each pod in // PodsMetricStatus indicates the current value of a metric describing each pod in
// the current scale target (for example, transactions-processed-per-second). // the current scale target (for example, transactions-processed-per-second).
message PodsMetricStatus { message PodsMetricStatus {
optional MetricIdent metric = 1; // metric identifies the target metric by name and selector
optional MetricIdentifier metric = 1;
// current contains the current value for the given metric
optional MetricValueStatus current = 2; optional MetricValueStatus current = 2;
} }
...@@ -316,9 +341,10 @@ message PodsMetricStatus { ...@@ -316,9 +341,10 @@ message PodsMetricStatus {
// normal per-pod metrics using the "pods" source. Only one "target" type // normal per-pod metrics using the "pods" source. Only one "target" type
// should be set. // should be set.
message ResourceMetricSource { message ResourceMetricSource {
// Name is the name of the resource in question. // name is the name of the resource in question.
optional string name = 1; optional string name = 1;
// target specifies the target value for the given metric
optional MetricTarget target = 2; optional MetricTarget target = 2;
} }
...@@ -331,6 +357,7 @@ message ResourceMetricStatus { ...@@ -331,6 +357,7 @@ message ResourceMetricStatus {
// Name is the name of the resource in question. // Name is the name of the resource in question.
optional string name = 1; optional string name = 1;
// current contains the current value for the given metric
optional MetricValueStatus current = 2; optional MetricValueStatus current = 2;
} }
...@@ -21,6 +21,7 @@ limitations under the License. ...@@ -21,6 +21,7 @@ limitations under the License.
package v2beta2 package v2beta2
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
...@@ -43,7 +44,7 @@ func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference { ...@@ -43,7 +44,7 @@ func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) { func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Target.DeepCopyInto(&out.Target) in.Target.DeepCopyInto(&out.Target)
return return
} }
...@@ -61,7 +62,7 @@ func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource { ...@@ -61,7 +62,7 @@ func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) { func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Current.DeepCopyInto(&out.Current) in.Current.DeepCopyInto(&out.Current)
return return
} }
...@@ -223,17 +224,22 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopy() *HorizontalPodAutoscalerStat ...@@ -223,17 +224,22 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopy() *HorizontalPodAutoscalerStat
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MetricIdent) DeepCopyInto(out *MetricIdent) { func (in *MetricIdentifier) DeepCopyInto(out *MetricIdentifier) {
*out = *in *out = *in
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdent. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdentifier.
func (in *MetricIdent) DeepCopy() *MetricIdent { func (in *MetricIdentifier) DeepCopy() *MetricIdentifier {
if in == nil { if in == nil {
return nil return nil
} }
out := new(MetricIdent) out := new(MetricIdentifier)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
...@@ -377,7 +383,7 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) { ...@@ -377,7 +383,7 @@ func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) {
*out = *in *out = *in
out.DescribedObject = in.DescribedObject out.DescribedObject = in.DescribedObject
in.Target.DeepCopyInto(&out.Target) in.Target.DeepCopyInto(&out.Target)
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
return return
} }
...@@ -394,7 +400,7 @@ func (in *ObjectMetricSource) DeepCopy() *ObjectMetricSource { ...@@ -394,7 +400,7 @@ func (in *ObjectMetricSource) DeepCopy() *ObjectMetricSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) { func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Current.DeepCopyInto(&out.Current) in.Current.DeepCopyInto(&out.Current)
out.DescribedObject = in.DescribedObject out.DescribedObject = in.DescribedObject
return return
...@@ -413,7 +419,7 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus { ...@@ -413,7 +419,7 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) { func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Target.DeepCopyInto(&out.Target) in.Target.DeepCopyInto(&out.Target)
return return
} }
...@@ -431,7 +437,7 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource { ...@@ -431,7 +437,7 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) { func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) {
*out = *in *out = *in
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Current.DeepCopyInto(&out.Current) in.Current.DeepCopyInto(&out.Current)
return return
} }
......
...@@ -883,6 +883,10 @@ ...@@ -883,6 +883,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1603,6 +1607,10 @@ ...@@ -1603,6 +1607,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/informers/batch", "ImportPath": "k8s.io/client-go/informers/batch",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1783,6 +1791,10 @@ ...@@ -1783,6 +1791,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1887,6 +1899,10 @@ ...@@ -1887,6 +1899,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/listers/batch/v1", "ImportPath": "k8s.io/client-go/listers/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
......
...@@ -903,6 +903,10 @@ ...@@ -903,6 +903,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1239,6 +1243,10 @@ ...@@ -1239,6 +1243,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/informers/batch", "ImportPath": "k8s.io/client-go/informers/batch",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1463,6 +1471,14 @@ ...@@ -1463,6 +1471,14 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1643,6 +1659,10 @@ ...@@ -1643,6 +1659,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/listers/batch/v1", "ImportPath": "k8s.io/client-go/listers/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
......
...@@ -247,6 +247,10 @@ ...@@ -247,6 +247,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
......
...@@ -315,6 +315,10 @@ ...@@ -315,6 +315,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -13,6 +8,7 @@ go_library( ...@@ -13,6 +8,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers", importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers",
importpath = "k8s.io/client-go/informers", importpath = "k8s.io/client-go/informers",
visibility = ["//visibility:public"],
deps = [ deps = [
"//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library",
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
...@@ -21,6 +17,7 @@ go_library( ...@@ -21,6 +17,7 @@ go_library(
"//staging/src/k8s.io/api/apps/v1beta2:go_default_library", "//staging/src/k8s.io/api/apps/v1beta2:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1:go_default_library",
"//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library",
"//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library",
...@@ -93,4 +90,5 @@ filegroup( ...@@ -93,4 +90,5 @@ filegroup(
"//staging/src/k8s.io/client-go/informers/storage:all-srcs", "//staging/src/k8s.io/client-go/informers/storage:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -9,6 +9,7 @@ go_library( ...@@ -9,6 +9,7 @@ go_library(
deps = [ deps = [
"//staging/src/k8s.io/client-go/informers/autoscaling/v1:go_default_library", "//staging/src/k8s.io/client-go/informers/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/client-go/informers/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/client-go/informers/autoscaling/v2beta1:go_default_library",
"//staging/src/k8s.io/client-go/informers/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library",
], ],
) )
...@@ -26,6 +27,7 @@ filegroup( ...@@ -26,6 +27,7 @@ filegroup(
":package-srcs", ":package-srcs",
"//staging/src/k8s.io/client-go/informers/autoscaling/v1:all-srcs", "//staging/src/k8s.io/client-go/informers/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/client-go/informers/autoscaling/v2beta1:all-srcs", "//staging/src/k8s.io/client-go/informers/autoscaling/v2beta1:all-srcs",
"//staging/src/k8s.io/client-go/informers/autoscaling/v2beta2:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
......
...@@ -21,6 +21,7 @@ package autoscaling ...@@ -21,6 +21,7 @@ package autoscaling
import ( import (
v1 "k8s.io/client-go/informers/autoscaling/v1" v1 "k8s.io/client-go/informers/autoscaling/v1"
v2beta1 "k8s.io/client-go/informers/autoscaling/v2beta1" v2beta1 "k8s.io/client-go/informers/autoscaling/v2beta1"
v2beta2 "k8s.io/client-go/informers/autoscaling/v2beta2"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
) )
...@@ -30,6 +31,8 @@ type Interface interface { ...@@ -30,6 +31,8 @@ type Interface interface {
V1() v1.Interface V1() v1.Interface
// V2beta1 provides access to shared informers for resources in V2beta1. // V2beta1 provides access to shared informers for resources in V2beta1.
V2beta1() v2beta1.Interface V2beta1() v2beta1.Interface
// V2beta2 provides access to shared informers for resources in V2beta2.
V2beta2() v2beta2.Interface
} }
type group struct { type group struct {
...@@ -52,3 +55,8 @@ func (g *group) V1() v1.Interface { ...@@ -52,3 +55,8 @@ func (g *group) V1() v1.Interface {
func (g *group) V2beta1() v2beta1.Interface { func (g *group) V2beta1() v2beta1.Interface {
return v2beta1.New(g.factory, g.namespace, g.tweakListOptions) return v2beta1.New(g.factory, g.namespace, g.tweakListOptions)
} }
// V2beta2 returns a new v2beta2.Interface.
func (g *group) V2beta2() v2beta2.Interface {
return v2beta2.New(g.factory, g.namespace, g.tweakListOptions)
}
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"horizontalpodautoscaler.go",
"interface.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/autoscaling/v2beta2",
importpath = "k8s.io/client-go/informers/autoscaling/v2beta2",
visibility = ["//visibility:public"],
deps = [
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
"//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
"//staging/src/k8s.io/client-go/listers/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v2beta2
import (
time "time"
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v2beta2 "k8s.io/client-go/listers/autoscaling/v2beta2"
cache "k8s.io/client-go/tools/cache"
)
// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for
// HorizontalPodAutoscalers.
type HorizontalPodAutoscalerInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2beta2.HorizontalPodAutoscalerLister
}
type horizontalPodAutoscalerInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredHorizontalPodAutoscalerInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).Watch(options)
},
},
&autoscalingv2beta2.HorizontalPodAutoscaler{},
resyncPeriod,
indexers,
)
}
func (f *horizontalPodAutoscalerInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredHorizontalPodAutoscalerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&autoscalingv2beta2.HorizontalPodAutoscaler{}, f.defaultInformer)
}
func (f *horizontalPodAutoscalerInformer) Lister() v2beta2.HorizontalPodAutoscalerLister {
return v2beta2.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer())
}
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v2beta2
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer {
return &horizontalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
...@@ -28,6 +28,7 @@ import ( ...@@ -28,6 +28,7 @@ import (
v1beta2 "k8s.io/api/apps/v1beta2" v1beta2 "k8s.io/api/apps/v1beta2"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
v2beta1 "k8s.io/api/autoscaling/v2beta1" v2beta1 "k8s.io/api/autoscaling/v2beta1"
v2beta2 "k8s.io/api/autoscaling/v2beta2"
batchv1 "k8s.io/api/batch/v1" batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1" batchv1beta1 "k8s.io/api/batch/v1beta1"
v2alpha1 "k8s.io/api/batch/v2alpha1" v2alpha1 "k8s.io/api/batch/v2alpha1"
...@@ -127,6 +128,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource ...@@ -127,6 +128,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case v2beta1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): case v2beta1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil
// Group=autoscaling, Version=v2beta2
case v2beta2.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta2().HorizontalPodAutoscalers().Informer()}, nil
// Group=batch, Version=v1 // Group=batch, Version=v1
case batchv1.SchemeGroupVersion.WithResource("jobs"): case batchv1.SchemeGroupVersion.WithResource("jobs"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -14,6 +9,7 @@ go_library( ...@@ -14,6 +9,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes", importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes",
importpath = "k8s.io/client-go/kubernetes", importpath = "k8s.io/client-go/kubernetes",
visibility = ["//visibility:public"],
deps = [ deps = [
"//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/discovery:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library",
...@@ -27,6 +23,7 @@ go_library( ...@@ -27,6 +23,7 @@ go_library(
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library",
...@@ -75,6 +72,7 @@ filegroup( ...@@ -75,6 +72,7 @@ filegroup(
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs",
...@@ -96,4 +94,5 @@ filegroup( ...@@ -96,4 +94,5 @@ filegroup(
"//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -31,6 +31,7 @@ import ( ...@@ -31,6 +31,7 @@ import (
authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
...@@ -77,6 +78,7 @@ type Interface interface { ...@@ -77,6 +78,7 @@ type Interface interface {
// Deprecated: please explicitly pick a version if possible. // Deprecated: please explicitly pick a version if possible.
Autoscaling() autoscalingv1.AutoscalingV1Interface Autoscaling() autoscalingv1.AutoscalingV1Interface
AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface
AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface
BatchV1() batchv1.BatchV1Interface BatchV1() batchv1.BatchV1Interface
// Deprecated: please explicitly pick a version if possible. // Deprecated: please explicitly pick a version if possible.
Batch() batchv1.BatchV1Interface Batch() batchv1.BatchV1Interface
...@@ -137,6 +139,7 @@ type Clientset struct { ...@@ -137,6 +139,7 @@ type Clientset struct {
authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client
autoscalingV1 *autoscalingv1.AutoscalingV1Client autoscalingV1 *autoscalingv1.AutoscalingV1Client
autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client
autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client
batchV1 *batchv1.BatchV1Client batchV1 *batchv1.BatchV1Client
batchV1beta1 *batchv1beta1.BatchV1beta1Client batchV1beta1 *batchv1beta1.BatchV1beta1Client
batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
...@@ -243,6 +246,11 @@ func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1In ...@@ -243,6 +246,11 @@ func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1In
return c.autoscalingV2beta1 return c.autoscalingV2beta1
} }
// AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client
func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface {
return c.autoscalingV2beta2
}
// BatchV1 retrieves the BatchV1Client // BatchV1 retrieves the BatchV1Client
func (c *Clientset) BatchV1() batchv1.BatchV1Interface { func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
return c.batchV1 return c.batchV1
...@@ -470,6 +478,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { ...@@ -470,6 +478,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
cs.autoscalingV2beta2, err = autoscalingv2beta2.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.batchV1, err = batchv1.NewForConfig(&configShallowCopy) cs.batchV1, err = batchv1.NewForConfig(&configShallowCopy)
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -569,6 +581,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { ...@@ -569,6 +581,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c) cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c)
cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c) cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c)
cs.autoscalingV2beta1 = autoscalingv2beta1.NewForConfigOrDie(c) cs.autoscalingV2beta1 = autoscalingv2beta1.NewForConfigOrDie(c)
cs.autoscalingV2beta2 = autoscalingv2beta2.NewForConfigOrDie(c)
cs.batchV1 = batchv1.NewForConfigOrDie(c) cs.batchV1 = batchv1.NewForConfigOrDie(c)
cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c) cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c) cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
...@@ -607,6 +620,7 @@ func New(c rest.Interface) *Clientset { ...@@ -607,6 +620,7 @@ func New(c rest.Interface) *Clientset {
cs.authorizationV1beta1 = authorizationv1beta1.New(c) cs.authorizationV1beta1 = authorizationv1beta1.New(c)
cs.autoscalingV1 = autoscalingv1.New(c) cs.autoscalingV1 = autoscalingv1.New(c)
cs.autoscalingV2beta1 = autoscalingv2beta1.New(c) cs.autoscalingV2beta1 = autoscalingv2beta1.New(c)
cs.autoscalingV2beta2 = autoscalingv2beta2.New(c)
cs.batchV1 = batchv1.New(c) cs.batchV1 = batchv1.New(c)
cs.batchV1beta1 = batchv1beta1.New(c) cs.batchV1beta1 = batchv1beta1.New(c)
cs.batchV2alpha1 = batchv2alpha1.New(c) cs.batchV2alpha1 = batchv2alpha1.New(c)
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -14,6 +9,7 @@ go_library( ...@@ -14,6 +9,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/fake", importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/fake",
importpath = "k8s.io/client-go/kubernetes/fake", importpath = "k8s.io/client-go/kubernetes/fake",
visibility = ["//visibility:public"],
deps = [ deps = [
"//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library",
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
...@@ -26,6 +22,7 @@ go_library( ...@@ -26,6 +22,7 @@ go_library(
"//staging/src/k8s.io/api/authorization/v1beta1:go_default_library", "//staging/src/k8s.io/api/authorization/v1beta1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1:go_default_library",
"//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library",
"//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library",
...@@ -76,6 +73,8 @@ go_library( ...@@ -76,6 +73,8 @@ go_library(
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library",
...@@ -129,4 +128,5 @@ filegroup( ...@@ -129,4 +128,5 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -46,6 +46,8 @@ import ( ...@@ -46,6 +46,8 @@ import (
fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake" fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
fakeautoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake" fakeautoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake"
autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
fakeautoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake"
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake" fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
...@@ -209,6 +211,11 @@ func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1In ...@@ -209,6 +211,11 @@ func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1In
return &fakeautoscalingv2beta1.FakeAutoscalingV2beta1{Fake: &c.Fake} return &fakeautoscalingv2beta1.FakeAutoscalingV2beta1{Fake: &c.Fake}
} }
// AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client
func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface {
return &fakeautoscalingv2beta2.FakeAutoscalingV2beta2{Fake: &c.Fake}
}
// BatchV1 retrieves the BatchV1Client // BatchV1 retrieves the BatchV1Client
func (c *Clientset) BatchV1() batchv1.BatchV1Interface { func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
return &fakebatchv1.FakeBatchV1{Fake: &c.Fake} return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
......
...@@ -30,6 +30,7 @@ import ( ...@@ -30,6 +30,7 @@ import (
authorizationv1beta1 "k8s.io/api/authorization/v1beta1" authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
batchv1 "k8s.io/api/batch/v1" batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1" batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1" batchv2alpha1 "k8s.io/api/batch/v2alpha1"
...@@ -71,6 +72,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ ...@@ -71,6 +72,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
authorizationv1beta1.AddToScheme, authorizationv1beta1.AddToScheme,
autoscalingv1.AddToScheme, autoscalingv1.AddToScheme,
autoscalingv2beta1.AddToScheme, autoscalingv2beta1.AddToScheme,
autoscalingv2beta2.AddToScheme,
batchv1.AddToScheme, batchv1.AddToScheme,
batchv1beta1.AddToScheme, batchv1beta1.AddToScheme,
batchv2alpha1.AddToScheme, batchv2alpha1.AddToScheme,
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -13,6 +8,7 @@ go_library( ...@@ -13,6 +8,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/scheme", importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/scheme",
importpath = "k8s.io/client-go/kubernetes/scheme", importpath = "k8s.io/client-go/kubernetes/scheme",
visibility = ["//visibility:public"],
deps = [ deps = [
"//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library",
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
...@@ -25,6 +21,7 @@ go_library( ...@@ -25,6 +21,7 @@ go_library(
"//staging/src/k8s.io/api/authorization/v1beta1:go_default_library", "//staging/src/k8s.io/api/authorization/v1beta1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1:go_default_library",
"//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library",
"//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library",
...@@ -63,4 +60,5 @@ filegroup( ...@@ -63,4 +60,5 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -30,6 +30,7 @@ import ( ...@@ -30,6 +30,7 @@ import (
authorizationv1beta1 "k8s.io/api/authorization/v1beta1" authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
batchv1 "k8s.io/api/batch/v1" batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1" batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1" batchv2alpha1 "k8s.io/api/batch/v2alpha1"
...@@ -71,6 +72,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ ...@@ -71,6 +72,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
authorizationv1beta1.AddToScheme, authorizationv1beta1.AddToScheme,
autoscalingv1.AddToScheme, autoscalingv1.AddToScheme,
autoscalingv2beta1.AddToScheme, autoscalingv2beta1.AddToScheme,
autoscalingv2beta2.AddToScheme,
batchv1.AddToScheme, batchv1.AddToScheme,
batchv1beta1.AddToScheme, batchv1beta1.AddToScheme,
batchv2alpha1.AddToScheme, batchv2alpha1.AddToScheme,
......
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"autoscaling_client.go",
"doc.go",
"generated_expansion.go",
"horizontalpodautoscaler.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2",
importpath = "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2",
visibility = ["//visibility:public"],
deps = [
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library",
"//staging/src/k8s.io/client-go/rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v2beta2
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type AutoscalingV2beta2Interface interface {
RESTClient() rest.Interface
HorizontalPodAutoscalersGetter
}
// AutoscalingV2beta2Client is used to interact with features provided by the autoscaling group.
type AutoscalingV2beta2Client struct {
restClient rest.Interface
}
func (c *AutoscalingV2beta2Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
return newHorizontalPodAutoscalers(c, namespace)
}
// NewForConfig creates a new AutoscalingV2beta2Client for the given config.
func NewForConfig(c *rest.Config) (*AutoscalingV2beta2Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AutoscalingV2beta2Client{client}, nil
}
// NewForConfigOrDie creates a new AutoscalingV2beta2Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AutoscalingV2beta2Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AutoscalingV2beta2Client for the given RESTClient.
func New(c rest.Interface) *AutoscalingV2beta2Client {
return &AutoscalingV2beta2Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v2beta2.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AutoscalingV2beta2Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v2beta2
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_autoscaling_client.go",
"fake_horizontalpodautoscaler.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake",
importpath = "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake",
visibility = ["//visibility:public"],
deps = [
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/client-go/rest:go_default_library",
"//staging/src/k8s.io/client-go/testing:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeAutoscalingV2beta2 struct {
*testing.Fake
}
func (c *FakeAutoscalingV2beta2) HorizontalPodAutoscalers(namespace string) v2beta2.HorizontalPodAutoscalerInterface {
return &FakeHorizontalPodAutoscalers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAutoscalingV2beta2) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type FakeHorizontalPodAutoscalers struct {
Fake *FakeAutoscalingV2beta2
ns string
}
var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2beta2", Resource: "horizontalpodautoscalers"}
var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta2.HorizontalPodAutoscalerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v2beta2.HorizontalPodAutoscalerList{ListMeta: obj.(*v2beta2.HorizontalPodAutoscalerList).ListMeta}
for _, item := range obj.(*v2beta2.HorizontalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
}
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{})
return err
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v2beta2
type HorizontalPodAutoscalerExpansion interface{}
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v2beta2
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
// A group's client should implement this interface.
type HorizontalPodAutoscalersGetter interface {
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
}
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
type HorizontalPodAutoscalerInterface interface {
Create(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Update(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
UpdateStatus(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error)
List(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type horizontalPodAutoscalers struct {
client rest.Interface
ns string
}
// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
func newHorizontalPodAutoscalers(c *AutoscalingV2beta2Client, namespace string) *horizontalPodAutoscalers {
return &horizontalPodAutoscalers{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
result = &v2beta2.HorizontalPodAutoscalerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
}
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Post().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
SubResource("status").
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("horizontalpodautoscalers").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"expansion_generated.go",
"horizontalpodautoscaler.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/listers/autoscaling/v2beta2",
importpath = "k8s.io/client-go/listers/autoscaling/v2beta2",
visibility = ["//visibility:public"],
deps = [
"//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v2beta2
// HorizontalPodAutoscalerListerExpansion allows custom methods to be added to
// HorizontalPodAutoscalerLister.
type HorizontalPodAutoscalerListerExpansion interface{}
// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to
// HorizontalPodAutoscalerNamespaceLister.
type HorizontalPodAutoscalerNamespaceListerExpansion interface{}
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v2beta2
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
type HorizontalPodAutoscalerLister interface {
// List lists all HorizontalPodAutoscalers in the indexer.
List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error)
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
HorizontalPodAutoscalerListerExpansion
}
// horizontalPodAutoscalerLister implements the HorizontalPodAutoscalerLister interface.
type horizontalPodAutoscalerLister struct {
indexer cache.Indexer
}
// NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister.
func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister {
return &horizontalPodAutoscalerLister{indexer: indexer}
}
// List lists all HorizontalPodAutoscalers in the indexer.
func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2beta2.HorizontalPodAutoscaler))
})
return ret, err
}
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister {
return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
type HorizontalPodAutoscalerNamespaceLister interface {
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error)
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
Get(name string) (*v2beta2.HorizontalPodAutoscaler, error)
HorizontalPodAutoscalerNamespaceListerExpansion
}
// horizontalPodAutoscalerNamespaceLister implements the HorizontalPodAutoscalerNamespaceLister
// interface.
type horizontalPodAutoscalerNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2beta2.HorizontalPodAutoscaler))
})
return ret, err
}
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2beta2.HorizontalPodAutoscaler, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v2beta2.Resource("horizontalpodautoscaler"), name)
}
return obj.(*v2beta2.HorizontalPodAutoscaler), nil
}
...@@ -567,6 +567,10 @@ ...@@ -567,6 +567,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1279,6 +1283,10 @@ ...@@ -1279,6 +1283,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/informers/batch", "ImportPath": "k8s.io/client-go/informers/batch",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1459,6 +1467,10 @@ ...@@ -1459,6 +1467,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1563,6 +1575,10 @@ ...@@ -1563,6 +1575,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/listers/batch/v1", "ImportPath": "k8s.io/client-go/listers/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
......
...@@ -34,6 +34,8 @@ import proto "github.com/gogo/protobuf/proto" ...@@ -34,6 +34,8 @@ import proto "github.com/gogo/protobuf/proto"
import fmt "fmt" import fmt "fmt"
import math "math" import math "math"
import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
import strings "strings" import strings "strings"
import reflect "reflect" import reflect "reflect"
...@@ -110,6 +112,16 @@ func (m *MetricValue) MarshalTo(dAtA []byte) (int, error) { ...@@ -110,6 +112,16 @@ func (m *MetricValue) MarshalTo(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i += n3 i += n3
if m.Selector != nil {
dAtA[i] = 0x32
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
n4, err := m.Selector.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
}
return i, nil return i, nil
} }
...@@ -131,11 +143,11 @@ func (m *MetricValueList) MarshalTo(dAtA []byte) (int, error) { ...@@ -131,11 +143,11 @@ func (m *MetricValueList) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa dAtA[i] = 0xa
i++ i++
i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
n4, err := m.ListMeta.MarshalTo(dAtA[i:]) n5, err := m.ListMeta.MarshalTo(dAtA[i:])
if err != nil { if err != nil {
return 0, err return 0, err
} }
i += n4 i += n5
if len(m.Items) > 0 { if len(m.Items) > 0 {
for _, msg := range m.Items { for _, msg := range m.Items {
dAtA[i] = 0x12 dAtA[i] = 0x12
...@@ -192,6 +204,10 @@ func (m *MetricValue) Size() (n int) { ...@@ -192,6 +204,10 @@ func (m *MetricValue) Size() (n int) {
} }
l = m.Value.Size() l = m.Value.Size()
n += 1 + l + sovGenerated(uint64(l)) n += 1 + l + sovGenerated(uint64(l))
if m.Selector != nil {
l = m.Selector.Size()
n += 1 + l + sovGenerated(uint64(l))
}
return n return n
} }
...@@ -232,6 +248,7 @@ func (this *MetricValue) String() string { ...@@ -232,6 +248,7 @@ func (this *MetricValue) String() string {
`Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
`WindowSeconds:` + valueToStringGenerated(this.WindowSeconds) + `,`, `WindowSeconds:` + valueToStringGenerated(this.WindowSeconds) + `,`,
`Value:` + strings.Replace(strings.Replace(this.Value.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `Value:` + strings.Replace(strings.Replace(this.Value.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
`Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
...@@ -423,6 +440,39 @@ func (m *MetricValue) Unmarshal(dAtA []byte) error { ...@@ -423,6 +440,39 @@ func (m *MetricValue) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Selector == nil {
m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
}
if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
...@@ -665,39 +715,41 @@ func init() { ...@@ -665,39 +715,41 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 531 bytes of a gzipped FileDescriptorProto // 566 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6f, 0xd3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6f, 0xd3, 0x3e,
0x18, 0xc6, 0x9b, 0x95, 0xc2, 0xe6, 0x69, 0x1a, 0xcb, 0x85, 0xa8, 0x87, 0xb4, 0x2a, 0x97, 0x82, 0x18, 0xc7, 0x9b, 0xf5, 0xd7, 0xfd, 0x3a, 0x8f, 0x69, 0x2c, 0x17, 0xa2, 0x1d, 0xd2, 0x6a, 0x5c,
0x34, 0x5b, 0xad, 0x10, 0x42, 0xe2, 0x16, 0x71, 0x41, 0xa2, 0x20, 0xb2, 0x89, 0x49, 0x80, 0x04, 0x0a, 0xd2, 0x6c, 0x6d, 0x20, 0x84, 0xc4, 0x2d, 0xe2, 0x82, 0xb4, 0x81, 0xc8, 0x26, 0x26, 0xf1,
0x8e, 0xf3, 0x36, 0x35, 0x25, 0x71, 0x64, 0x3b, 0x9d, 0x76, 0xe3, 0xc4, 0x99, 0x8f, 0xd5, 0xe3, 0x47, 0xe0, 0x38, 0x4f, 0x53, 0xd3, 0x26, 0x8e, 0x6c, 0xa7, 0xd3, 0x6e, 0xbc, 0x04, 0x5e, 0x56,
0xb8, 0xed, 0x54, 0xd1, 0xf0, 0x45, 0x50, 0x12, 0xa7, 0xed, 0x36, 0xfe, 0xed, 0x16, 0xdb, 0xef, 0x8f, 0xe3, 0xb6, 0x53, 0x45, 0x83, 0x78, 0x1f, 0x28, 0x89, 0xd3, 0x76, 0x1b, 0x7f, 0xb6, 0x5b,
0xf3, 0xf3, 0xf3, 0x3e, 0xaf, 0x83, 0x4e, 0xa6, 0x4f, 0x14, 0xe6, 0x82, 0x4c, 0xb3, 0x00, 0x64, 0x6c, 0x3f, 0xdf, 0x8f, 0xbf, 0xcf, 0xf7, 0x71, 0xd0, 0xc9, 0xf0, 0xa9, 0xc2, 0x5c, 0x90, 0x61,
0x02, 0x1a, 0x14, 0x99, 0x41, 0x12, 0x0a, 0x49, 0xcc, 0x41, 0x0c, 0x5a, 0x72, 0xa6, 0x48, 0x3a, 0x16, 0x80, 0x4c, 0x40, 0x83, 0x22, 0x63, 0x48, 0x42, 0x21, 0x89, 0x39, 0x88, 0x41, 0x4b, 0xce,
0x8d, 0x08, 0x4d, 0xb9, 0x22, 0x2c, 0x53, 0x5a, 0xc4, 0x1f, 0xea, 0xfd, 0xd9, 0x20, 0x00, 0x4d, 0x14, 0x49, 0x87, 0x11, 0xa1, 0x29, 0x57, 0x84, 0x65, 0x4a, 0x8b, 0xf8, 0x63, 0xbd, 0x3f, 0xde,
0x07, 0x24, 0x82, 0x04, 0x24, 0xd5, 0x10, 0xe2, 0x54, 0x0a, 0x2d, 0x6c, 0x5c, 0xe9, 0xb1, 0xa9, 0x0b, 0x40, 0xd3, 0x3d, 0x12, 0x41, 0x02, 0x92, 0x6a, 0x08, 0x71, 0x2a, 0x85, 0x16, 0x36, 0xae,
0xc3, 0xe9, 0x34, 0xc2, 0x85, 0x1e, 0x5f, 0xd6, 0x63, 0xa3, 0x6f, 0x1f, 0x46, 0x5c, 0x4f, 0xb2, 0xf4, 0xd8, 0xd4, 0xe1, 0x74, 0x18, 0xe1, 0x42, 0x8f, 0x2f, 0xeb, 0xb1, 0xd1, 0x6f, 0xef, 0x46,
0x00, 0x33, 0x11, 0x93, 0x48, 0x44, 0x82, 0x94, 0x98, 0x20, 0x1b, 0x97, 0xab, 0x72, 0x51, 0x7e, 0x5c, 0x0f, 0xb2, 0x00, 0x33, 0x11, 0x93, 0x48, 0x44, 0x82, 0x94, 0x98, 0x20, 0xeb, 0x97, 0xab,
0x55, 0xf8, 0x76, 0xcf, 0xd8, 0xa3, 0x29, 0x27, 0x4c, 0x48, 0x20, 0xb3, 0x6b, 0x16, 0xda, 0x8f, 0x72, 0x51, 0x7e, 0x55, 0xf8, 0xed, 0x1d, 0x63, 0x8f, 0xa6, 0x9c, 0x30, 0x21, 0x81, 0x8c, 0xaf,
0xd6, 0x35, 0x31, 0x65, 0x13, 0x9e, 0x80, 0x3c, 0xab, 0xfb, 0x20, 0x12, 0x94, 0xc8, 0x24, 0x83, 0x59, 0xd8, 0x7e, 0xbc, 0xa8, 0x89, 0x29, 0x1b, 0xf0, 0x04, 0xe4, 0x59, 0xdd, 0x07, 0x91, 0xa0,
0x1b, 0xa9, 0x54, 0x11, 0x07, 0xfd, 0xdd, 0x5d, 0xe4, 0x4f, 0x2a, 0x99, 0x25, 0x9a, 0xc7, 0xd7, 0x44, 0x26, 0x19, 0xdc, 0x4a, 0xa5, 0x8a, 0x38, 0xe8, 0xef, 0xee, 0x22, 0x7f, 0x52, 0xc9, 0x2c,
0xaf, 0x79, 0xfc, 0x2f, 0x81, 0x62, 0x13, 0x88, 0xe9, 0x55, 0x5d, 0xef, 0x6b, 0x13, 0xed, 0x8e, 0xd1, 0x3c, 0xbe, 0x7e, 0xcd, 0x93, 0x7f, 0x09, 0x14, 0x1b, 0x40, 0x4c, 0xaf, 0xea, 0x76, 0x7e,
0xca, 0xec, 0xde, 0xd0, 0xcf, 0x19, 0xd8, 0x63, 0xb4, 0x1f, 0x82, 0x62, 0x92, 0x07, 0x10, 0xbe, 0x36, 0xd1, 0xfa, 0x61, 0x99, 0xdd, 0x1b, 0x3a, 0xca, 0xc0, 0xee, 0xa3, 0xcd, 0x10, 0x14, 0x93,
0x0a, 0x3e, 0x01, 0xd3, 0x8e, 0xd5, 0xb5, 0xfa, 0xbb, 0xc3, 0xfb, 0xf5, 0x04, 0x68, 0xca, 0x71, 0x3c, 0x80, 0xf0, 0x55, 0xf0, 0x19, 0x98, 0x76, 0xac, 0xae, 0xd5, 0x5b, 0xdf, 0xbf, 0x5f, 0x4f,
0x11, 0x11, 0x9e, 0x0d, 0x70, 0x55, 0xe1, 0xc3, 0x18, 0x24, 0x24, 0x0c, 0xbc, 0x7b, 0xf3, 0x45, 0x80, 0xa6, 0x1c, 0x17, 0x11, 0xe1, 0xf1, 0x1e, 0xae, 0x2a, 0x7c, 0xe8, 0x83, 0x84, 0x84, 0x81,
0xa7, 0x91, 0x2f, 0x3a, 0xfb, 0xcf, 0x2e, 0x33, 0xfc, 0xab, 0x50, 0x7b, 0x88, 0x50, 0x35, 0xb2, 0x77, 0x6f, 0x32, 0xed, 0x34, 0xf2, 0x69, 0x67, 0xf3, 0xf9, 0x65, 0x86, 0x7f, 0x15, 0x6a, 0xef,
0x97, 0x34, 0x06, 0x67, 0xab, 0x6b, 0xf5, 0x77, 0x3c, 0xdb, 0xa8, 0xd1, 0x68, 0x75, 0xe2, 0x6f, 0x23, 0x54, 0x8d, 0xec, 0x25, 0x8d, 0xc1, 0x59, 0xe9, 0x5a, 0xbd, 0x35, 0xcf, 0x36, 0x6a, 0x74,
0x54, 0xd9, 0xef, 0xd0, 0x4e, 0xd1, 0x8a, 0xd2, 0x34, 0x4e, 0x9d, 0x66, 0xe9, 0xea, 0xe1, 0x86, 0x38, 0x3f, 0xf1, 0x97, 0xaa, 0xec, 0x77, 0x68, 0xad, 0x68, 0x45, 0x69, 0x1a, 0xa7, 0x4e, 0xb3,
0xab, 0x55, 0xdf, 0xeb, 0xc7, 0x51, 0xc4, 0x5b, 0xf8, 0x3c, 0xe6, 0x31, 0x78, 0x07, 0x06, 0xbf, 0x74, 0xf5, 0x70, 0xc9, 0xd5, 0xbc, 0xef, 0xc5, 0xe3, 0x28, 0xe2, 0x2d, 0x7c, 0x1e, 0xf3, 0x18,
0x73, 0x5c, 0x43, 0xfc, 0x35, 0xcf, 0x7e, 0x80, 0x6e, 0x9f, 0xf2, 0x24, 0x14, 0xa7, 0xce, 0xad, 0xbc, 0x2d, 0x83, 0x5f, 0x3b, 0xae, 0x21, 0xfe, 0x82, 0x67, 0x3f, 0x40, 0xab, 0xa7, 0x3c, 0x09,
0xae, 0xd5, 0x6f, 0x7a, 0x07, 0xf9, 0xa2, 0xb3, 0x77, 0x52, 0xee, 0x1c, 0x01, 0x13, 0x49, 0xa8, 0xc5, 0xa9, 0xf3, 0x5f, 0xd7, 0xea, 0x35, 0xbd, 0xad, 0x7c, 0xda, 0xd9, 0x38, 0x29, 0x77, 0x8e,
0x7c, 0x53, 0x60, 0x1f, 0xa1, 0xd6, 0xac, 0x08, 0xcb, 0x69, 0x95, 0x1e, 0xf0, 0xdf, 0x3c, 0xe0, 0x80, 0x89, 0x24, 0x54, 0xbe, 0x29, 0xb0, 0x8f, 0x50, 0x6b, 0x5c, 0x84, 0xe5, 0xb4, 0x4a, 0x0f,
0xfa, 0x61, 0xe0, 0xd7, 0x19, 0x4d, 0x34, 0xd7, 0x67, 0xde, 0x9e, 0xf1, 0xd1, 0x2a, 0x13, 0xf7, 0xf8, 0x6f, 0x1e, 0x70, 0xfd, 0x30, 0xf0, 0xeb, 0x8c, 0x26, 0x9a, 0xeb, 0x33, 0x6f, 0xc3, 0xf8,
0x2b, 0x56, 0xef, 0xbb, 0x85, 0xf6, 0x37, 0x06, 0xf1, 0x82, 0x2b, 0x6d, 0xbf, 0x47, 0xdb, 0x45, 0x68, 0x95, 0x89, 0xfb, 0x15, 0xcb, 0xfe, 0x80, 0xda, 0x0a, 0x46, 0xc0, 0xb4, 0x90, 0xce, 0x6a,
0x07, 0x21, 0xd5, 0xd4, 0x4c, 0x01, 0xff, 0x5f, 0xbf, 0x85, 0x7a, 0x04, 0x9a, 0x7a, 0x77, 0xcd, 0xc9, 0x7d, 0x74, 0xb3, 0xde, 0x0e, 0x68, 0x00, 0xa3, 0x23, 0x23, 0xf5, 0xee, 0xe4, 0xd3, 0x4e,
0x5d, 0xdb, 0xf5, 0x8e, 0xbf, 0x22, 0xda, 0x1f, 0x51, 0x8b, 0x6b, 0x88, 0x95, 0xb3, 0xd5, 0x6d, 0xbb, 0x5e, 0xf9, 0x73, 0xe4, 0xce, 0x37, 0x0b, 0x6d, 0x2e, 0xcd, 0xf9, 0x80, 0x2b, 0x6d, 0xbf,
0xf6, 0x77, 0x87, 0x4f, 0x6f, 0xf8, 0x8b, 0xe1, 0x0d, 0xb7, 0xeb, 0x9e, 0x9e, 0x17, 0x44, 0xbf, 0x47, 0xed, 0x02, 0x12, 0x52, 0x4d, 0xcd, 0x90, 0xf1, 0x0d, 0xaf, 0xe4, 0x4a, 0x1f, 0x82, 0xa6,
0x02, 0x7b, 0x87, 0xf3, 0xa5, 0xdb, 0x38, 0x5f, 0xba, 0x8d, 0x8b, 0xa5, 0xdb, 0xf8, 0x92, 0xbb, 0xde, 0x5d, 0xd3, 0x4a, 0xbb, 0xde, 0xf1, 0xe7, 0x44, 0xfb, 0x13, 0x6a, 0x71, 0x0d, 0xb1, 0x72,
0xd6, 0x3c, 0x77, 0xad, 0xf3, 0xdc, 0xb5, 0x2e, 0x72, 0xd7, 0xfa, 0x91, 0xbb, 0xd6, 0xb7, 0x9f, 0x56, 0xba, 0xcd, 0xde, 0xfa, 0xfe, 0xb3, 0x5b, 0xfe, 0xc1, 0x78, 0xc9, 0xed, 0x22, 0xb2, 0x17,
0x6e, 0xe3, 0xed, 0x1d, 0x03, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0x7d, 0xe5, 0xb6, 0x67, 0x3d, 0x05, 0xd1, 0xaf, 0xc0, 0xde, 0xee, 0x64, 0xe6, 0x36, 0xce, 0x67, 0x6e, 0xe3, 0x62, 0xe6, 0x36,
0x04, 0x00, 0x00, 0xbe, 0xe4, 0xae, 0x35, 0xc9, 0x5d, 0xeb, 0x3c, 0x77, 0xad, 0x8b, 0xdc, 0xb5, 0xbe, 0xe7, 0xae,
0xf5, 0xf5, 0x87, 0xdb, 0x78, 0xfb, 0xbf, 0x01, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xed,
0x64, 0xfc, 0x9c, 0x04, 0x00, 0x00,
} }
...@@ -49,6 +49,13 @@ message MetricValue { ...@@ -49,6 +49,13 @@ message MetricValue {
// the value of the metric for this // the value of the metric for this
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 5; optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 5;
// selector represents the label selector that could be used to select
// this metric, and will generally just be the selector passed in to
// the query used to fetch this metric.
// When left blank, only the metric's Name will be used to gather metrics.
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 6;
} }
// a list of values for a given metric for some set of objects // a list of values for a given metric for some set of objects
......
...@@ -55,6 +55,16 @@ func RegisterConversions(s *runtime.Scheme) error { ...@@ -55,6 +55,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddConversionFunc((*custommetrics.MetricValue)(nil), (*MetricValue)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_custom_metrics_MetricValue_To_v1beta1_MetricValue(a.(*custommetrics.MetricValue), b.(*MetricValue), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*MetricValue)(nil), (*custommetrics.MetricValue)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_MetricValue_To_custom_metrics_MetricValue(a.(*MetricValue), b.(*custommetrics.MetricValue), scope)
}); err != nil {
return err
}
return nil return nil
} }
...@@ -67,19 +77,11 @@ func autoConvert_v1beta1_MetricValue_To_custom_metrics_MetricValue(in *MetricVal ...@@ -67,19 +77,11 @@ func autoConvert_v1beta1_MetricValue_To_custom_metrics_MetricValue(in *MetricVal
out.Timestamp = in.Timestamp out.Timestamp = in.Timestamp
out.WindowSeconds = (*int64)(unsafe.Pointer(in.WindowSeconds)) out.WindowSeconds = (*int64)(unsafe.Pointer(in.WindowSeconds))
out.Value = in.Value out.Value = in.Value
// WARNING: in.Selector requires manual conversion: does not exist in peer-type
return nil return nil
} }
<<<<<<< HEAD
// Convert_v1beta1_MetricValue_To_custom_metrics_MetricValue is an autogenerated conversion function.
func Convert_v1beta1_MetricValue_To_custom_metrics_MetricValue(in *MetricValue, out *custommetrics.MetricValue, s conversion.Scope) error {
return autoConvert_v1beta1_MetricValue_To_custom_metrics_MetricValue(in, out, s)
}
func autoConvert_custom_metrics_MetricValue_To_v1beta1_MetricValue(in *custommetrics.MetricValue, out *MetricValue, s conversion.Scope) error { func autoConvert_custom_metrics_MetricValue_To_v1beta1_MetricValue(in *custommetrics.MetricValue, out *MetricValue, s conversion.Scope) error {
=======
func autoConvert_custom_metrics_MetricValue_To_v1beta1_MetricValue(in *custom_metrics.MetricValue, out *MetricValue, s conversion.Scope) error {
>>>>>>> Update metrics API to include autoscaling/v2beta2 changes
// TODO: Inefficient conversion - can we improve it? // TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.DescribedObject, &out.DescribedObject, 0); err != nil { if err := s.Convert(&in.DescribedObject, &out.DescribedObject, 0); err != nil {
return err return err
...@@ -91,21 +93,11 @@ func autoConvert_custom_metrics_MetricValue_To_v1beta1_MetricValue(in *custom_me ...@@ -91,21 +93,11 @@ func autoConvert_custom_metrics_MetricValue_To_v1beta1_MetricValue(in *custom_me
return nil return nil
} }
<<<<<<< HEAD
// Convert_custom_metrics_MetricValue_To_v1beta1_MetricValue is an autogenerated conversion function.
func Convert_custom_metrics_MetricValue_To_v1beta1_MetricValue(in *custommetrics.MetricValue, out *MetricValue, s conversion.Scope) error {
return autoConvert_custom_metrics_MetricValue_To_v1beta1_MetricValue(in, out, s)
}
func autoConvert_v1beta1_MetricValueList_To_custom_metrics_MetricValueList(in *MetricValueList, out *custommetrics.MetricValueList, s conversion.Scope) error { func autoConvert_v1beta1_MetricValueList_To_custom_metrics_MetricValueList(in *MetricValueList, out *custommetrics.MetricValueList, s conversion.Scope) error {
out.ListMeta = in.ListMeta out.ListMeta = in.ListMeta
out.Items = *(*[]custommetrics.MetricValue)(unsafe.Pointer(&in.Items))
=======
func autoConvert_v1beta1_MetricValueList_To_custom_metrics_MetricValueList(in *MetricValueList, out *custom_metrics.MetricValueList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
if in.Items != nil { if in.Items != nil {
in, out := &in.Items, &out.Items in, out := &in.Items, &out.Items
*out = make([]custom_metrics.MetricValue, len(*in)) *out = make([]custommetrics.MetricValue, len(*in))
for i := range *in { for i := range *in {
if err := Convert_v1beta1_MetricValue_To_custom_metrics_MetricValue(&(*in)[i], &(*out)[i], s); err != nil { if err := Convert_v1beta1_MetricValue_To_custom_metrics_MetricValue(&(*in)[i], &(*out)[i], s); err != nil {
return err return err
...@@ -114,7 +106,6 @@ func autoConvert_v1beta1_MetricValueList_To_custom_metrics_MetricValueList(in *M ...@@ -114,7 +106,6 @@ func autoConvert_v1beta1_MetricValueList_To_custom_metrics_MetricValueList(in *M
} else { } else {
out.Items = nil out.Items = nil
} }
>>>>>>> Update metrics API to include autoscaling/v2beta2 changes
return nil return nil
} }
......
...@@ -21,6 +21,7 @@ limitations under the License. ...@@ -21,6 +21,7 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
...@@ -36,6 +37,11 @@ func (in *MetricValue) DeepCopyInto(out *MetricValue) { ...@@ -36,6 +37,11 @@ func (in *MetricValue) DeepCopyInto(out *MetricValue) {
**out = **in **out = **in
} }
out.Value = in.Value.DeepCopy() out.Value = in.Value.DeepCopy()
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
return return
} }
......
...@@ -26,22 +26,21 @@ import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; ...@@ -26,22 +26,21 @@ import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
// Package-wide variables from generator "generated". // Package-wide variables from generator "generated".
option go_package = "v1beta2"; option go_package = "v1beta2";
// MetricIdent identifies a metric by name and, optionally, selector // MetricIdentifier identifies a metric by name and, optionally, selector
message MetricIdent { message MetricIdentifier {
// name is the name of the given metric // name is the name of the given metric
optional string name = 1; optional string name = 1;
// selector represents the label selector that could be used to select // selector represents the label selector that could be used to select
// this metric, and will generally just be the selector passed in to // this metric, and will generally just be the selector passed in to
// the query used to fetch this metric. It is the string-encoded form // the query used to fetch this metric.
// of a standard kubernetes label selector. // When left blank, only the metric's Name will be used to gather metrics.
// +optional // +optional
optional string selector = 2; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
} }
// MetricListOptions is used to select metrics by their label selectors // MetricListOptions is used to select metrics by their label selectors
...@@ -61,7 +60,7 @@ message MetricValue { ...@@ -61,7 +60,7 @@ message MetricValue {
// a reference to the described object // a reference to the described object
optional k8s.io.api.core.v1.ObjectReference describedObject = 1; optional k8s.io.api.core.v1.ObjectReference describedObject = 1;
optional MetricIdent metric = 2; optional MetricIdentifier metric = 2;
// indicates the time at which the metrics were produced // indicates the time at which the metrics were produced
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timestamp = 3; optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timestamp = 3;
...@@ -70,7 +69,7 @@ message MetricValue { ...@@ -70,7 +69,7 @@ message MetricValue {
// which these metrics were calculated, when returning rate // which these metrics were calculated, when returning rate
// metrics calculated from cumulative metrics (or zero for // metrics calculated from cumulative metrics (or zero for
// non-calculated instantaneous metrics). // non-calculated instantaneous metrics).
optional int64 window = 4; optional int64 windowSeconds = 4;
// the value of the metric for this // the value of the metric for this
optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 5; optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 5;
......
...@@ -23,9 +23,10 @@ package v1beta2 ...@@ -23,9 +23,10 @@ package v1beta2
import ( import (
unsafe "unsafe" unsafe "unsafe"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
custom_metrics "k8s.io/metrics/pkg/apis/custom_metrics" custommetrics "k8s.io/metrics/pkg/apis/custom_metrics"
) )
func init() { func init() {
...@@ -34,45 +35,68 @@ func init() { ...@@ -34,45 +35,68 @@ func init() {
// RegisterConversions adds conversion functions to the given scheme. // RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes. // Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error { func RegisterConversions(s *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs( if err := s.AddGeneratedConversionFunc((*MetricIdentifier)(nil), (*custommetrics.MetricIdentifier)(nil), func(a, b interface{}, scope conversion.Scope) error {
Convert_v1beta2_MetricIdent_To_custom_metrics_MetricIdent, return Convert_v1beta2_MetricIdentifier_To_custom_metrics_MetricIdentifier(a.(*MetricIdentifier), b.(*custommetrics.MetricIdentifier), scope)
Convert_custom_metrics_MetricIdent_To_v1beta2_MetricIdent, }); err != nil {
Convert_v1beta2_MetricValue_To_custom_metrics_MetricValue, return err
Convert_custom_metrics_MetricValue_To_v1beta2_MetricValue, }
Convert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList, if err := s.AddGeneratedConversionFunc((*custommetrics.MetricIdentifier)(nil), (*MetricIdentifier)(nil), func(a, b interface{}, scope conversion.Scope) error {
Convert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList, return Convert_custom_metrics_MetricIdentifier_To_v1beta2_MetricIdentifier(a.(*custommetrics.MetricIdentifier), b.(*MetricIdentifier), scope)
) }); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*MetricValue)(nil), (*custommetrics.MetricValue)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta2_MetricValue_To_custom_metrics_MetricValue(a.(*MetricValue), b.(*custommetrics.MetricValue), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*custommetrics.MetricValue)(nil), (*MetricValue)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_custom_metrics_MetricValue_To_v1beta2_MetricValue(a.(*custommetrics.MetricValue), b.(*MetricValue), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*MetricValueList)(nil), (*custommetrics.MetricValueList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList(a.(*MetricValueList), b.(*custommetrics.MetricValueList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*custommetrics.MetricValueList)(nil), (*MetricValueList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList(a.(*custommetrics.MetricValueList), b.(*MetricValueList), scope)
}); err != nil {
return err
}
return nil
} }
func autoConvert_v1beta2_MetricIdent_To_custom_metrics_MetricIdent(in *MetricIdent, out *custom_metrics.MetricIdent, s conversion.Scope) error { func autoConvert_v1beta2_MetricIdentifier_To_custom_metrics_MetricIdentifier(in *MetricIdentifier, out *custommetrics.MetricIdentifier, s conversion.Scope) error {
out.Name = in.Name out.Name = in.Name
out.Selector = in.Selector out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
return nil return nil
} }
// Convert_v1beta2_MetricIdent_To_custom_metrics_MetricIdent is an autogenerated conversion function. // Convert_v1beta2_MetricIdentifier_To_custom_metrics_MetricIdentifier is an autogenerated conversion function.
func Convert_v1beta2_MetricIdent_To_custom_metrics_MetricIdent(in *MetricIdent, out *custom_metrics.MetricIdent, s conversion.Scope) error { func Convert_v1beta2_MetricIdentifier_To_custom_metrics_MetricIdentifier(in *MetricIdentifier, out *custommetrics.MetricIdentifier, s conversion.Scope) error {
return autoConvert_v1beta2_MetricIdent_To_custom_metrics_MetricIdent(in, out, s) return autoConvert_v1beta2_MetricIdentifier_To_custom_metrics_MetricIdentifier(in, out, s)
} }
func autoConvert_custom_metrics_MetricIdent_To_v1beta2_MetricIdent(in *custom_metrics.MetricIdent, out *MetricIdent, s conversion.Scope) error { func autoConvert_custom_metrics_MetricIdentifier_To_v1beta2_MetricIdentifier(in *custommetrics.MetricIdentifier, out *MetricIdentifier, s conversion.Scope) error {
out.Name = in.Name out.Name = in.Name
out.Selector = in.Selector out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
return nil return nil
} }
// Convert_custom_metrics_MetricIdent_To_v1beta2_MetricIdent is an autogenerated conversion function. // Convert_custom_metrics_MetricIdentifier_To_v1beta2_MetricIdentifier is an autogenerated conversion function.
func Convert_custom_metrics_MetricIdent_To_v1beta2_MetricIdent(in *custom_metrics.MetricIdent, out *MetricIdent, s conversion.Scope) error { func Convert_custom_metrics_MetricIdentifier_To_v1beta2_MetricIdentifier(in *custommetrics.MetricIdentifier, out *MetricIdentifier, s conversion.Scope) error {
return autoConvert_custom_metrics_MetricIdent_To_v1beta2_MetricIdent(in, out, s) return autoConvert_custom_metrics_MetricIdentifier_To_v1beta2_MetricIdentifier(in, out, s)
} }
func autoConvert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in *MetricValue, out *custom_metrics.MetricValue, s conversion.Scope) error { func autoConvert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in *MetricValue, out *custommetrics.MetricValue, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it? // TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.DescribedObject, &out.DescribedObject, 0); err != nil { if err := s.Convert(&in.DescribedObject, &out.DescribedObject, 0); err != nil {
return err return err
} }
if err := Convert_v1beta2_MetricIdent_To_custom_metrics_MetricIdent(&in.Metric, &out.Metric, s); err != nil { if err := Convert_v1beta2_MetricIdentifier_To_custom_metrics_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil {
return err return err
} }
out.Timestamp = in.Timestamp out.Timestamp = in.Timestamp
...@@ -82,16 +106,16 @@ func autoConvert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in *MetricVal ...@@ -82,16 +106,16 @@ func autoConvert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in *MetricVal
} }
// Convert_v1beta2_MetricValue_To_custom_metrics_MetricValue is an autogenerated conversion function. // Convert_v1beta2_MetricValue_To_custom_metrics_MetricValue is an autogenerated conversion function.
func Convert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in *MetricValue, out *custom_metrics.MetricValue, s conversion.Scope) error { func Convert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in *MetricValue, out *custommetrics.MetricValue, s conversion.Scope) error {
return autoConvert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in, out, s) return autoConvert_v1beta2_MetricValue_To_custom_metrics_MetricValue(in, out, s)
} }
func autoConvert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in *custom_metrics.MetricValue, out *MetricValue, s conversion.Scope) error { func autoConvert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in *custommetrics.MetricValue, out *MetricValue, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it? // TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.DescribedObject, &out.DescribedObject, 0); err != nil { if err := s.Convert(&in.DescribedObject, &out.DescribedObject, 0); err != nil {
return err return err
} }
if err := Convert_custom_metrics_MetricIdent_To_v1beta2_MetricIdent(&in.Metric, &out.Metric, s); err != nil { if err := Convert_custom_metrics_MetricIdentifier_To_v1beta2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil {
return err return err
} }
out.Timestamp = in.Timestamp out.Timestamp = in.Timestamp
...@@ -101,28 +125,28 @@ func autoConvert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in *custom_me ...@@ -101,28 +125,28 @@ func autoConvert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in *custom_me
} }
// Convert_custom_metrics_MetricValue_To_v1beta2_MetricValue is an autogenerated conversion function. // Convert_custom_metrics_MetricValue_To_v1beta2_MetricValue is an autogenerated conversion function.
func Convert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in *custom_metrics.MetricValue, out *MetricValue, s conversion.Scope) error { func Convert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in *custommetrics.MetricValue, out *MetricValue, s conversion.Scope) error {
return autoConvert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in, out, s) return autoConvert_custom_metrics_MetricValue_To_v1beta2_MetricValue(in, out, s)
} }
func autoConvert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList(in *MetricValueList, out *custom_metrics.MetricValueList, s conversion.Scope) error { func autoConvert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList(in *MetricValueList, out *custommetrics.MetricValueList, s conversion.Scope) error {
out.ListMeta = in.ListMeta out.ListMeta = in.ListMeta
out.Items = *(*[]custom_metrics.MetricValue)(unsafe.Pointer(&in.Items)) out.Items = *(*[]custommetrics.MetricValue)(unsafe.Pointer(&in.Items))
return nil return nil
} }
// Convert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList is an autogenerated conversion function. // Convert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList is an autogenerated conversion function.
func Convert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList(in *MetricValueList, out *custom_metrics.MetricValueList, s conversion.Scope) error { func Convert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList(in *MetricValueList, out *custommetrics.MetricValueList, s conversion.Scope) error {
return autoConvert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList(in, out, s) return autoConvert_v1beta2_MetricValueList_To_custom_metrics_MetricValueList(in, out, s)
} }
func autoConvert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList(in *custom_metrics.MetricValueList, out *MetricValueList, s conversion.Scope) error { func autoConvert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList(in *custommetrics.MetricValueList, out *MetricValueList, s conversion.Scope) error {
out.ListMeta = in.ListMeta out.ListMeta = in.ListMeta
out.Items = *(*[]MetricValue)(unsafe.Pointer(&in.Items)) out.Items = *(*[]MetricValue)(unsafe.Pointer(&in.Items))
return nil return nil
} }
// Convert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList is an autogenerated conversion function. // Convert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList is an autogenerated conversion function.
func Convert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList(in *custom_metrics.MetricValueList, out *MetricValueList, s conversion.Scope) error { func Convert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList(in *custommetrics.MetricValueList, out *MetricValueList, s conversion.Scope) error {
return autoConvert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList(in, out, s) return autoConvert_custom_metrics_MetricValueList_To_v1beta2_MetricValueList(in, out, s)
} }
...@@ -21,21 +21,27 @@ limitations under the License. ...@@ -21,21 +21,27 @@ limitations under the License.
package v1beta2 package v1beta2
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MetricIdent) DeepCopyInto(out *MetricIdent) { func (in *MetricIdentifier) DeepCopyInto(out *MetricIdentifier) {
*out = *in *out = *in
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdent. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdentifier.
func (in *MetricIdent) DeepCopy() *MetricIdent { func (in *MetricIdentifier) DeepCopy() *MetricIdentifier {
if in == nil { if in == nil {
return nil return nil
} }
out := new(MetricIdent) out := new(MetricIdentifier)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
...@@ -70,7 +76,7 @@ func (in *MetricValue) DeepCopyInto(out *MetricValue) { ...@@ -70,7 +76,7 @@ func (in *MetricValue) DeepCopyInto(out *MetricValue) {
*out = *in *out = *in
out.TypeMeta = in.TypeMeta out.TypeMeta = in.TypeMeta
out.DescribedObject = in.DescribedObject out.DescribedObject = in.DescribedObject
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Timestamp.DeepCopyInto(&out.Timestamp) in.Timestamp.DeepCopyInto(&out.Timestamp)
if in.WindowSeconds != nil { if in.WindowSeconds != nil {
in, out := &in.WindowSeconds, &out.WindowSeconds in, out := &in.WindowSeconds, &out.WindowSeconds
......
...@@ -21,21 +21,27 @@ limitations under the License. ...@@ -21,21 +21,27 @@ limitations under the License.
package custom_metrics package custom_metrics
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MetricIdent) DeepCopyInto(out *MetricIdent) { func (in *MetricIdentifier) DeepCopyInto(out *MetricIdentifier) {
*out = *in *out = *in
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdent. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdentifier.
func (in *MetricIdent) DeepCopy() *MetricIdent { func (in *MetricIdentifier) DeepCopy() *MetricIdentifier {
if in == nil { if in == nil {
return nil return nil
} }
out := new(MetricIdent) out := new(MetricIdentifier)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
...@@ -45,7 +51,7 @@ func (in *MetricValue) DeepCopyInto(out *MetricValue) { ...@@ -45,7 +51,7 @@ func (in *MetricValue) DeepCopyInto(out *MetricValue) {
*out = *in *out = *in
out.TypeMeta = in.TypeMeta out.TypeMeta = in.TypeMeta
out.DescribedObject = in.DescribedObject out.DescribedObject = in.DescribedObject
out.Metric = in.Metric in.Metric.DeepCopyInto(&out.Metric)
in.Timestamp.DeepCopyInto(&out.Timestamp) in.Timestamp.DeepCopyInto(&out.Timestamp)
if in.WindowSeconds != nil { if in.WindowSeconds != nil {
in, out := &in.WindowSeconds, &out.WindowSeconds in, out := &in.WindowSeconds, &out.WindowSeconds
......
...@@ -539,6 +539,10 @@ ...@@ -539,6 +539,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1247,6 +1251,10 @@ ...@@ -1247,6 +1251,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/informers/batch", "ImportPath": "k8s.io/client-go/informers/batch",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1427,6 +1435,10 @@ ...@@ -1427,6 +1435,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -1531,6 +1543,10 @@ ...@@ -1531,6 +1543,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/listers/batch/v1", "ImportPath": "k8s.io/client-go/listers/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
......
...@@ -215,6 +215,10 @@ ...@@ -215,6 +215,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -511,6 +515,10 @@ ...@@ -511,6 +515,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/informers/batch", "ImportPath": "k8s.io/client-go/informers/batch",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -739,6 +747,14 @@ ...@@ -739,6 +747,14 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
...@@ -919,6 +935,10 @@ ...@@ -919,6 +935,10 @@
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta2",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"ImportPath": "k8s.io/client-go/listers/batch/v1", "ImportPath": "k8s.io/client-go/listers/batch/v1",
"Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
......
...@@ -187,7 +187,7 @@ func verifyResponsesFromCustomMetricsAPI(f *framework.Framework, customMetricsCl ...@@ -187,7 +187,7 @@ func verifyResponsesFromCustomMetricsAPI(f *framework.Framework, customMetricsCl
if !containsResource(resources.APIResources, "*/custom.googleapis.com|"+UnusedMetricName) { if !containsResource(resources.APIResources, "*/custom.googleapis.com|"+UnusedMetricName) {
framework.Failf("Metric '%s' expected but not received", UnusedMetricName) framework.Failf("Metric '%s' expected but not received", UnusedMetricName)
} }
value, err := customMetricsClient.NamespacedMetrics(f.Namespace.Name).GetForObject(schema.GroupKind{Group: "", Kind: "Pod"}, stackdriverExporterPod1, CustomMetricName) value, err := customMetricsClient.NamespacedMetrics(f.Namespace.Name).GetForObject(schema.GroupKind{Group: "", Kind: "Pod"}, stackdriverExporterPod1, CustomMetricName, labels.NewSelector())
if err != nil { if err != nil {
framework.Failf("Failed query: %s", err) framework.Failf("Failed query: %s", err)
} }
...@@ -198,7 +198,7 @@ func verifyResponsesFromCustomMetricsAPI(f *framework.Framework, customMetricsCl ...@@ -198,7 +198,7 @@ func verifyResponsesFromCustomMetricsAPI(f *framework.Framework, customMetricsCl
if err != nil { if err != nil {
framework.Failf("Couldn't create a label filter") framework.Failf("Couldn't create a label filter")
} }
values, err := customMetricsClient.NamespacedMetrics(f.Namespace.Name).GetForObjects(schema.GroupKind{Group: "", Kind: "Pod"}, labels.NewSelector().Add(*filter), CustomMetricName) values, err := customMetricsClient.NamespacedMetrics(f.Namespace.Name).GetForObjects(schema.GroupKind{Group: "", Kind: "Pod"}, labels.NewSelector().Add(*filter), CustomMetricName, labels.NewSelector())
if err != nil { if err != nil {
framework.Failf("Failed query: %s", err) framework.Failf("Failed query: %s", err)
} }
......
...@@ -210,6 +210,14 @@ var etcdStorageData = map[schema.GroupVersionResource]struct { ...@@ -210,6 +210,14 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
}, },
// -- // --
// k8s.io/kubernetes/pkg/apis/autoscaling/v2beta2
gvr("autoscaling", "v2beta2", "horizontalpodautoscalers"): {
stub: `{"metadata": {"name": "hpa3"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`,
expectedEtcdPath: "/registry/horizontalpodautoscalers/etcdstoragepathtestnamespace/hpa3",
expectedGVK: gvkP("autoscaling", "v1", "HorizontalPodAutoscaler"),
},
// --
// k8s.io/kubernetes/pkg/apis/batch/v1 // k8s.io/kubernetes/pkg/apis/batch/v1
gvr("batch", "v1", "jobs"): { gvr("batch", "v1", "jobs"): {
stub: `{"metadata": {"name": "job1"}, "spec": {"manualSelector": true, "selector": {"matchLabels": {"controller-uid": "uid1"}}, "template": {"metadata": {"labels": {"controller-uid": "uid1"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container1"}], "dnsPolicy": "ClusterFirst", "restartPolicy": "Never"}}}}`, stub: `{"metadata": {"name": "job1"}, "spec": {"manualSelector": true, "selector": {"matchLabels": {"controller-uid": "uid1"}}, "template": {"metadata": {"labels": {"controller-uid": "uid1"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container1"}], "dnsPolicy": "ClusterFirst", "restartPolicy": "Never"}}}}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment