generated.proto 58 KB

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