generated.proto 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  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.extensions.v1beta1;
  16. import "k8s.io/api/core/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. import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
  21. // Package-wide variables from generator "generated".
  22. option go_package = "k8s.io/api/extensions/v1beta1";
  23. // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for
  24. // more information.
  25. // DaemonSet represents the configuration of a daemon set.
  26. message DaemonSet {
  27. // Standard object's metadata.
  28. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  29. // +optional
  30. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  31. // The desired behavior of this daemon set.
  32. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  33. // +optional
  34. optional DaemonSetSpec spec = 2;
  35. // The current status of this daemon set. This data may be
  36. // out of date by some window of time.
  37. // Populated by the system.
  38. // Read-only.
  39. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  40. // +optional
  41. optional DaemonSetStatus status = 3;
  42. }
  43. // DaemonSetCondition describes the state of a DaemonSet at a certain point.
  44. message DaemonSetCondition {
  45. // Type of DaemonSet condition.
  46. optional string type = 1;
  47. // Status of the condition, one of True, False, Unknown.
  48. optional string status = 2;
  49. // Last time the condition transitioned from one status to another.
  50. // +optional
  51. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
  52. // The reason for the condition's last transition.
  53. // +optional
  54. optional string reason = 4;
  55. // A human readable message indicating details about the transition.
  56. // +optional
  57. optional string message = 5;
  58. }
  59. // DaemonSetList is a collection of daemon sets.
  60. message DaemonSetList {
  61. // Standard list metadata.
  62. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  63. // +optional
  64. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  65. // A list of daemon sets.
  66. repeated DaemonSet items = 2;
  67. }
  68. // DaemonSetSpec is the specification of a daemon set.
  69. message DaemonSetSpec {
  70. // A label query over pods that are managed by the daemon set.
  71. // Must match in order to be controlled.
  72. // If empty, defaulted to labels on Pod template.
  73. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  74. // +optional
  75. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
  76. // An object that describes the pod that will be created.
  77. // The DaemonSet will create exactly one copy of this pod on every node
  78. // that matches the template's node selector (or on every node if no node
  79. // selector is specified).
  80. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
  81. optional k8s.io.api.core.v1.PodTemplateSpec template = 2;
  82. // An update strategy to replace existing DaemonSet pods with new pods.
  83. // +optional
  84. optional DaemonSetUpdateStrategy updateStrategy = 3;
  85. // The minimum number of seconds for which a newly created DaemonSet pod should
  86. // be ready without any of its container crashing, for it to be considered
  87. // available. Defaults to 0 (pod will be considered available as soon as it
  88. // is ready).
  89. // +optional
  90. optional int32 minReadySeconds = 4;
  91. // DEPRECATED.
  92. // A sequence number representing a specific generation of the template.
  93. // Populated by the system. It can be set only during the creation.
  94. // +optional
  95. optional int64 templateGeneration = 5;
  96. // The number of old history to retain to allow rollback.
  97. // This is a pointer to distinguish between explicit zero and not specified.
  98. // Defaults to 10.
  99. // +optional
  100. optional int32 revisionHistoryLimit = 6;
  101. }
  102. // DaemonSetStatus represents the current status of a daemon set.
  103. message DaemonSetStatus {
  104. // The number of nodes that are running at least 1
  105. // daemon pod and are supposed to run the daemon pod.
  106. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  107. optional int32 currentNumberScheduled = 1;
  108. // The number of nodes that are running the daemon pod, but are
  109. // not supposed to run the daemon pod.
  110. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  111. optional int32 numberMisscheduled = 2;
  112. // The total number of nodes that should be running the daemon
  113. // pod (including nodes correctly running the daemon pod).
  114. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  115. optional int32 desiredNumberScheduled = 3;
  116. // The number of nodes that should be running the daemon pod and have one
  117. // or more of the daemon pod running and ready.
  118. optional int32 numberReady = 4;
  119. // The most recent generation observed by the daemon set controller.
  120. // +optional
  121. optional int64 observedGeneration = 5;
  122. // The total number of nodes that are running updated daemon pod
  123. // +optional
  124. optional int32 updatedNumberScheduled = 6;
  125. // The number of nodes that should be running the
  126. // daemon pod and have one or more of the daemon pod running and
  127. // available (ready for at least spec.minReadySeconds)
  128. // +optional
  129. optional int32 numberAvailable = 7;
  130. // The number of nodes that should be running the
  131. // daemon pod and have none of the daemon pod running and available
  132. // (ready for at least spec.minReadySeconds)
  133. // +optional
  134. optional int32 numberUnavailable = 8;
  135. // Count of hash collisions for the DaemonSet. The DaemonSet controller
  136. // uses this field as a collision avoidance mechanism when it needs to
  137. // create the name for the newest ControllerRevision.
  138. // +optional
  139. optional int32 collisionCount = 9;
  140. // Represents the latest available observations of a DaemonSet's current state.
  141. // +optional
  142. // +patchMergeKey=type
  143. // +patchStrategy=merge
  144. repeated DaemonSetCondition conditions = 10;
  145. }
  146. // DaemonSetUpdateStrategy indicates the strategy that the DaemonSet
  147. // controller will use to perform updates. It includes any additional parameters
  148. // necessary to perform the update for the indicated strategy.
  149. message DaemonSetUpdateStrategy {
  150. // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
  151. // Default is OnDelete.
  152. // +optional
  153. optional string type = 1;
  154. // Rolling update config params. Present only if type = "RollingUpdate".
  155. // ---
  156. // TODO: Update this to follow our convention for oneOf, whatever we decide it
  157. // to be. Same as Deployment `strategy.rollingUpdate`.
  158. // See https://github.com/kubernetes/kubernetes/issues/35345
  159. // +optional
  160. optional RollingUpdateDaemonSet rollingUpdate = 2;
  161. }
  162. // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for
  163. // more information.
  164. // Deployment enables declarative updates for Pods and ReplicaSets.
  165. message Deployment {
  166. // Standard object metadata.
  167. // +optional
  168. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  169. // Specification of the desired behavior of the Deployment.
  170. // +optional
  171. optional DeploymentSpec spec = 2;
  172. // Most recently observed status of the Deployment.
  173. // +optional
  174. optional DeploymentStatus status = 3;
  175. }
  176. // DeploymentCondition describes the state of a deployment at a certain point.
  177. message DeploymentCondition {
  178. // Type of deployment condition.
  179. optional string type = 1;
  180. // Status of the condition, one of True, False, Unknown.
  181. optional string status = 2;
  182. // The last time this condition was updated.
  183. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
  184. // Last time the condition transitioned from one status to another.
  185. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
  186. // The reason for the condition's last transition.
  187. optional string reason = 4;
  188. // A human readable message indicating details about the transition.
  189. optional string message = 5;
  190. }
  191. // DeploymentList is a list of Deployments.
  192. message DeploymentList {
  193. // Standard list metadata.
  194. // +optional
  195. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  196. // Items is the list of Deployments.
  197. repeated Deployment items = 2;
  198. }
  199. // DEPRECATED.
  200. // DeploymentRollback stores the information required to rollback a deployment.
  201. message DeploymentRollback {
  202. // Required: This must match the Name of a deployment.
  203. optional string name = 1;
  204. // The annotations to be updated to a deployment
  205. // +optional
  206. map<string, string> updatedAnnotations = 2;
  207. // The config of this deployment rollback.
  208. optional RollbackConfig rollbackTo = 3;
  209. }
  210. // DeploymentSpec is the specification of the desired behavior of the Deployment.
  211. message DeploymentSpec {
  212. // Number of desired pods. This is a pointer to distinguish between explicit
  213. // zero and not specified. Defaults to 1.
  214. // +optional
  215. optional int32 replicas = 1;
  216. // Label selector for pods. Existing ReplicaSets whose pods are
  217. // selected by this will be the ones affected by this deployment.
  218. // +optional
  219. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
  220. // Template describes the pods that will be created.
  221. optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
  222. // The deployment strategy to use to replace existing pods with new ones.
  223. // +optional
  224. // +patchStrategy=retainKeys
  225. optional DeploymentStrategy strategy = 4;
  226. // Minimum number of seconds for which a newly created pod should be ready
  227. // without any of its container crashing, for it to be considered available.
  228. // Defaults to 0 (pod will be considered available as soon as it is ready)
  229. // +optional
  230. optional int32 minReadySeconds = 5;
  231. // The number of old ReplicaSets to retain to allow rollback.
  232. // This is a pointer to distinguish between explicit zero and not specified.
  233. // This is set to the max value of int32 (i.e. 2147483647) by default, which
  234. // means "retaining all old ReplicaSets".
  235. // +optional
  236. optional int32 revisionHistoryLimit = 6;
  237. // Indicates that the deployment is paused and will not be processed by the
  238. // deployment controller.
  239. // +optional
  240. optional bool paused = 7;
  241. // DEPRECATED.
  242. // The config this deployment is rolling back to. Will be cleared after rollback is done.
  243. // +optional
  244. optional RollbackConfig rollbackTo = 8;
  245. // The maximum time in seconds for a deployment to make progress before it
  246. // is considered to be failed. The deployment controller will continue to
  247. // process failed deployments and a condition with a ProgressDeadlineExceeded
  248. // reason will be surfaced in the deployment status. Note that progress will
  249. // not be estimated during the time a deployment is paused. This is set to
  250. // the max value of int32 (i.e. 2147483647) by default, which means "no deadline".
  251. // +optional
  252. optional int32 progressDeadlineSeconds = 9;
  253. }
  254. // DeploymentStatus is the most recently observed status of the Deployment.
  255. message DeploymentStatus {
  256. // The generation observed by the deployment controller.
  257. // +optional
  258. optional int64 observedGeneration = 1;
  259. // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
  260. // +optional
  261. optional int32 replicas = 2;
  262. // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
  263. // +optional
  264. optional int32 updatedReplicas = 3;
  265. // Total number of ready pods targeted by this deployment.
  266. // +optional
  267. optional int32 readyReplicas = 7;
  268. // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
  269. // +optional
  270. optional int32 availableReplicas = 4;
  271. // Total number of unavailable pods targeted by this deployment. This is the total number of
  272. // pods that are still required for the deployment to have 100% available capacity. They may
  273. // either be pods that are running but not yet available or pods that still have not been created.
  274. // +optional
  275. optional int32 unavailableReplicas = 5;
  276. // Represents the latest available observations of a deployment's current state.
  277. // +patchMergeKey=type
  278. // +patchStrategy=merge
  279. repeated DeploymentCondition conditions = 6;
  280. // Count of hash collisions for the Deployment. The Deployment controller uses this
  281. // field as a collision avoidance mechanism when it needs to create the name for the
  282. // newest ReplicaSet.
  283. // +optional
  284. optional int32 collisionCount = 8;
  285. }
  286. // DeploymentStrategy describes how to replace existing pods with new ones.
  287. message DeploymentStrategy {
  288. // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
  289. // +optional
  290. optional string type = 1;
  291. // Rolling update config params. Present only if DeploymentStrategyType =
  292. // RollingUpdate.
  293. // ---
  294. // TODO: Update this to follow our convention for oneOf, whatever we decide it
  295. // to be.
  296. // +optional
  297. optional RollingUpdateDeployment rollingUpdate = 2;
  298. }
  299. // HTTPIngressPath associates a path with a backend. Incoming urls matching the
  300. // path are forwarded to the backend.
  301. message HTTPIngressPath {
  302. // Path is matched against the path of an incoming request. Currently it can
  303. // contain characters disallowed from the conventional "path" part of a URL
  304. // as defined by RFC 3986. Paths must begin with a '/'. When unspecified,
  305. // all paths from incoming requests are matched.
  306. // +optional
  307. optional string path = 1;
  308. // PathType determines the interpretation of the Path matching. PathType can
  309. // be one of the following values:
  310. // * Exact: Matches the URL path exactly.
  311. // * Prefix: Matches based on a URL path prefix split by '/'. Matching is
  312. // done on a path element by element basis. A path element refers is the
  313. // list of labels in the path split by the '/' separator. A request is a
  314. // match for path p if every p is an element-wise prefix of p of the
  315. // request path. Note that if the last element of the path is a substring
  316. // of the last element in request path, it is not a match (e.g. /foo/bar
  317. // matches /foo/bar/baz, but does not match /foo/barbaz).
  318. // * ImplementationSpecific: Interpretation of the Path matching is up to
  319. // the IngressClass. Implementations can treat this as a separate PathType
  320. // or treat it identically to Prefix or Exact path types.
  321. // Implementations are required to support all path types.
  322. // Defaults to ImplementationSpecific.
  323. optional string pathType = 3;
  324. // Backend defines the referenced service endpoint to which the traffic
  325. // will be forwarded to.
  326. optional IngressBackend backend = 2;
  327. }
  328. // HTTPIngressRuleValue is a list of http selectors pointing to backends.
  329. // In the example: http://<host>/<path>?<searchpart> -> backend where
  330. // where parts of the url correspond to RFC 3986, this resource will be used
  331. // to match against everything after the last '/' and before the first '?'
  332. // or '#'.
  333. message HTTPIngressRuleValue {
  334. // A collection of paths that map requests to backends.
  335. repeated HTTPIngressPath paths = 1;
  336. }
  337. // DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock.
  338. // IPBlock describes a particular CIDR (Ex. "192.168.1.0/24","2001:db8::/64") that is allowed
  339. // to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs
  340. // that should not be included within this rule.
  341. message IPBlock {
  342. // CIDR is a string representing the IP Block
  343. // Valid examples are "192.168.1.0/24" or "2001:db8::/64"
  344. optional string cidr = 1;
  345. // Except is a slice of CIDRs that should not be included within an IP Block
  346. // Valid examples are "192.168.1.0/24" or "2001:db8::/64"
  347. // Except values will be rejected if they are outside the CIDR range
  348. // +optional
  349. repeated string except = 2;
  350. }
  351. // Ingress is a collection of rules that allow inbound connections to reach the
  352. // endpoints defined by a backend. An Ingress can be configured to give services
  353. // externally-reachable urls, load balance traffic, terminate SSL, offer name
  354. // based virtual hosting etc.
  355. // DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information.
  356. message Ingress {
  357. // Standard object's metadata.
  358. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  359. // +optional
  360. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  361. // Spec is the desired state of the Ingress.
  362. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  363. // +optional
  364. optional IngressSpec spec = 2;
  365. // Status is the current state of the Ingress.
  366. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  367. // +optional
  368. optional IngressStatus status = 3;
  369. }
  370. // IngressBackend describes all endpoints for a given service and port.
  371. message IngressBackend {
  372. // Specifies the name of the referenced service.
  373. // +optional
  374. optional string serviceName = 1;
  375. // Specifies the port of the referenced service.
  376. // +optional
  377. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
  378. // Resource is an ObjectRef to another Kubernetes resource in the namespace
  379. // of the Ingress object. If resource is specified, serviceName and servicePort
  380. // must not be specified.
  381. // +optional
  382. optional k8s.io.api.core.v1.TypedLocalObjectReference resource = 3;
  383. }
  384. // IngressList is a collection of Ingress.
  385. message IngressList {
  386. // Standard object's metadata.
  387. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  388. // +optional
  389. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  390. // Items is the list of Ingress.
  391. repeated Ingress items = 2;
  392. }
  393. // IngressLoadBalancerIngress represents the status of a load-balancer ingress point.
  394. message IngressLoadBalancerIngress {
  395. // IP is set for load-balancer ingress points that are IP based.
  396. // +optional
  397. optional string ip = 1;
  398. // Hostname is set for load-balancer ingress points that are DNS based.
  399. // +optional
  400. optional string hostname = 2;
  401. // Ports provides information about the ports exposed by this LoadBalancer.
  402. // +listType=atomic
  403. // +optional
  404. repeated IngressPortStatus ports = 4;
  405. }
  406. // LoadBalancerStatus represents the status of a load-balancer.
  407. message IngressLoadBalancerStatus {
  408. // Ingress is a list containing ingress points for the load-balancer.
  409. // +optional
  410. repeated IngressLoadBalancerIngress ingress = 1;
  411. }
  412. // IngressPortStatus represents the error condition of a service port
  413. message IngressPortStatus {
  414. // Port is the port number of the ingress port.
  415. optional int32 port = 1;
  416. // Protocol is the protocol of the ingress port.
  417. // The supported values are: "TCP", "UDP", "SCTP"
  418. optional string protocol = 2;
  419. // Error is to record the problem with the service port
  420. // The format of the error shall comply with the following rules:
  421. // - built-in error values shall be specified in this file and those shall use
  422. // CamelCase names
  423. // - cloud provider specific error values must have names that comply with the
  424. // format foo.example.com/CamelCase.
  425. // ---
  426. // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
  427. // +optional
  428. // +kubebuilder:validation:Required
  429. // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
  430. // +kubebuilder:validation:MaxLength=316
  431. optional string error = 3;
  432. }
  433. // IngressRule represents the rules mapping the paths under a specified host to
  434. // the related backend services. Incoming requests are first evaluated for a host
  435. // match, then routed to the backend associated with the matching IngressRuleValue.
  436. message IngressRule {
  437. // Host is the fully qualified domain name of a network host, as defined by RFC 3986.
  438. // Note the following deviations from the "host" part of the
  439. // URI as defined in RFC 3986:
  440. // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to
  441. // the IP in the Spec of the parent Ingress.
  442. // 2. The `:` delimiter is not respected because ports are not allowed.
  443. // Currently the port of an Ingress is implicitly :80 for http and
  444. // :443 for https.
  445. // Both these may change in the future.
  446. // Incoming requests are matched against the host before the
  447. // IngressRuleValue. If the host is unspecified, the Ingress routes all
  448. // traffic based on the specified IngressRuleValue.
  449. //
  450. // Host can be "precise" which is a domain name without the terminating dot of
  451. // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name
  452. // prefixed with a single wildcard label (e.g. "*.foo.com").
  453. // The wildcard character '*' must appear by itself as the first DNS label and
  454. // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*").
  455. // Requests will be matched against the Host field in the following way:
  456. // 1. If Host is precise, the request matches this rule if the http host header is equal to Host.
  457. // 2. If Host is a wildcard, then the request matches this rule if the http host header
  458. // is to equal to the suffix (removing the first label) of the wildcard rule.
  459. // +optional
  460. optional string host = 1;
  461. // IngressRuleValue represents a rule to route requests for this IngressRule.
  462. // If unspecified, the rule defaults to a http catch-all. Whether that sends
  463. // just traffic matching the host to the default backend or all traffic to the
  464. // default backend, is left to the controller fulfilling the Ingress. Http is
  465. // currently the only supported IngressRuleValue.
  466. // +optional
  467. optional IngressRuleValue ingressRuleValue = 2;
  468. }
  469. // IngressRuleValue represents a rule to apply against incoming requests. If the
  470. // rule is satisfied, the request is routed to the specified backend. Currently
  471. // mixing different types of rules in a single Ingress is disallowed, so exactly
  472. // one of the following must be set.
  473. message IngressRuleValue {
  474. // http is a list of http selectors pointing to backends.
  475. // A path is matched against the path of an incoming request. Currently it can
  476. // contain characters disallowed from the conventional "path" part of a URL
  477. // as defined by RFC 3986. Paths must begin with a '/'.
  478. // A backend defines the referenced service endpoint to which the traffic
  479. // will be forwarded to.
  480. optional HTTPIngressRuleValue http = 1;
  481. }
  482. // IngressSpec describes the Ingress the user wishes to exist.
  483. message IngressSpec {
  484. // IngressClassName is the name of the IngressClass cluster resource. The
  485. // associated IngressClass defines which controller will implement the
  486. // resource. This replaces the deprecated `kubernetes.io/ingress.class`
  487. // annotation. For backwards compatibility, when that annotation is set, it
  488. // must be given precedence over this field. The controller may emit a
  489. // warning if the field and annotation have different values.
  490. // Implementations of this API should ignore Ingresses without a class
  491. // specified. An IngressClass resource may be marked as default, which can
  492. // be used to set a default value for this field. For more information,
  493. // refer to the IngressClass documentation.
  494. // +optional
  495. optional string ingressClassName = 4;
  496. // A default backend capable of servicing requests that don't match any
  497. // rule. At least one of 'backend' or 'rules' must be specified. This field
  498. // is optional to allow the loadbalancer controller or defaulting logic to
  499. // specify a global default.
  500. // +optional
  501. optional IngressBackend backend = 1;
  502. // TLS configuration. Currently the Ingress only supports a single TLS
  503. // port, 443. If multiple members of this list specify different hosts, they
  504. // will be multiplexed on the same port according to the hostname specified
  505. // through the SNI TLS extension, if the ingress controller fulfilling the
  506. // ingress supports SNI.
  507. // +optional
  508. repeated IngressTLS tls = 2;
  509. // A list of host rules used to configure the Ingress. If unspecified, or
  510. // no rule matches, all traffic is sent to the default backend.
  511. // +optional
  512. repeated IngressRule rules = 3;
  513. }
  514. // IngressStatus describe the current state of the Ingress.
  515. message IngressStatus {
  516. // LoadBalancer contains the current status of the load-balancer.
  517. // +optional
  518. optional IngressLoadBalancerStatus loadBalancer = 1;
  519. }
  520. // IngressTLS describes the transport layer security associated with an Ingress.
  521. message IngressTLS {
  522. // Hosts are a list of hosts included in the TLS certificate. The values in
  523. // this list must match the name/s used in the tlsSecret. Defaults to the
  524. // wildcard host setting for the loadbalancer controller fulfilling this
  525. // Ingress, if left unspecified.
  526. // +optional
  527. repeated string hosts = 1;
  528. // SecretName is the name of the secret used to terminate SSL traffic on 443.
  529. // Field is left optional to allow SSL routing based on SNI hostname alone.
  530. // If the SNI host in a listener conflicts with the "Host" header field used
  531. // by an IngressRule, the SNI host is used for termination and value of the
  532. // Host header is used for routing.
  533. // +optional
  534. optional string secretName = 2;
  535. }
  536. // DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy.
  537. // NetworkPolicy describes what network traffic is allowed for a set of Pods
  538. message NetworkPolicy {
  539. // Standard object's metadata.
  540. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  541. // +optional
  542. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  543. // Specification of the desired behavior for this NetworkPolicy.
  544. // +optional
  545. optional NetworkPolicySpec spec = 2;
  546. }
  547. // DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule.
  548. // NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
  549. // matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
  550. // This type is beta-level in 1.8
  551. message NetworkPolicyEgressRule {
  552. // List of destination ports for outgoing traffic.
  553. // Each item in this list is combined using a logical OR. If this field is
  554. // empty or missing, this rule matches all ports (traffic not restricted by port).
  555. // If this field is present and contains at least one item, then this rule allows
  556. // traffic only if the traffic matches at least one port in the list.
  557. // +optional
  558. repeated NetworkPolicyPort ports = 1;
  559. // List of destinations for outgoing traffic of pods selected for this rule.
  560. // Items in this list are combined using a logical OR operation. If this field is
  561. // empty or missing, this rule matches all destinations (traffic not restricted by
  562. // destination). If this field is present and contains at least one item, this rule
  563. // allows traffic only if the traffic matches at least one item in the to list.
  564. // +optional
  565. repeated NetworkPolicyPeer to = 2;
  566. }
  567. // DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule.
  568. // This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
  569. message NetworkPolicyIngressRule {
  570. // List of ports which should be made accessible on the pods selected for this rule.
  571. // Each item in this list is combined using a logical OR.
  572. // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
  573. // If this field is present and contains at least one item, then this rule allows traffic
  574. // only if the traffic matches at least one port in the list.
  575. // +optional
  576. repeated NetworkPolicyPort ports = 1;
  577. // List of sources which should be able to access the pods selected for this rule.
  578. // Items in this list are combined using a logical OR operation.
  579. // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
  580. // If this field is present and contains at least one item, this rule allows traffic only if the
  581. // traffic matches at least one item in the from list.
  582. // +optional
  583. repeated NetworkPolicyPeer from = 2;
  584. }
  585. // DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList.
  586. // Network Policy List is a list of NetworkPolicy objects.
  587. message NetworkPolicyList {
  588. // Standard list metadata.
  589. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  590. // +optional
  591. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  592. // Items is a list of schema objects.
  593. repeated NetworkPolicy items = 2;
  594. }
  595. // DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.
  596. message NetworkPolicyPeer {
  597. // This is a label selector which selects Pods. This field follows standard label
  598. // selector semantics; if present but empty, it selects all pods.
  599. //
  600. // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
  601. // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector.
  602. // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
  603. // +optional
  604. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
  605. // Selects Namespaces using cluster-scoped labels. This field follows standard label
  606. // selector semantics; if present but empty, it selects all namespaces.
  607. //
  608. // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects
  609. // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector.
  610. // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
  611. // +optional
  612. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
  613. // IPBlock defines policy on a particular IPBlock. If this field is set then
  614. // neither of the other fields can be.
  615. // +optional
  616. optional IPBlock ipBlock = 3;
  617. }
  618. // DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.
  619. message NetworkPolicyPort {
  620. // Optional. The protocol (TCP, UDP, or SCTP) which traffic must match.
  621. // If not specified, this field defaults to TCP.
  622. // +optional
  623. optional string protocol = 1;
  624. // The port on the given protocol. This can either be a numerical or named
  625. // port on a pod. If this field is not provided, this matches all port names and
  626. // numbers.
  627. // If present, only traffic on the specified protocol AND port will be matched.
  628. // +optional
  629. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
  630. // If set, indicates that the range of ports from port to endPort, inclusive,
  631. // should be allowed by the policy. This field cannot be defined if the port field
  632. // is not defined or if the port field is defined as a named (string) port.
  633. // The endPort must be equal or greater than port.
  634. // +optional
  635. optional int32 endPort = 3;
  636. }
  637. // DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.
  638. message NetworkPolicySpec {
  639. // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
  640. // is applied to any pods selected by this field. Multiple network policies can select the
  641. // same set of pods. In this case, the ingress rules for each are combined additively.
  642. // This field is NOT optional and follows standard label selector semantics.
  643. // An empty podSelector matches all pods in this namespace.
  644. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
  645. // List of ingress rules to be applied to the selected pods.
  646. // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
  647. // OR if the traffic source is the pod's local node,
  648. // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
  649. // objects whose podSelector matches the pod.
  650. // If this field is empty then this NetworkPolicy does not allow any traffic
  651. // (and serves solely to ensure that the pods it selects are isolated by default).
  652. // +optional
  653. repeated NetworkPolicyIngressRule ingress = 2;
  654. // List of egress rules to be applied to the selected pods. Outgoing traffic is
  655. // allowed if there are no NetworkPolicies selecting the pod (and cluster policy
  656. // otherwise allows the traffic), OR if the traffic matches at least one egress rule
  657. // across all of the NetworkPolicy objects whose podSelector matches the pod. If
  658. // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
  659. // solely to ensure that the pods it selects are isolated by default).
  660. // This field is beta-level in 1.8
  661. // +optional
  662. repeated NetworkPolicyEgressRule egress = 3;
  663. // List of rule types that the NetworkPolicy relates to.
  664. // Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
  665. // If this field is not specified, it will default based on the existence of Ingress or Egress rules;
  666. // policies that contain an Egress section are assumed to affect Egress, and all policies
  667. // (whether or not they contain an Ingress section) are assumed to affect Ingress.
  668. // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
  669. // Likewise, if you want to write a policy that specifies that no egress is allowed,
  670. // you must specify a policyTypes value that include "Egress" (since such a policy would not include
  671. // an Egress section and would otherwise default to just [ "Ingress" ]).
  672. // This field is beta-level in 1.8
  673. // +optional
  674. repeated string policyTypes = 4;
  675. }
  676. // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for
  677. // more information.
  678. // ReplicaSet ensures that a specified number of pod replicas are running at any given time.
  679. message ReplicaSet {
  680. // If the Labels of a ReplicaSet are empty, they are defaulted to
  681. // be the same as the Pod(s) that the ReplicaSet manages.
  682. // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  683. // +optional
  684. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  685. // Spec defines the specification of the desired behavior of the ReplicaSet.
  686. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  687. // +optional
  688. optional ReplicaSetSpec spec = 2;
  689. // Status is the most recently observed status of the ReplicaSet.
  690. // This data may be out of date by some window of time.
  691. // Populated by the system.
  692. // Read-only.
  693. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  694. // +optional
  695. optional ReplicaSetStatus status = 3;
  696. }
  697. // ReplicaSetCondition describes the state of a replica set at a certain point.
  698. message ReplicaSetCondition {
  699. // Type of replica set condition.
  700. optional string type = 1;
  701. // Status of the condition, one of True, False, Unknown.
  702. optional string status = 2;
  703. // The last time the condition transitioned from one status to another.
  704. // +optional
  705. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
  706. // The reason for the condition's last transition.
  707. // +optional
  708. optional string reason = 4;
  709. // A human readable message indicating details about the transition.
  710. // +optional
  711. optional string message = 5;
  712. }
  713. // ReplicaSetList is a collection of ReplicaSets.
  714. message ReplicaSetList {
  715. // Standard list metadata.
  716. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  717. // +optional
  718. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  719. // List of ReplicaSets.
  720. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  721. repeated ReplicaSet items = 2;
  722. }
  723. // ReplicaSetSpec is the specification of a ReplicaSet.
  724. message ReplicaSetSpec {
  725. // Replicas is the number of desired replicas.
  726. // This is a pointer to distinguish between explicit zero and unspecified.
  727. // Defaults to 1.
  728. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  729. // +optional
  730. optional int32 replicas = 1;
  731. // Minimum number of seconds for which a newly created pod should be ready
  732. // without any of its container crashing, for it to be considered available.
  733. // Defaults to 0 (pod will be considered available as soon as it is ready)
  734. // +optional
  735. optional int32 minReadySeconds = 4;
  736. // Selector is a label query over pods that should match the replica count.
  737. // If the selector is empty, it is defaulted to the labels present on the pod template.
  738. // Label keys and values that must match in order to be controlled by this replica set.
  739. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  740. // +optional
  741. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
  742. // Template is the object that describes the pod that will be created if
  743. // insufficient replicas are detected.
  744. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
  745. // +optional
  746. optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
  747. }
  748. // ReplicaSetStatus represents the current status of a ReplicaSet.
  749. message ReplicaSetStatus {
  750. // Replicas is the most recently observed number of replicas.
  751. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  752. optional int32 replicas = 1;
  753. // The number of pods that have labels matching the labels of the pod template of the replicaset.
  754. // +optional
  755. optional int32 fullyLabeledReplicas = 2;
  756. // The number of ready replicas for this replica set.
  757. // +optional
  758. optional int32 readyReplicas = 4;
  759. // The number of available replicas (ready for at least minReadySeconds) for this replica set.
  760. // +optional
  761. optional int32 availableReplicas = 5;
  762. // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
  763. // +optional
  764. optional int64 observedGeneration = 3;
  765. // Represents the latest available observations of a replica set's current state.
  766. // +optional
  767. // +patchMergeKey=type
  768. // +patchStrategy=merge
  769. repeated ReplicaSetCondition conditions = 6;
  770. }
  771. // DEPRECATED.
  772. message RollbackConfig {
  773. // The revision to rollback to. If set to 0, rollback to the last revision.
  774. // +optional
  775. optional int64 revision = 1;
  776. }
  777. // Spec to control the desired behavior of daemon set rolling update.
  778. message RollingUpdateDaemonSet {
  779. // The maximum number of DaemonSet pods that can be unavailable during the
  780. // update. Value can be an absolute number (ex: 5) or a percentage of total
  781. // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
  782. // number is calculated from percentage by rounding up.
  783. // This cannot be 0 if MaxSurge is 0
  784. // Default value is 1.
  785. // Example: when this is set to 30%, at most 30% of the total number of nodes
  786. // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
  787. // can have their pods stopped for an update at any given time. The update
  788. // starts by stopping at most 30% of those DaemonSet pods and then brings
  789. // up new DaemonSet pods in their place. Once the new pods are available,
  790. // it then proceeds onto other DaemonSet pods, thus ensuring that at least
  791. // 70% of original number of DaemonSet pods are available at all times during
  792. // the update.
  793. // +optional
  794. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
  795. // The maximum number of nodes with an existing available DaemonSet pod that
  796. // can have an updated DaemonSet pod during during an update.
  797. // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
  798. // This can not be 0 if MaxUnavailable is 0.
  799. // Absolute number is calculated from percentage by rounding up to a minimum of 1.
  800. // Default value is 0.
  801. // Example: when this is set to 30%, at most 30% of the total number of nodes
  802. // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
  803. // can have their a new pod created before the old pod is marked as deleted.
  804. // The update starts by launching new pods on 30% of nodes. Once an updated
  805. // pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
  806. // on that node is marked deleted. If the old pod becomes unavailable for any
  807. // reason (Ready transitions to false, is evicted, or is drained) an updated
  808. // pod is immediatedly created on that node without considering surge limits.
  809. // Allowing surge implies the possibility that the resources consumed by the
  810. // daemonset on any given node can double if the readiness check fails, and
  811. // so resource intensive daemonsets should take into account that they may
  812. // cause evictions during disruption.
  813. // This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.
  814. // +optional
  815. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
  816. }
  817. // Spec to control the desired behavior of rolling update.
  818. message RollingUpdateDeployment {
  819. // The maximum number of pods that can be unavailable during the update.
  820. // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
  821. // Absolute number is calculated from percentage by rounding down.
  822. // This can not be 0 if MaxSurge is 0.
  823. // By default, a fixed value of 1 is used.
  824. // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
  825. // immediately when the rolling update starts. Once new pods are ready, old RC
  826. // can be scaled down further, followed by scaling up the new RC, ensuring
  827. // that the total number of pods available at all times during the update is at
  828. // least 70% of desired pods.
  829. // +optional
  830. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
  831. // The maximum number of pods that can be scheduled above the desired number of
  832. // pods.
  833. // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
  834. // This can not be 0 if MaxUnavailable is 0.
  835. // Absolute number is calculated from percentage by rounding up.
  836. // By default, a value of 1 is used.
  837. // Example: when this is set to 30%, the new RC can be scaled up immediately when
  838. // the rolling update starts, such that the total number of old and new pods do not exceed
  839. // 130% of desired pods. Once old pods have been killed,
  840. // new RC can be scaled up further, ensuring that total number of pods running
  841. // at any time during the update is at most 130% of desired pods.
  842. // +optional
  843. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
  844. }
  845. // represents a scaling request for a resource.
  846. message Scale {
  847. // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
  848. // +optional
  849. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  850. // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
  851. // +optional
  852. optional ScaleSpec spec = 2;
  853. // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
  854. // +optional
  855. optional ScaleStatus status = 3;
  856. }
  857. // describes the attributes of a scale subresource
  858. message ScaleSpec {
  859. // desired number of instances for the scaled object.
  860. // +optional
  861. optional int32 replicas = 1;
  862. }
  863. // represents the current status of a scale subresource.
  864. message ScaleStatus {
  865. // actual number of observed instances of the scaled object.
  866. optional int32 replicas = 1;
  867. // selector is a label query over pods that should match the replicas count. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  868. // +optional
  869. // +mapType=atomic
  870. map<string, string> selector = 2;
  871. // label selector for pods that should match the replicas count. This is a serializated
  872. // version of both map-based and more expressive set-based selectors. This is done to
  873. // avoid introspection in the clients. The string will be in the same format as the
  874. // query-param syntax. If the target type only supports map-based selectors, both this
  875. // field and map-based selector field are populated.
  876. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  877. // +optional
  878. optional string targetSelector = 3;
  879. }