From 65819f66c94642404439e25054ff8938d70c05f8 Mon Sep 17 00:00:00 2001 From: Zeleena Kearney Date: Tue, 16 Mar 2021 15:11:36 -0400 Subject: [PATCH] Mark v2beta1 and v2beta2 HPA status conditions as optional to resolve unnecessary apply error --- api/openapi-spec/swagger.json | 6 ++---- staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto | 1 + staging/src/k8s.io/api/autoscaling/v2beta1/types.go | 1 + staging/src/k8s.io/api/autoscaling/v2beta2/generated.proto | 1 + staging/src/k8s.io/api/autoscaling/v2beta2/types.go | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index ee11b75a866..98b64cfe272 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -2534,8 +2534,7 @@ }, "required": [ "currentReplicas", - "desiredReplicas", - "conditions" + "desiredReplicas" ], "type": "object" }, @@ -3093,8 +3092,7 @@ }, "required": [ "currentReplicas", - "desiredReplicas", - "conditions" + "desiredReplicas" ], "type": "object" }, diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto index 5ad55fa7277..27f9ab45c4e 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto +++ b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto @@ -248,6 +248,7 @@ message HorizontalPodAutoscalerStatus { // conditions is the set of conditions required for this autoscaler to scale its target, // and indicates whether or not those conditions are met. + // +optional repeated HorizontalPodAutoscalerCondition conditions = 6; } diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/types.go b/staging/src/k8s.io/api/autoscaling/v2beta1/types.go index 05023d9bcf4..c49c5e0c526 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta1/types.go +++ b/staging/src/k8s.io/api/autoscaling/v2beta1/types.go @@ -264,6 +264,7 @@ type HorizontalPodAutoscalerStatus struct { // conditions is the set of conditions required for this autoscaler to scale its target, // and indicates whether or not those conditions are met. + // +optional Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/staging/src/k8s.io/api/autoscaling/v2beta2/generated.proto b/staging/src/k8s.io/api/autoscaling/v2beta2/generated.proto index 77a6cb379ee..7dee1447040 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta2/generated.proto +++ b/staging/src/k8s.io/api/autoscaling/v2beta2/generated.proto @@ -272,6 +272,7 @@ message HorizontalPodAutoscalerStatus { // conditions is the set of conditions required for this autoscaler to scale its target, // and indicates whether or not those conditions are met. + // +optional repeated HorizontalPodAutoscalerCondition conditions = 6; } diff --git a/staging/src/k8s.io/api/autoscaling/v2beta2/types.go b/staging/src/k8s.io/api/autoscaling/v2beta2/types.go index 1be548d0afe..7619f1e009c 100644 --- a/staging/src/k8s.io/api/autoscaling/v2beta2/types.go +++ b/staging/src/k8s.io/api/autoscaling/v2beta2/types.go @@ -373,6 +373,7 @@ type HorizontalPodAutoscalerStatus struct { // conditions is the set of conditions required for this autoscaler to scale its target, // and indicates whether or not those conditions are met. + // +optional Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"` }