generated.proto 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.coordination.v1alpha2;
  16. import "k8s.io/api/coordination/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  19. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  20. // Package-wide variables from generator "generated".
  21. option go_package = "k8s.io/api/coordination/v1alpha2";
  22. // LeaseCandidate defines a candidate for a Lease object.
  23. // Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
  24. message LeaseCandidate {
  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. // spec contains the specification of the Lease.
  29. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  30. // +optional
  31. optional LeaseCandidateSpec spec = 2;
  32. }
  33. // LeaseCandidateList is a list of Lease objects.
  34. message LeaseCandidateList {
  35. // Standard list metadata.
  36. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  37. // +optional
  38. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  39. // items is a list of schema objects.
  40. repeated LeaseCandidate items = 2;
  41. }
  42. // LeaseCandidateSpec is a specification of a Lease.
  43. message LeaseCandidateSpec {
  44. // LeaseName is the name of the lease for which this candidate is contending.
  45. // This field is immutable.
  46. // +required
  47. optional string leaseName = 1;
  48. // PingTime is the last time that the server has requested the LeaseCandidate
  49. // to renew. It is only done during leader election to check if any
  50. // LeaseCandidates have become ineligible. When PingTime is updated, the
  51. // LeaseCandidate will respond by updating RenewTime.
  52. // +optional
  53. optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime pingTime = 2;
  54. // RenewTime is the time that the LeaseCandidate was last updated.
  55. // Any time a Lease needs to do leader election, the PingTime field
  56. // is updated to signal to the LeaseCandidate that they should update
  57. // the RenewTime.
  58. // Old LeaseCandidate objects are also garbage collected if it has been hours
  59. // since the last renew. The PingTime field is updated regularly to prevent
  60. // garbage collection for still active LeaseCandidates.
  61. // +optional
  62. optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 3;
  63. // BinaryVersion is the binary version. It must be in a semver format without leading `v`.
  64. // This field is required.
  65. // +required
  66. optional string binaryVersion = 4;
  67. // EmulationVersion is the emulation version. It must be in a semver format without leading `v`.
  68. // EmulationVersion must be less than or equal to BinaryVersion.
  69. // This field is required when strategy is "OldestEmulationVersion"
  70. // +optional
  71. optional string emulationVersion = 5;
  72. // Strategy is the strategy that coordinated leader election will use for picking the leader.
  73. // If multiple candidates for the same Lease return different strategies, the strategy provided
  74. // by the candidate with the latest BinaryVersion will be used. If there is still conflict,
  75. // this is a user error and coordinated leader election will not operate the Lease until resolved.
  76. // +required
  77. optional string strategy = 6;
  78. }