Fix list_type_missing in api/autoscaling

This commit is contained in:
Tim Hockin 2023-11-12 15:12:40 -08:00
parent ad39737397
commit fe902f7384
No known key found for this signature in database
6 changed files with 49 additions and 7 deletions

View File

@ -1,10 +1,3 @@
API rule violation: list_type_missing,k8s.io/api/autoscaling/v2beta1,HorizontalPodAutoscalerSpec,Metrics
API rule violation: list_type_missing,k8s.io/api/autoscaling/v2beta1,HorizontalPodAutoscalerStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/autoscaling/v2beta1,HorizontalPodAutoscalerStatus,CurrentMetrics
API rule violation: list_type_missing,k8s.io/api/autoscaling/v2beta2,HPAScalingRules,Policies
API rule violation: list_type_missing,k8s.io/api/autoscaling/v2beta2,HorizontalPodAutoscalerSpec,Metrics
API rule violation: list_type_missing,k8s.io/api/autoscaling/v2beta2,HorizontalPodAutoscalerStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/autoscaling/v2beta2,HorizontalPodAutoscalerStatus,CurrentMetrics
API rule violation: list_type_missing,k8s.io/api/core/v1,AvoidPods,PreferAvoidPods
API rule violation: list_type_missing,k8s.io/api/core/v1,Capabilities,Add
API rule violation: list_type_missing,k8s.io/api/core/v1,Capabilities,Drop

View File

@ -13919,6 +13919,11 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common
},
},
"metrics": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.",
Type: []string{"array"},
@ -13978,6 +13983,11 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm
},
},
"currentMetrics": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "currentMetrics is the last read state of the metrics used by this autoscaler.",
Type: []string{"array"},
@ -13992,6 +14002,11 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm
},
},
"conditions": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.",
Type: []string{"array"},
@ -14601,6 +14616,11 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCa
},
},
"policies": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid",
Type: []string{"array"},
@ -14832,6 +14852,11 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common
},
},
"metrics": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.",
Type: []string{"array"},
@ -14897,6 +14922,11 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm
},
},
"currentMetrics": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "currentMetrics is the last read state of the metrics used by this autoscaler.",
Type: []string{"array"},
@ -14911,6 +14941,11 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm
},
},
"conditions": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.",
Type: []string{"array"},

View File

@ -220,6 +220,7 @@ message HorizontalPodAutoscalerSpec {
// increased, and vice-versa. See the individual metric source types for
// more information about how each type of metric must respond.
// +optional
// +listType=atomic
repeated MetricSpec metrics = 4;
}
@ -244,11 +245,13 @@ message HorizontalPodAutoscalerStatus {
// currentMetrics is the last read state of the metrics used by this autoscaler.
// +optional
// +listType=atomic
repeated MetricStatus currentMetrics = 5;
// conditions is the set of conditions required for this autoscaler to scale its target,
// and indicates whether or not those conditions are met.
// +optional
// +listType=atomic
repeated HorizontalPodAutoscalerCondition conditions = 6;
}

View File

@ -56,6 +56,7 @@ type HorizontalPodAutoscalerSpec struct {
// increased, and vice-versa. See the individual metric source types for
// more information about how each type of metric must respond.
// +optional
// +listType=atomic
Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"`
}
@ -260,11 +261,13 @@ type HorizontalPodAutoscalerStatus struct {
// currentMetrics is the last read state of the metrics used by this autoscaler.
// +optional
// +listType=atomic
CurrentMetrics []MetricStatus `json:"currentMetrics" protobuf:"bytes,5,rep,name=currentMetrics"`
// conditions is the set of conditions required for this autoscaler to scale its target,
// and indicates whether or not those conditions are met.
// +optional
// +listType=atomic
Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"`
}

View File

@ -136,6 +136,7 @@ message HPAScalingRules {
// policies is a list of potential scaling polices which can be used during scaling.
// At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
// +optional
// +listType=atomic
repeated HPAScalingPolicy policies = 2;
}
@ -238,6 +239,7 @@ message HorizontalPodAutoscalerSpec {
// 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
// +listType=atomic
repeated MetricSpec metrics = 4;
// behavior configures the scaling behavior of the target
@ -268,11 +270,13 @@ message HorizontalPodAutoscalerStatus {
// currentMetrics is the last read state of the metrics used by this autoscaler.
// +optional
// +listType=atomic
repeated MetricStatus currentMetrics = 5;
// conditions is the set of conditions required for this autoscaler to scale its target,
// and indicates whether or not those conditions are met.
// +optional
// +listType=atomic
repeated HorizontalPodAutoscalerCondition conditions = 6;
}

View File

@ -76,6 +76,7 @@ type HorizontalPodAutoscalerSpec struct {
// 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
// +listType=atomic
Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"`
// behavior configures the scaling behavior of the target
@ -199,6 +200,7 @@ type HPAScalingRules struct {
// policies is a list of potential scaling polices which can be used during scaling.
// At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
// +optional
// +listType=atomic
Policies []HPAScalingPolicy `json:"policies,omitempty" protobuf:"bytes,2,rep,name=policies"`
}
@ -393,11 +395,13 @@ type HorizontalPodAutoscalerStatus struct {
// currentMetrics is the last read state of the metrics used by this autoscaler.
// +optional
// +listType=atomic
CurrentMetrics []MetricStatus `json:"currentMetrics" protobuf:"bytes,5,rep,name=currentMetrics"`
// conditions is the set of conditions required for this autoscaler to scale its target,
// and indicates whether or not those conditions are met.
// +optional
// +listType=atomic
Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"`
}