From c0eedf775e6e1983dfaf2f5b0a314cbc9adb0c9e Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Sun, 13 May 2018 11:45:47 +0900 Subject: [PATCH] Make DisruptedPods in PodDisruptionBudgetStatus optional field --- pkg/apis/policy/types.go | 1 + staging/src/k8s.io/api/policy/v1beta1/types.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/apis/policy/types.go b/pkg/apis/policy/types.go index 298fcd0e4df..1af388bc0e3 100644 --- a/pkg/apis/policy/types.go +++ b/pkg/apis/policy/types.go @@ -63,6 +63,7 @@ type PodDisruptionBudgetStatus struct { // the list automatically by PodDisruptionBudget controller after some time. // If everything goes smooth this map should be empty for the most of the time. // Large number of entries in the map may indicate problems with pod deletions. + // +optional DisruptedPods map[string]metav1.Time // Number of pod disruptions that are currently allowed. diff --git a/staging/src/k8s.io/api/policy/v1beta1/types.go b/staging/src/k8s.io/api/policy/v1beta1/types.go index ba1e4ff314f..3314e0c0e75 100644 --- a/staging/src/k8s.io/api/policy/v1beta1/types.go +++ b/staging/src/k8s.io/api/policy/v1beta1/types.go @@ -60,7 +60,8 @@ type PodDisruptionBudgetStatus struct { // the list automatically by PodDisruptionBudget controller after some time. // If everything goes smooth this map should be empty for the most of the time. // Large number of entries in the map may indicate problems with pod deletions. - DisruptedPods map[string]metav1.Time `json:"disruptedPods" protobuf:"bytes,2,rep,name=disruptedPods"` + // +optional + DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty" protobuf:"bytes,2,rep,name=disruptedPods"` // Number of pod disruptions that are currently allowed. PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"`