Unverified Commit e98bf0fb authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63757 from nak3/disruptedPods-optional

Automatic merge from submit-queue (batch tested with PRs 63757, 67698, 67712, 67494, 67700). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Make DisruptedPods in PodDisruptionBudgetStatus optional field **What this PR does / why we need it**: Please refer to https://github.com/kubernetes/kubernetes/issues/63756 **Which issue(s) this PR fixes** Fixes https://github.com/kubernetes/kubernetes/issues/63756 **Release note**: ```release-note NONE ```
parents 9af86c55 811bdbdc
...@@ -85145,7 +85145,6 @@ ...@@ -85145,7 +85145,6 @@
"io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus": { "io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus": {
"description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
"required": [ "required": [
"disruptedPods",
"disruptionsAllowed", "disruptionsAllowed",
"currentHealthy", "currentHealthy",
"desiredHealthy", "desiredHealthy",
...@@ -2266,7 +2266,6 @@ ...@@ -2266,7 +2266,6 @@
"id": "v1beta1.PodDisruptionBudgetStatus", "id": "v1beta1.PodDisruptionBudgetStatus",
"description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
"required": [ "required": [
"disruptedPods",
"disruptionsAllowed", "disruptionsAllowed",
"currentHealthy", "currentHealthy",
"desiredHealthy", "desiredHealthy",
......
...@@ -1648,7 +1648,7 @@ Examples: e.g. "foo/</strong>" forbids "foo/bar", "foo/baz", etc. e.g. "foo.*" f ...@@ -1648,7 +1648,7 @@ Examples: e.g. "foo/</strong>" forbids "foo/bar", "foo/baz", etc. e.g. "foo.*" f
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">disruptedPods</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">disruptedPods</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn&#8217;t occur and a pod is still there it will be removed from 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.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn&#8217;t occur and a pod is still there it will be removed from 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.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</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">object</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
......
...@@ -63,6 +63,7 @@ type PodDisruptionBudgetStatus struct { ...@@ -63,6 +63,7 @@ type PodDisruptionBudgetStatus struct {
// the list automatically by PodDisruptionBudget controller after some time. // the list automatically by PodDisruptionBudget controller after some time.
// If everything goes smooth this map should be empty for the most of the 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. // Large number of entries in the map may indicate problems with pod deletions.
// +optional
DisruptedPods map[string]metav1.Time DisruptedPods map[string]metav1.Time
// Number of pod disruptions that are currently allowed. // Number of pod disruptions that are currently allowed.
......
...@@ -151,6 +151,7 @@ message PodDisruptionBudgetStatus { ...@@ -151,6 +151,7 @@ message PodDisruptionBudgetStatus {
// the list automatically by PodDisruptionBudget controller after some time. // the list automatically by PodDisruptionBudget controller after some time.
// If everything goes smooth this map should be empty for the most of the 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. // Large number of entries in the map may indicate problems with pod deletions.
// +optional
map<string, k8s.io.apimachinery.pkg.apis.meta.v1.Time> disruptedPods = 2; map<string, k8s.io.apimachinery.pkg.apis.meta.v1.Time> disruptedPods = 2;
// Number of pod disruptions that are currently allowed. // Number of pod disruptions that are currently allowed.
......
...@@ -60,7 +60,8 @@ type PodDisruptionBudgetStatus struct { ...@@ -60,7 +60,8 @@ type PodDisruptionBudgetStatus struct {
// the list automatically by PodDisruptionBudget controller after some time. // the list automatically by PodDisruptionBudget controller after some time.
// If everything goes smooth this map should be empty for the most of the 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. // 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. // Number of pod disruptions that are currently allowed.
PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"` PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"`
......
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