k8s_pb/api/flowcontrol/v1beta3/mod.rs
1// This file is @generated by prost-build.
2/// ExemptPriorityLevelConfiguration describes the configurable aspects
3/// of the handling of exempt requests.
4/// In the mandatory exempt configuration object the values in the fields
5/// here can be modified by authorized users, unlike the rest of the `spec`.
6#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
7pub struct ExemptPriorityLevelConfiguration {
8 /// `nominalConcurrencyShares` (NCS) contributes to the computation of the
9 /// NominalConcurrencyLimit (NominalCL) of this level.
10 /// This is the number of execution seats nominally reserved for this priority level.
11 /// This DOES NOT limit the dispatching from this priority level
12 /// but affects the other priority levels through the borrowing mechanism.
13 /// The server's concurrency limit (ServerCL) is divided among all the
14 /// priority levels in proportion to their NCS values:
15 ///
16 /// NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs )
17 /// sum_ncs = sum\[priority level k\] NCS(k)
18 ///
19 /// Bigger numbers mean a larger nominal concurrency limit,
20 /// at the expense of every other priority level.
21 /// This field has a default value of zero.
22 /// +optional
23 #[prost(int32, optional, tag = "1")]
24 pub nominal_concurrency_shares: ::core::option::Option<i32>,
25 /// `lendablePercent` prescribes the fraction of the level's NominalCL that
26 /// can be borrowed by other priority levels. This value of this
27 /// field must be between 0 and 100, inclusive, and it defaults to 0.
28 /// The number of seats that other levels can borrow from this level, known
29 /// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
30 ///
31 /// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
32 ///
33 /// +optional
34 #[prost(int32, optional, tag = "2")]
35 pub lendable_percent: ::core::option::Option<i32>,
36}
37/// FlowDistinguisherMethod specifies the method of a flow distinguisher.
38#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
39pub struct FlowDistinguisherMethod {
40 /// `type` is the type of flow distinguisher method
41 /// The supported types are "ByUser" and "ByNamespace".
42 /// Required.
43 #[prost(string, optional, tag = "1")]
44 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
45}
46/// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with
47/// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher".
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct FlowSchema {
50 /// `metadata` is the standard object's metadata.
51 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
52 /// +optional
53 #[prost(message, optional, tag = "1")]
54 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
55 /// `spec` is the specification of the desired behavior of a FlowSchema.
56 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
57 /// +optional
58 #[prost(message, optional, tag = "2")]
59 pub spec: ::core::option::Option<FlowSchemaSpec>,
60 /// `status` is the current status of a FlowSchema.
61 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
62 /// +optional
63 #[prost(message, optional, tag = "3")]
64 pub status: ::core::option::Option<FlowSchemaStatus>,
65}
66/// FlowSchemaCondition describes conditions for a FlowSchema.
67#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
68pub struct FlowSchemaCondition {
69 /// `type` is the type of the condition.
70 /// Required.
71 #[prost(string, optional, tag = "1")]
72 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
73 /// `status` is the status of the condition.
74 /// Can be True, False, Unknown.
75 /// Required.
76 #[prost(string, optional, tag = "2")]
77 pub status: ::core::option::Option<::prost::alloc::string::String>,
78 /// `lastTransitionTime` is the last time the condition transitioned from one status to another.
79 #[prost(message, optional, tag = "3")]
80 pub last_transition_time:
81 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
82 /// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
83 #[prost(string, optional, tag = "4")]
84 pub reason: ::core::option::Option<::prost::alloc::string::String>,
85 /// `message` is a human-readable message indicating details about last transition.
86 #[prost(string, optional, tag = "5")]
87 pub message: ::core::option::Option<::prost::alloc::string::String>,
88}
89/// FlowSchemaList is a list of FlowSchema objects.
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct FlowSchemaList {
92 /// `metadata` is the standard list metadata.
93 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
94 /// +optional
95 #[prost(message, optional, tag = "1")]
96 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
97 /// `items` is a list of FlowSchemas.
98 #[prost(message, repeated, tag = "2")]
99 pub items: ::prost::alloc::vec::Vec<FlowSchema>,
100}
101/// FlowSchemaSpec describes how the FlowSchema's specification looks like.
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct FlowSchemaSpec {
104 /// `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot
105 /// be resolved, the FlowSchema will be ignored and marked as invalid in its status.
106 /// Required.
107 #[prost(message, optional, tag = "1")]
108 pub priority_level_configuration: ::core::option::Option<PriorityLevelConfigurationReference>,
109 /// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen
110 /// FlowSchema is among those with the numerically lowest (which we take to be logically highest)
111 /// MatchingPrecedence. Each MatchingPrecedence value must be ranged in \[1,10000\].
112 /// Note that if the precedence is not specified, it will be set to 1000 as default.
113 /// +optional
114 #[prost(int32, optional, tag = "2")]
115 pub matching_precedence: ::core::option::Option<i32>,
116 /// `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema.
117 /// `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
118 /// +optional
119 #[prost(message, optional, tag = "3")]
120 pub distinguisher_method: ::core::option::Option<FlowDistinguisherMethod>,
121 /// `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if
122 /// at least one member of rules matches the request.
123 /// if it is an empty slice, there will be no requests matching the FlowSchema.
124 /// +listType=atomic
125 /// +optional
126 #[prost(message, repeated, tag = "4")]
127 pub rules: ::prost::alloc::vec::Vec<PolicyRulesWithSubjects>,
128}
129/// FlowSchemaStatus represents the current state of a FlowSchema.
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct FlowSchemaStatus {
132 /// `conditions` is a list of the current states of FlowSchema.
133 /// +listType=map
134 /// +listMapKey=type
135 /// +patchMergeKey=type
136 /// +patchStrategy=merge
137 /// +optional
138 #[prost(message, repeated, tag = "1")]
139 pub conditions: ::prost::alloc::vec::Vec<FlowSchemaCondition>,
140}
141/// GroupSubject holds detailed information for group-kind subject.
142#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
143pub struct GroupSubject {
144 /// name is the user group that matches, or "*" to match all user groups.
145 /// See <https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go> for some
146 /// well-known group names.
147 /// Required.
148 #[prost(string, optional, tag = "1")]
149 pub name: ::core::option::Option<::prost::alloc::string::String>,
150}
151/// LimitResponse defines how to handle requests that can not be executed right now.
152/// +union
153#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
154pub struct LimitResponse {
155 /// `type` is "Queue" or "Reject".
156 /// "Queue" means that requests that can not be executed upon arrival
157 /// are held in a queue until they can be executed or a queuing limit
158 /// is reached.
159 /// "Reject" means that requests that can not be executed upon arrival
160 /// are rejected.
161 /// Required.
162 /// +unionDiscriminator
163 #[prost(string, optional, tag = "1")]
164 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
165 /// `queuing` holds the configuration parameters for queuing.
166 /// This field may be non-empty only if `type` is `"Queue"`.
167 /// +optional
168 #[prost(message, optional, tag = "2")]
169 pub queuing: ::core::option::Option<QueuingConfiguration>,
170}
171/// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits.
172/// It addresses two issues:
173/// - How are requests for this priority level limited?
174/// - What should be done with requests that exceed the limit?
175#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
176pub struct LimitedPriorityLevelConfiguration {
177 /// `nominalConcurrencyShares` (NCS) contributes to the computation of the
178 /// NominalConcurrencyLimit (NominalCL) of this level.
179 /// This is the number of execution seats available at this priority level.
180 /// This is used both for requests dispatched from this priority level
181 /// as well as requests dispatched from other priority levels
182 /// borrowing seats from this level.
183 /// The server's concurrency limit (ServerCL) is divided among the
184 /// Limited priority levels in proportion to their NCS values:
185 ///
186 /// NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs )
187 /// sum_ncs = sum\[priority level k\] NCS(k)
188 ///
189 /// Bigger numbers mean a larger nominal concurrency limit,
190 /// at the expense of every other priority level.
191 /// This field has a default value of 30.
192 /// +optional
193 #[prost(int32, optional, tag = "1")]
194 pub nominal_concurrency_shares: ::core::option::Option<i32>,
195 /// `limitResponse` indicates what to do with requests that can not be executed right now
196 #[prost(message, optional, tag = "2")]
197 pub limit_response: ::core::option::Option<LimitResponse>,
198 /// `lendablePercent` prescribes the fraction of the level's NominalCL that
199 /// can be borrowed by other priority levels. The value of this
200 /// field must be between 0 and 100, inclusive, and it defaults to 0.
201 /// The number of seats that other levels can borrow from this level, known
202 /// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
203 ///
204 /// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
205 ///
206 /// +optional
207 #[prost(int32, optional, tag = "3")]
208 pub lendable_percent: ::core::option::Option<i32>,
209 /// `borrowingLimitPercent`, if present, configures a limit on how many
210 /// seats this priority level can borrow from other priority levels.
211 /// The limit is known as this level's BorrowingConcurrencyLimit
212 /// (BorrowingCL) and is a limit on the total number of seats that this
213 /// level may borrow at any one time.
214 /// This field holds the ratio of that limit to the level's nominal
215 /// concurrency limit. When this field is non-nil, it must hold a
216 /// non-negative integer and the limit is calculated as follows.
217 ///
218 /// BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
219 ///
220 /// The value of this field can be more than 100, implying that this
221 /// priority level can borrow a number of seats that is greater than
222 /// its own nominal concurrency limit (NominalCL).
223 /// When this field is left `nil`, the limit is effectively infinite.
224 /// +optional
225 #[prost(int32, optional, tag = "4")]
226 pub borrowing_limit_percent: ::core::option::Option<i32>,
227}
228/// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the
229/// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member
230/// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
231#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
232pub struct NonResourcePolicyRule {
233 /// `verbs` is a list of matching verbs and may not be empty.
234 /// "*" matches all verbs. If it is present, it must be the only entry.
235 /// +listType=set
236 /// Required.
237 #[prost(string, repeated, tag = "1")]
238 pub verbs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
239 /// `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty.
240 /// For example:
241 /// - "/healthz" is legal
242 /// - "/hea*" is illegal
243 /// - "/hea" is legal but matches nothing
244 /// - "/hea/*" also matches nothing
245 /// - "/healthz/*" matches all per-component health checks.
246 /// "*" matches all non-resource urls. if it is present, it must be the only entry.
247 /// +listType=set
248 /// Required.
249 #[prost(string, repeated, tag = "6")]
250 pub non_resource_ur_ls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
251}
252/// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject
253/// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches
254/// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member
255/// of resourceRules or nonResourceRules matches the request.
256#[derive(Clone, PartialEq, ::prost::Message)]
257pub struct PolicyRulesWithSubjects {
258 /// subjects is the list of normal user, serviceaccount, or group that this rule cares about.
259 /// There must be at least one member in this slice.
260 /// A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request.
261 /// +listType=atomic
262 /// Required.
263 #[prost(message, repeated, tag = "1")]
264 pub subjects: ::prost::alloc::vec::Vec<Subject>,
265 /// `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the
266 /// target resource.
267 /// At least one of `resourceRules` and `nonResourceRules` has to be non-empty.
268 /// +listType=atomic
269 /// +optional
270 #[prost(message, repeated, tag = "2")]
271 pub resource_rules: ::prost::alloc::vec::Vec<ResourcePolicyRule>,
272 /// `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb
273 /// and the target non-resource URL.
274 /// +listType=atomic
275 /// +optional
276 #[prost(message, repeated, tag = "3")]
277 pub non_resource_rules: ::prost::alloc::vec::Vec<NonResourcePolicyRule>,
278}
279/// PriorityLevelConfiguration represents the configuration of a priority level.
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct PriorityLevelConfiguration {
282 /// `metadata` is the standard object's metadata.
283 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
284 /// +optional
285 #[prost(message, optional, tag = "1")]
286 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
287 /// `spec` is the specification of the desired behavior of a "request-priority".
288 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
289 /// +optional
290 #[prost(message, optional, tag = "2")]
291 pub spec: ::core::option::Option<PriorityLevelConfigurationSpec>,
292 /// `status` is the current status of a "request-priority".
293 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
294 /// +optional
295 #[prost(message, optional, tag = "3")]
296 pub status: ::core::option::Option<PriorityLevelConfigurationStatus>,
297}
298/// PriorityLevelConfigurationCondition defines the condition of priority level.
299#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
300pub struct PriorityLevelConfigurationCondition {
301 /// `type` is the type of the condition.
302 /// Required.
303 #[prost(string, optional, tag = "1")]
304 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
305 /// `status` is the status of the condition.
306 /// Can be True, False, Unknown.
307 /// Required.
308 #[prost(string, optional, tag = "2")]
309 pub status: ::core::option::Option<::prost::alloc::string::String>,
310 /// `lastTransitionTime` is the last time the condition transitioned from one status to another.
311 #[prost(message, optional, tag = "3")]
312 pub last_transition_time:
313 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
314 /// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
315 #[prost(string, optional, tag = "4")]
316 pub reason: ::core::option::Option<::prost::alloc::string::String>,
317 /// `message` is a human-readable message indicating details about last transition.
318 #[prost(string, optional, tag = "5")]
319 pub message: ::core::option::Option<::prost::alloc::string::String>,
320}
321/// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
322#[derive(Clone, PartialEq, ::prost::Message)]
323pub struct PriorityLevelConfigurationList {
324 /// `metadata` is the standard object's metadata.
325 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
326 /// +optional
327 #[prost(message, optional, tag = "1")]
328 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
329 /// `items` is a list of request-priorities.
330 #[prost(message, repeated, tag = "2")]
331 pub items: ::prost::alloc::vec::Vec<PriorityLevelConfiguration>,
332}
333/// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used.
334#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
335pub struct PriorityLevelConfigurationReference {
336 /// `name` is the name of the priority level configuration being referenced
337 /// Required.
338 #[prost(string, optional, tag = "1")]
339 pub name: ::core::option::Option<::prost::alloc::string::String>,
340}
341/// PriorityLevelConfigurationSpec specifies the configuration of a priority level.
342/// +union
343#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
344pub struct PriorityLevelConfigurationSpec {
345 /// `type` indicates whether this priority level is subject to
346 /// limitation on request execution. A value of `"Exempt"` means
347 /// that requests of this priority level are not subject to a limit
348 /// (and thus are never queued) and do not detract from the
349 /// capacity made available to other priority levels. A value of
350 /// `"Limited"` means that (a) requests of this priority level
351 /// _are_ subject to limits and (b) some of the server's limited
352 /// capacity is made available exclusively to this priority level.
353 /// Required.
354 /// +unionDiscriminator
355 #[prost(string, optional, tag = "1")]
356 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
357 /// `limited` specifies how requests are handled for a Limited priority level.
358 /// This field must be non-empty if and only if `type` is `"Limited"`.
359 /// +optional
360 #[prost(message, optional, tag = "2")]
361 pub limited: ::core::option::Option<LimitedPriorityLevelConfiguration>,
362 /// `exempt` specifies how requests are handled for an exempt priority level.
363 /// This field MUST be empty if `type` is `"Limited"`.
364 /// This field MAY be non-empty if `type` is `"Exempt"`.
365 /// If empty and `type` is `"Exempt"` then the default values
366 /// for `ExemptPriorityLevelConfiguration` apply.
367 /// +optional
368 #[prost(message, optional, tag = "3")]
369 pub exempt: ::core::option::Option<ExemptPriorityLevelConfiguration>,
370}
371/// PriorityLevelConfigurationStatus represents the current state of a "request-priority".
372#[derive(Clone, PartialEq, ::prost::Message)]
373pub struct PriorityLevelConfigurationStatus {
374 /// `conditions` is the current state of "request-priority".
375 /// +listType=map
376 /// +listMapKey=type
377 /// +patchMergeKey=type
378 /// +patchStrategy=merge
379 /// +optional
380 #[prost(message, repeated, tag = "1")]
381 pub conditions: ::prost::alloc::vec::Vec<PriorityLevelConfigurationCondition>,
382}
383/// QueuingConfiguration holds the configuration parameters for queuing
384#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
385pub struct QueuingConfiguration {
386 /// `queues` is the number of queues for this priority level. The
387 /// queues exist independently at each apiserver. The value must be
388 /// positive. Setting it to 1 effectively precludes
389 /// shufflesharding and thus makes the distinguisher method of
390 /// associated flow schemas irrelevant. This field has a default
391 /// value of 64.
392 /// +optional
393 #[prost(int32, optional, tag = "1")]
394 pub queues: ::core::option::Option<i32>,
395 /// `handSize` is a small positive number that configures the
396 /// shuffle sharding of requests into queues. When enqueuing a request
397 /// at this priority level the request's flow identifier (a string
398 /// pair) is hashed and the hash value is used to shuffle the list
399 /// of queues and deal a hand of the size specified here. The
400 /// request is put into one of the shortest queues in that hand.
401 /// `handSize` must be no larger than `queues`, and should be
402 /// significantly smaller (so that a few heavy flows do not
403 /// saturate most of the queues). See the user-facing
404 /// documentation for more extensive guidance on setting this
405 /// field. This field has a default value of 8.
406 /// +optional
407 #[prost(int32, optional, tag = "2")]
408 pub hand_size: ::core::option::Option<i32>,
409 /// `queueLengthLimit` is the maximum number of requests allowed to
410 /// be waiting in a given queue of this priority level at a time;
411 /// excess requests are rejected. This value must be positive. If
412 /// not specified, it will be defaulted to 50.
413 /// +optional
414 #[prost(int32, optional, tag = "3")]
415 pub queue_length_limit: ::core::option::Option<i32>,
416}
417/// ResourcePolicyRule is a predicate that matches some resource
418/// requests, testing the request's verb and the target resource. A
419/// ResourcePolicyRule matches a resource request if and only if: (a)
420/// at least one member of verbs matches the request, (b) at least one
421/// member of apiGroups matches the request, (c) at least one member of
422/// resources matches the request, and (d) either (d1) the request does
423/// not specify a namespace (i.e., `Namespace==""`) and clusterScope is
424/// true or (d2) the request specifies a namespace and least one member
425/// of namespaces matches the request's namespace.
426#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
427pub struct ResourcePolicyRule {
428 /// `verbs` is a list of matching verbs and may not be empty.
429 /// "*" matches all verbs and, if present, must be the only entry.
430 /// +listType=set
431 /// Required.
432 #[prost(string, repeated, tag = "1")]
433 pub verbs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
434 /// `apiGroups` is a list of matching API groups and may not be empty.
435 /// "*" matches all API groups and, if present, must be the only entry.
436 /// +listType=set
437 /// Required.
438 #[prost(string, repeated, tag = "2")]
439 pub api_groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
440 /// `resources` is a list of matching resources (i.e., lowercase
441 /// and plural) with, if desired, subresource. For example, [
442 /// "services", "nodes/status" ]. This list may not be empty.
443 /// "*" matches all resources and, if present, must be the only entry.
444 /// Required.
445 /// +listType=set
446 #[prost(string, repeated, tag = "3")]
447 pub resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
448 /// `clusterScope` indicates whether to match requests that do not
449 /// specify a namespace (which happens either because the resource
450 /// is not namespaced or the request targets all namespaces).
451 /// If this field is omitted or false then the `namespaces` field
452 /// must contain a non-empty list.
453 /// +optional
454 #[prost(bool, optional, tag = "4")]
455 pub cluster_scope: ::core::option::Option<bool>,
456 /// `namespaces` is a list of target namespaces that restricts
457 /// matches. A request that specifies a target namespace matches
458 /// only if either (a) this list contains that target namespace or
459 /// (b) this list contains "*". Note that "*" matches any
460 /// specified namespace but does not match a request that _does
461 /// not specify_ a namespace (see the `clusterScope` field for
462 /// that).
463 /// This list may be empty, but only if `clusterScope` is true.
464 /// +optional
465 /// +listType=set
466 #[prost(string, repeated, tag = "5")]
467 pub namespaces: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
468}
469/// ServiceAccountSubject holds detailed information for service-account-kind subject.
470#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
471pub struct ServiceAccountSubject {
472 /// `namespace` is the namespace of matching ServiceAccount objects.
473 /// Required.
474 #[prost(string, optional, tag = "1")]
475 pub namespace: ::core::option::Option<::prost::alloc::string::String>,
476 /// `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name.
477 /// Required.
478 #[prost(string, optional, tag = "2")]
479 pub name: ::core::option::Option<::prost::alloc::string::String>,
480}
481/// Subject matches the originator of a request, as identified by the request authentication system. There are three
482/// ways of matching an originator; by user, group, or service account.
483/// +union
484#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
485pub struct Subject {
486 /// `kind` indicates which one of the other fields is non-empty.
487 /// Required
488 /// +unionDiscriminator
489 #[prost(string, optional, tag = "1")]
490 pub kind: ::core::option::Option<::prost::alloc::string::String>,
491 /// `user` matches based on username.
492 /// +optional
493 #[prost(message, optional, tag = "2")]
494 pub user: ::core::option::Option<UserSubject>,
495 /// `group` matches based on user group name.
496 /// +optional
497 #[prost(message, optional, tag = "3")]
498 pub group: ::core::option::Option<GroupSubject>,
499 /// `serviceAccount` matches ServiceAccounts.
500 /// +optional
501 #[prost(message, optional, tag = "4")]
502 pub service_account: ::core::option::Option<ServiceAccountSubject>,
503}
504/// UserSubject holds detailed information for user-kind subject.
505#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
506pub struct UserSubject {
507 /// `name` is the username that matches, or "*" to match all usernames.
508 /// Required.
509 #[prost(string, optional, tag = "1")]
510 pub name: ::core::option::Option<::prost::alloc::string::String>,
511}