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