Skip to content

Commit

Permalink
set cpu entitlement
Browse files Browse the repository at this point in the history
  • Loading branch information
asalan316 committed Mar 21, 2024
1 parent e2109b9 commit 83b8acc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ci/infrastructure/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ jobs:
vars-files: autoscaler-env-vars-store
params:
SYSTEM_DOMAIN: autoscaler.app-runtime-interfaces.ci.cloudfoundry.org
OPS_FILES: "operations/cf/scale-to-one-az.yml operations/cf/experimental/add-cflinuxfs4.yml operations/autoscaler/scale_out_cf_for_app-autoscaler.yaml operations/cf/use-compiled-releases.yml operations/autoscaler/enable_mtls.yml operations/prometheus/operators/cf/add-prometheus-uaa-clients.yml operations/prometheus/operators/cf/add-grafana-uaa-clients.yml"
OPS_FILES: "operations/cf/scale-to-one-az.yml operations/cf/experimental/add-cflinuxfs4.yml operations/autoscaler/scale_out_cf_for_app-autoscaler.yaml operations/autoscaler/set-cpu-entitlement-per-share.yaml operations/cf/use-compiled-releases.yml operations/autoscaler/enable_mtls.yml operations/prometheus/operators/cf/add-prometheus-uaa-clients.yml operations/prometheus/operators/cf/add-grafana-uaa-clients.yml"
BOSH_DEPLOY_ARGS: "-v diego_cell_instances=3 -v grafana_redirect_uri=https://grafana.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org/login/generic_oauth"
ensure:
put: autoscaler-env-vars-store
Expand Down
3 changes: 3 additions & 0 deletions ci/operations/set-cpu-entitlement-per-share.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- type: replace
path: /instance_groups/name=diego-cell/jobs/name=garden/properties/garden/experimental_cpu_entitlement_per_share_in_percent?
value: 0.196
18 changes: 8 additions & 10 deletions src/acceptance/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ func GenerateDynamicScaleInPolicy(instanceMin, instanceMax int, metricName strin
}

func GenerateDynamicScaleOutAndInPolicy(instanceMin, instanceMax int, metricName string, minThreshold int64, maxThreshold int64) string {
scalingInRule := ScalingRule{
MetricType: metricName,
BreachDurationSeconds: TestBreachDurationSeconds,
Threshold: minThreshold,
Operator: "<",
CoolDownSeconds: TestCoolDownSeconds,
Adjustment: "-1",
}

scalingOutRule := ScalingRule{
MetricType: metricName,
BreachDurationSeconds: TestBreachDurationSeconds,
Expand All @@ -265,7 +256,14 @@ func GenerateDynamicScaleOutAndInPolicy(instanceMin, instanceMax int, metricName
CoolDownSeconds: TestCoolDownSeconds,
Adjustment: "+1",
}

scalingInRule := ScalingRule{
MetricType: metricName,
BreachDurationSeconds: TestBreachDurationSeconds,
Threshold: minThreshold,
Operator: "<",
CoolDownSeconds: TestCoolDownSeconds,
Adjustment: "-1",
}
policy := ScalingPolicy{
InstanceMin: instanceMin,
InstanceMax: instanceMax,
Expand Down

0 comments on commit 83b8acc

Please sign in to comment.