-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow_schema_spec.cr
41 lines (34 loc) · 3.01 KB
/
flow_schema_spec.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# FlowSchemaSpec describes how the FlowSchema's specification looks like.
@[::K8S::Properties(
distinguisher_method: {type: Api::Flowcontrol::V1beta1::FlowDistinguisherMethod, nilable: true, key: "distinguisherMethod", getter: false, setter: false},
matching_precedence: {type: Int32, nilable: true, key: "matchingPrecedence", getter: false, setter: false},
priority_level_configuration: {type: Api::Flowcontrol::V1beta1::PriorityLevelConfigurationReference, nilable: false, key: "priorityLevelConfiguration", getter: false, setter: false},
rules: {type: Array(Api::Flowcontrol::V1beta1::PolicyRulesWithSubjects), nilable: true, key: "rules", getter: false, setter: false},
)]
class Api::Flowcontrol::V1beta1::FlowSchemaSpec
include ::JSON::Serializable
include ::YAML::Serializable
# `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
@[::JSON::Field(key: "distinguisherMethod", emit_null: false)]
@[::YAML::Field(key: "distinguisherMethod", emit_null: false)]
property distinguisher_method : Api::Flowcontrol::V1beta1::FlowDistinguisherMethod | Nil
# `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.
@[::JSON::Field(key: "matchingPrecedence", emit_null: false)]
@[::YAML::Field(key: "matchingPrecedence", emit_null: false)]
property matching_precedence : Int32 | Nil
# `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.
@[::JSON::Field(key: "priorityLevelConfiguration", emit_null: true)]
@[::YAML::Field(key: "priorityLevelConfiguration", emit_null: true)]
property priority_level_configuration : Api::Flowcontrol::V1beta1::PriorityLevelConfigurationReference
# `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
@[::JSON::Field(key: "rules", emit_null: false)]
@[::YAML::Field(key: "rules", emit_null: false)]
property rules : Array(Api::Flowcontrol::V1beta1::PolicyRulesWithSubjects) | Nil
def initialize(*, @priority_level_configuration : Api::Flowcontrol::V1beta1::PriorityLevelConfigurationReference, @distinguisher_method : Api::Flowcontrol::V1beta1::FlowDistinguisherMethod | Nil = nil, @matching_precedence : Int32 | Nil = nil, @rules : Array | Nil = nil)
end
end
end