generated.proto 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file was autogenerated by go-to-protobuf. Do not edit it manually!
  14. syntax = "proto2";
  15. package k8s.io.api.policy.v1;
  16. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  19. import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
  20. // Package-wide variables from generator "generated".
  21. option go_package = "v1";
  22. // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
  23. message PodDisruptionBudget {
  24. // Standard object's metadata.
  25. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  26. // +optional
  27. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  28. // Specification of the desired behavior of the PodDisruptionBudget.
  29. // +optional
  30. optional PodDisruptionBudgetSpec spec = 2;
  31. // Most recently observed status of the PodDisruptionBudget.
  32. // +optional
  33. optional PodDisruptionBudgetStatus status = 3;
  34. }
  35. // PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
  36. message PodDisruptionBudgetList {
  37. // Standard object's metadata.
  38. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  39. // +optional
  40. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  41. // Items is a list of PodDisruptionBudgets
  42. repeated PodDisruptionBudget items = 2;
  43. }
  44. // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
  45. message PodDisruptionBudgetSpec {
  46. // An eviction is allowed if at least "minAvailable" pods selected by
  47. // "selector" will still be available after the eviction, i.e. even in the
  48. // absence of the evicted pod. So for example you can prevent all voluntary
  49. // evictions by specifying "100%".
  50. // +optional
  51. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString minAvailable = 1;
  52. // Label query over pods whose evictions are managed by the disruption
  53. // budget.
  54. // A null selector will match no pods, while an empty ({}) selector will select
  55. // all pods within the namespace.
  56. // +patchStrategy=replace
  57. // +optional
  58. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
  59. // An eviction is allowed if at most "maxUnavailable" pods selected by
  60. // "selector" are unavailable after the eviction, i.e. even in absence of
  61. // the evicted pod. For example, one can prevent all voluntary evictions
  62. // by specifying 0. This is a mutually exclusive setting with "minAvailable".
  63. // +optional
  64. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 3;
  65. }
  66. // PodDisruptionBudgetStatus represents information about the status of a
  67. // PodDisruptionBudget. Status may trail the actual state of a system.
  68. message PodDisruptionBudgetStatus {
  69. // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other
  70. // status information is valid only if observedGeneration equals to PDB's object generation.
  71. // +optional
  72. optional int64 observedGeneration = 1;
  73. // DisruptedPods contains information about pods whose eviction was
  74. // processed by the API server eviction subresource handler but has not
  75. // yet been observed by the PodDisruptionBudget controller.
  76. // A pod will be in this map from the time when the API server processed the
  77. // eviction request to the time when the pod is seen by PDB controller
  78. // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
  79. // and the value is the time when the API server processed the eviction request. If
  80. // the deletion didn't occur and a pod is still there it will be removed from
  81. // the list automatically by PodDisruptionBudget controller after some time.
  82. // If everything goes smooth this map should be empty for the most of the time.
  83. // Large number of entries in the map may indicate problems with pod deletions.
  84. // +optional
  85. map<string, k8s.io.apimachinery.pkg.apis.meta.v1.Time> disruptedPods = 2;
  86. // Number of pod disruptions that are currently allowed.
  87. optional int32 disruptionsAllowed = 3;
  88. // current number of healthy pods
  89. optional int32 currentHealthy = 4;
  90. // minimum desired number of healthy pods
  91. optional int32 desiredHealthy = 5;
  92. // total number of pods counted by this disruption budget
  93. optional int32 expectedPods = 6;
  94. // Conditions contain conditions for PDB. The disruption controller sets the
  95. // DisruptionAllowed condition. The following are known values for the reason field
  96. // (additional reasons could be added in the future):
  97. // - SyncFailed: The controller encountered an error and wasn't able to compute
  98. // the number of allowed disruptions. Therefore no disruptions are
  99. // allowed and the status of the condition will be False.
  100. // - InsufficientPods: The number of pods are either at or below the number
  101. // required by the PodDisruptionBudget. No disruptions are
  102. // allowed and the status of the condition will be False.
  103. // - SufficientPods: There are more pods than required by the PodDisruptionBudget.
  104. // The condition will be True, and the number of allowed
  105. // disruptions are provided by the disruptionsAllowed property.
  106. //
  107. // +optional
  108. // +patchMergeKey=type
  109. // +patchStrategy=merge
  110. // +listType=map
  111. // +listMapKey=type
  112. repeated k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 7;
  113. }