generated.proto 53 KB

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