From ed9eb1e7325e7662b09b00831f9eb18cec57c73a Mon Sep 17 00:00:00 2001 From: Daria Danilenko Date: Tue, 11 Jul 2023 15:00:24 +0200 Subject: [PATCH] Rename signals to be more descriptive --- .../load-scheduling/average-latency/policy.libsonnet | 6 +++--- blueprints/load-scheduling/common/policy.libsonnet | 2 +- blueprints/load-scheduling/promql/policy.libsonnet | 2 +- .../assets/average-latency-feedback/graph.mmd | 4 ++-- .../assets/average-latency-feedback/graph.mmd.md5sum | 2 +- .../assets/average-latency-feedback/graph.mmd.svg | 2 +- .../assets/average-latency-feedback/policy.yaml | 8 ++++---- .../assets/workload-prioritization/graph.mmd | 4 ++-- .../assets/workload-prioritization/graph.mmd.md5sum | 2 +- .../assets/workload-prioritization/graph.mmd.svg | 2 +- .../assets/workload-prioritization/policy.yaml | 8 ++++---- .../auto-scaling/assets/load-based-auto-scaling/graph.mmd | 4 ++-- .../assets/load-based-auto-scaling/graph.mmd.md5sum | 2 +- .../assets/load-based-auto-scaling/graph.mmd.svg | 2 +- .../assets/load-based-auto-scaling/policy.yaml | 8 ++++---- .../config/samples/fluxninja.com_v1alpha1_policy.yaml | 8 ++++---- .../policies/basic-service-protection-cr.yaml | 8 ++++---- .../policies/weighted-service-protection-cr.yaml | 8 ++++---- .../graceful-js/policies/workload-prioritization-cr.yaml | 8 ++++---- .../policies/service-protection-cr.yaml | 8 ++++---- .../policies/prometheus-workload-prioritization-cr.yaml | 8 ++++---- .../service1-demoapp-rabbitmq-queue-buildup-cr.yaml | 4 ++-- .../policies/load-based-auto-scale-cr.yaml | 8 ++++---- .../policies/service1-demo-app-cr.yaml | 8 ++++---- .../policies/service1-demo-app-cr.yaml | 8 ++++---- .../policies/service1-demo-app-cr.yaml | 8 ++++---- .../policies/workload-prioritization-cr.yaml | 8 ++++---- 27 files changed, 75 insertions(+), 75 deletions(-) diff --git a/blueprints/load-scheduling/average-latency/policy.libsonnet b/blueprints/load-scheduling/average-latency/policy.libsonnet index afdf7904c0..1052c37fae 100644 --- a/blueprints/load-scheduling/average-latency/policy.libsonnet +++ b/blueprints/load-scheduling/average-latency/policy.libsonnet @@ -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( @@ -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') )), diff --git a/blueprints/load-scheduling/common/policy.libsonnet b/blueprints/load-scheduling/common/policy.libsonnet index 22ed8097ac..07538ea07d 100644 --- a/blueprints/load-scheduling/common/policy.libsonnet +++ b/blueprints/load-scheduling/common/policy.libsonnet @@ -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'), + signal: spec.v1.Port.withSignalName('LATENCY'), setpoint: spec.v1.Port.withSignalName('SETPOINT'), }) + spec.v1.AdaptiveLoadScheduler.withOutPorts({ diff --git a/blueprints/load-scheduling/promql/policy.libsonnet b/blueprints/load-scheduling/promql/policy.libsonnet index ca8747e3b1..c4d2ac259a 100644 --- a/blueprints/load-scheduling/promql/policy.libsonnet +++ b/blueprints/load-scheduling/promql/policy.libsonnet @@ -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( diff --git a/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd b/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd index f790ec2333..dfb363cbf6 100644 --- a/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd +++ b/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd @@ -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 diff --git a/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.md5sum b/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.md5sum index 8e25479897..6faffc671b 100644 --- a/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.md5sum +++ b/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.md5sum @@ -1 +1 @@ -e311ba63707ece221697cf5a77b8f738 +781b1c74e76acb36c9dcfeb8aba6bfee diff --git a/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.svg b/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.svg index 8cbd57c9fd..0b40605696 100644 --- a/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.svg +++ b/docs/content/use-cases/adaptive-service-protection/assets/average-latency-feedback/graph.mmd.svg @@ -1,4 +1,4 @@ -
ArithmeticCombinator
mul
PromQL
every 30s
PromQL
every 10s
AdaptiveLoadScheduler
1 selectors
SIGNAL
SIGNAL_LONG_TERM
SETPOINT
output
lhs
rhs
output
output
overload_confirmation
setpoint
signal
1.00
1.10