Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename signals to be more descriptive #2359

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions blueprints/load-scheduling/average-latency/policy.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function(cfg, params={}, metadata={}) {
spec.v1.PromQL.new()
+ spec.v1.PromQL.withQueryString(q)
+ spec.v1.PromQL.withEvaluationInterval(evaluation_interval=updatedConfig.policy.evaluation_interval)
+ spec.v1.PromQL.withOutPorts({ output: spec.v1.Port.withSignalName('SIGNAL') }),
+ spec.v1.PromQL.withOutPorts({ output: spec.v1.Port.withSignalName('LATENCY') }),
),
),
spec.v1.Component.withQuery(
Expand All @@ -30,11 +30,11 @@ function(cfg, params={}, metadata={}) {
spec.v1.PromQL.new()
+ spec.v1.PromQL.withQueryString(q)
+ spec.v1.PromQL.withEvaluationInterval(evaluation_interval=updatedConfig.policy.latency_baseliner.long_term_query_periodic_interval)
+ spec.v1.PromQL.withOutPorts({ output: spec.v1.Port.withSignalName('SIGNAL_LONG_TERM') }),
+ spec.v1.PromQL.withOutPorts({ output: spec.v1.Port.withSignalName('LATENCY_LONG_TERM') }),
),
),
spec.v1.Component.withArithmeticCombinator(spec.v1.ArithmeticCombinator.mul(
spec.v1.Port.withSignalName('SIGNAL_LONG_TERM'),
spec.v1.Port.withSignalName('LATENCY_LONG_TERM'),
spec.v1.Port.withConstantSignal(updatedConfig.policy.latency_baseliner.latency_tolerance_multiplier),
output=spec.v1.Port.withSignalName('SETPOINT')
)),
Expand Down
2 changes: 1 addition & 1 deletion blueprints/load-scheduling/common/policy.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function(cfg, params={}, metadata={}) {
+ spec.v1.AdaptiveLoadScheduler.withDryRun(updatedConfig.policy.service_protection_core.dry_run)
+ spec.v1.AdaptiveLoadScheduler.withInPorts({
overload_confirmation: (if isConfirmationCriteria then spec.v1.Port.withSignalName('OVERLOAD_CONFIRMATION') else spec.v1.Port.withConstantSignal(1)),
signal: spec.v1.Port.withSignalName('SIGNAL'),
DariaKunoichi marked this conversation as resolved.
Show resolved Hide resolved
signal: spec.v1.Port.withSignalName('LATENCY'),
setpoint: spec.v1.Port.withSignalName('SETPOINT'),
})
+ spec.v1.AdaptiveLoadScheduler.withOutPorts({
Expand Down
2 changes: 1 addition & 1 deletion blueprints/load-scheduling/promql/policy.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function(cfg, params={}, metadata={}) {
spec.v1.PromQL.new()
+ spec.v1.PromQL.withQueryString(q)
+ spec.v1.PromQL.withEvaluationInterval(evaluation_interval=updatedConfig.policy.evaluation_interval)
+ spec.v1.PromQL.withOutPorts({ output: spec.v1.Port.withSignalName('SIGNAL') }),
+ spec.v1.PromQL.withOutPorts({ output: spec.v1.Port.withSignalName('LATENCY') }),
),
),
spec.v1.Component.withVariable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ end
end
root.3_rhs_FakeConstantout((1.10))
root.0_overload_confirmation_FakeConstantout --> root.0overload_confirmation
root.1output --> |SIGNAL| root.0signal
root.2output --> |SIGNAL_LONG_TERM| root.3lhs
root.1output --> |LATENCY| root.0signal
root.2output --> |LATENCY_LONG_TERM| root.3lhs
root.3output --> |SETPOINT| root.0setpoint
root.3_rhs_FakeConstantout --> root.3rhs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e311ba63707ece221697cf5a77b8f738
781b1c74e76acb36c9dcfeb8aba6bfee
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand All @@ -42,7 +42,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="basic-service-protection",
policy_name="basic-service-protection"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="basic-service-protection", policy_name="basic-service-protection"}[30s]))
Expand All @@ -51,14 +51,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="basic-service-protection",
policy_name="basic-service-protection"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="basic-service-protection", policy_name="basic-service-protection"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ end
end
root.3_rhs_FakeConstantout((1.10))
root.0_overload_confirmation_FakeConstantout --> root.0overload_confirmation
root.1output --> |SIGNAL| root.0signal
root.2output --> |SIGNAL_LONG_TERM| root.3lhs
root.1output --> |LATENCY| root.0signal
root.2output --> |LATENCY_LONG_TERM| root.3lhs
root.3output --> |SETPOINT| root.0setpoint
root.3_rhs_FakeConstantout --> root.3rhs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e311ba63707ece221697cf5a77b8f738
781b1c74e76acb36c9dcfeb8aba6bfee
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand Down Expand Up @@ -54,7 +54,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="workload-prioritization",
policy_name="workload-prioritization"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="workload-prioritization", policy_name="workload-prioritization"}[30s]))
Expand All @@ -63,14 +63,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="workload-prioritization",
policy_name="workload-prioritization"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="workload-prioritization", policy_name="workload-prioritization"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ root.4_rhs_FakeConstantout((1.10))
root.0desired_load_multiplier --> |DESIRED_LOAD_MULTIPLIER| root.1scale_out_signal_0
root.0_overload_confirmation_FakeConstantout --> root.0overload_confirmation
root.1_scale_out_setpoint_0_FakeConstantout --> root.1scale_out_setpoint_0
root.2output --> |SIGNAL| root.0signal
root.3output --> |SIGNAL_LONG_TERM| root.4lhs
root.2output --> |LATENCY| root.0signal
root.3output --> |LATENCY_LONG_TERM| root.4lhs
root.4output --> |SETPOINT| root.0setpoint
root.4_rhs_FakeConstantout --> root.4rhs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2cb998f587bf34c81902817719d3a495
7b680f4420ec3fdea371ed9eacf1240c
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand Down Expand Up @@ -82,7 +82,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="load-based-auto-scale",
policy_name="load-based-auto-scale"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="load-based-auto-scale", policy_name="load-based-auto-scale"}[30s]))
Expand All @@ -91,14 +91,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="load-based-auto-scale",
policy_name="load-based-auto-scale"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="load-based-auto-scale", policy_name="load-based-auto-scale"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
8 changes: 4 additions & 4 deletions operator/config/samples/fluxninja.com_v1alpha1_policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand All @@ -42,7 +42,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="basic-service-protection",
policy_name="basic-service-protection"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="basic-service-protection", policy_name="basic-service-protection"}[30s]))
Expand All @@ -51,14 +51,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="basic-service-protection",
policy_name="basic-service-protection"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="basic-service-protection", policy_name="basic-service-protection"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand All @@ -42,7 +42,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="basic-service-protection",
policy_name="basic-service-protection"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="basic-service-protection", policy_name="basic-service-protection"}[30s]))
Expand All @@ -51,14 +51,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="basic-service-protection",
policy_name="basic-service-protection"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="basic-service-protection", policy_name="basic-service-protection"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand Down Expand Up @@ -70,7 +70,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="weighted-service-protection",
policy_name="weighted-service-protection"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="weighted-service-protection", policy_name="weighted-service-protection"}[30s]))
Expand All @@ -79,14 +79,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="weighted-service-protection",
policy_name="weighted-service-protection"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="weighted-service-protection", policy_name="weighted-service-protection"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand Down Expand Up @@ -56,7 +56,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="workload-prioritization",
policy_name="workload-prioritization"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="workload-prioritization", policy_name="workload-prioritization"}[30s]))
Expand All @@ -65,14 +65,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="workload-prioritization",
policy_name="workload-prioritization"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="workload-prioritization", policy_name="workload-prioritization"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand Down Expand Up @@ -95,7 +95,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="service-protection",
policy_name="service-protection"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="service-protection", policy_name="service-protection"}[30s]))
Expand All @@ -104,14 +104,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="service-protection",
policy_name="service-protection"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="service-protection", policy_name="service-protection"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
setpoint:
signal_name: SETPOINT
signal:
signal_name: SIGNAL
signal_name: LATENCY
out_ports:
desired_load_multiplier:
signal_name: DESIRED_LOAD_MULTIPLIER
Expand Down Expand Up @@ -58,7 +58,7 @@ spec:
evaluation_interval: 10s
out_ports:
output:
signal_name: SIGNAL
signal_name: LATENCY
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="prometheus-workload-prioritization",
policy_name="prometheus-workload-prioritization"}[30s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="prometheus-workload-prioritization", policy_name="prometheus-workload-prioritization"}[30s]))
Expand All @@ -67,14 +67,14 @@ spec:
evaluation_interval: 30s
out_ports:
output:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
query_string: sum(increase(flux_meter_sum{flow_status="OK", flux_meter_name="prometheus-workload-prioritization",
policy_name="prometheus-workload-prioritization"}[1800s]))/sum(increase(flux_meter_count{flow_status="OK",
flux_meter_name="prometheus-workload-prioritization", policy_name="prometheus-workload-prioritization"}[1800s]))
- arithmetic_combinator:
in_ports:
lhs:
signal_name: SIGNAL_LONG_TERM
signal_name: LATENCY_LONG_TERM
rhs:
constant_signal:
value: 1.1
Expand Down
Loading