Skip to content

Commit

Permalink
Add classifier index to classifier ID
Browse files Browse the repository at this point in the history
  • Loading branch information
IridiumOxide committed Sep 8, 2022
1 parent 73b62ed commit 13ecedd
Show file tree
Hide file tree
Showing 20 changed files with 432 additions and 250 deletions.
1 change: 1 addition & 0 deletions api/aperture/flowcontrol/v1/flowcontrol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ message FluxMeter {
message Classifier {
string policy_name = 1;
string policy_hash = 2;
int64 classifier_index = 3;
}
2 changes: 2 additions & 0 deletions api/aperture/policy/wrappers/v1/policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ message ClassifierWrapper {
string policy_name = 2;
// Hash of the entire Policy spec.
string policy_hash = 3;
// Index of the classifier within Policy.
int64 classifier_index = 4;
}

message ConcurrencyLimiterWrapper {
Expand Down
45 changes: 12 additions & 33 deletions api/gen/openapiv2/aperture.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,13 @@ definitions:
[flow labels](/concepts/flow-control/label/label.md).
workload:
$ref: '#/definitions/SchedulerWorkload'
description: Workload associated with requests matching the label matcher.
description: Workload associated with flows matching the label matcher.
apertureflowcontrolv1Classifier:
type: object
properties:
classifier_index:
type: string
format: int64
policy_hash:
type: string
policy_name:
Expand Down Expand Up @@ -366,11 +369,18 @@ definitions:
type: object
additionalProperties:
$ref: '#/definitions/v1Rule'
description: A map of {key, value} pairs mapping from flow label names to rules that define how to extract and propagate them.
description: |-
A map of {key, value} pairs mapping from
[flow label](/concepts/flow-control/label/label.md) keys to rules that define
how to extract and propagate flow labels with that key.
selector:
$ref: '#/definitions/v1Selector'
description: Defines where to apply the flow classification rule.
description: |-
:::info
See also [Classifier overview](/concepts/flow-control/label/classifier.md).
:::
Example:
```yaml
selector:
Expand Down Expand Up @@ -687,37 +697,6 @@ definitions:
docs on how exactly it handles invalid inputs.
:::
title: Circuit is defined as a dataflow graph of inter-connected components
v1Classifier:
type: object
properties:
rules:
type: object
additionalProperties:
$ref: '#/definitions/v1Rule'
description: |-
A map of {key, value} pairs mapping from
[flow label](/concepts/flow-control/label/label.md) keys to rules that define
how to extract and propagate flow labels with that key.
selector:
$ref: '#/definitions/v1Selector'
description: Defines where to apply the flow classification rule.
description: |-
:::info
See also [Classifier overview](/concepts/flow-control/label/classifier.md).
:::
Example:
```yaml
selector:
service: service1.default.svc.cluster.local
control_point:
traffic: ingress
rules:
user:
extractor:
from: request.http.headers.user
```
title: Set of classification rules sharing a common selector
v1Component:
type: object
properties:
Expand Down
79 changes: 45 additions & 34 deletions api/gen/proto/go/aperture/flowcontrol/v1/flowcontrol.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 13ecedd

Please sign in to comment.