generated.proto 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. Copyright 2016 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.kubernetes.pkg.apis.policy.v1alpha1;
  16. import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
  17. import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
  18. import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
  19. import "k8s.io/kubernetes/pkg/runtime/generated.proto";
  20. import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
  21. // Package-wide variables from generator "generated".
  22. option go_package = "v1alpha1";
  23. // Eviction evicts a pod from its node subject to certain policies and safety constraints.
  24. // This is a subresource of Pod. A request to cause such an eviction is
  25. // created by POSTing to .../pods/foo/evictions.
  26. message Eviction {
  27. // ObjectMeta describes the pod that is being evicted.
  28. optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
  29. // DeleteOptions may be provided
  30. optional k8s.io.kubernetes.pkg.api.v1.DeleteOptions deleteOptions = 2;
  31. }
  32. // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
  33. message PodDisruptionBudget {
  34. optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
  35. // Specification of the desired behavior of the PodDisruptionBudget.
  36. optional PodDisruptionBudgetSpec spec = 2;
  37. // Most recently observed status of the PodDisruptionBudget.
  38. optional PodDisruptionBudgetStatus status = 3;
  39. }
  40. // PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
  41. message PodDisruptionBudgetList {
  42. optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
  43. repeated PodDisruptionBudget items = 2;
  44. }
  45. // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
  46. message PodDisruptionBudgetSpec {
  47. // The minimum number of pods that must be available simultaneously. This
  48. // can be either an integer or a string specifying a percentage, e.g. "28%".
  49. optional k8s.io.kubernetes.pkg.util.intstr.IntOrString minAvailable = 1;
  50. // Label query over pods whose evictions are managed by the disruption
  51. // budget.
  52. optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2;
  53. }
  54. // PodDisruptionBudgetStatus represents information about the status of a
  55. // PodDisruptionBudget. Status may trail the actual state of a system.
  56. message PodDisruptionBudgetStatus {
  57. // Whether or not a disruption is currently allowed.
  58. optional bool disruptionAllowed = 1;
  59. // current number of healthy pods
  60. optional int32 currentHealthy = 2;
  61. // minimum desired number of healthy pods
  62. optional int32 desiredHealthy = 3;
  63. // total number of pods counted by this disruption budget
  64. optional int32 expectedPods = 4;
  65. }