generated.proto 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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.apps.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. // PetSet represents a set of pods with consistent identities.
  24. // Identities are defined as:
  25. // - Network: A single stable DNS and hostname.
  26. // - Storage: As many VolumeClaims as requested.
  27. // The PetSet guarantees that a given network identity will always
  28. // map to the same storage identity. PetSet is currently in alpha
  29. // and subject to change without notice.
  30. message PetSet {
  31. optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
  32. // Spec defines the desired identities of pets in this set.
  33. optional PetSetSpec spec = 2;
  34. // Status is the current status of Pets in this PetSet. This data
  35. // may be out of date by some window of time.
  36. optional PetSetStatus status = 3;
  37. }
  38. // PetSetList is a collection of PetSets.
  39. message PetSetList {
  40. optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
  41. repeated PetSet items = 2;
  42. }
  43. // A PetSetSpec is the specification of a PetSet.
  44. message PetSetSpec {
  45. // Replicas is the desired number of replicas of the given Template.
  46. // These are replicas in the sense that they are instantiations of the
  47. // same Template, but individual replicas also have a consistent identity.
  48. // If unspecified, defaults to 1.
  49. // TODO: Consider a rename of this field.
  50. optional int32 replicas = 1;
  51. // Selector is a label query over pods that should match the replica count.
  52. // If empty, defaulted to labels on the pod template.
  53. // More info: http://releases.k8s.io/release-1.4/docs/user-guide/labels.md#label-selectors
  54. optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2;
  55. // Template is the object that describes the pod that will be created if
  56. // insufficient replicas are detected. Each pod stamped out by the PetSet
  57. // will fulfill this Template, but have a unique identity from the rest
  58. // of the PetSet.
  59. optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
  60. // VolumeClaimTemplates is a list of claims that pets are allowed to reference.
  61. // The PetSet controller is responsible for mapping network identities to
  62. // claims in a way that maintains the identity of a pet. Every claim in
  63. // this list must have at least one matching (by name) volumeMount in one
  64. // container in the template. A claim in this list takes precedence over
  65. // any volumes in the template, with the same name.
  66. // TODO: Define the behavior if a claim already exists with the same name.
  67. repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
  68. // ServiceName is the name of the service that governs this PetSet.
  69. // This service must exist before the PetSet, and is responsible for
  70. // the network identity of the set. Pets get DNS/hostnames that follow the
  71. // pattern: pet-specific-string.serviceName.default.svc.cluster.local
  72. // where "pet-specific-string" is managed by the PetSet controller.
  73. optional string serviceName = 5;
  74. }
  75. // PetSetStatus represents the current state of a PetSet.
  76. message PetSetStatus {
  77. // most recent generation observed by this autoscaler.
  78. optional int64 observedGeneration = 1;
  79. // Replicas is the number of actual replicas.
  80. optional int32 replicas = 2;
  81. }