Skip to content

Commit

Permalink
Add cpu weight config options (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimivel authored Feb 1, 2024
1 parent e58e075 commit 669a596
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,6 @@ statsd_port: <%= link("cloud_controller_internal").p("cc.statsd_port") %>

max_labels_per_resource: <%= link("cloud_controller_internal").p("cc.max_labels_per_resource") %>
max_annotations_per_resource: <%= link("cloud_controller_internal").p("cc.max_annotations_per_resource") %>
cpu_weight_min_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_min_memory") %>
cpu_weight_max_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_max_memory") %>
custom_metric_tag_prefix_list: <%= link("cloud_controller_internal").p("cc.custom_metric_tag_prefix_list") %>
Original file line number Diff line number Diff line change
Expand Up @@ -352,4 +352,6 @@ statsd_port: <%= link("cloud_controller_internal").p("cc.statsd_port") %>

max_labels_per_resource: <%= link("cloud_controller_internal").p("cc.max_labels_per_resource") %>
max_annotations_per_resource: <%= link("cloud_controller_internal").p("cc.max_annotations_per_resource") %>
cpu_weight_min_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_min_memory") %>
cpu_weight_max_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_max_memory") %>
custom_metric_tag_prefix_list: <%= link("cloud_controller_internal").p("cc.custom_metric_tag_prefix_list") %>
8 changes: 8 additions & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ provides:
- cc.buildpacks.webdav_config.private_endpoint
- cc.buildpacks.webdav_config.public_endpoint
- cc.buildpacks.webdav_config.username
- cc.cpu_weight_min_memory
- cc.cpu_weight_max_memory
- cc.credential_references.interpolate_service_bindings
- cc.custom_metric_tag_prefix_list
- cc.database_encryption.current_key_label
Expand Down Expand Up @@ -755,6 +757,12 @@ properties:
default: false
description: "Skip validations of database encryption properties"

cc.cpu_weight_min_memory:
default: 128
description: "The default minimum application instance memory used for the CPU weight calculation"
cc.cpu_weight_max_memory:
default: 8192
description: "The default maximum application instance memory used for the CPU weight calculation"
cc.default_app_memory:
default: 1024
description: "How much memory given to an app if not specified"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
priorities: <%= priorities.to_json %>
<% end %>

cpu_weight_min_memory: <%= p("cc.cpu_weight_min_memory") %>
cpu_weight_max_memory: <%= p("cc.cpu_weight_max_memory") %>
default_app_memory: <%= p("cc.default_app_memory") %>
default_app_disk_in_mb: <%= p("cc.default_app_disk_in_mb") %>
maximum_app_disk_in_mb: <%= p("cc.maximum_app_disk_in_mb") %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,6 @@ disable_private_domain_cross_space_context_path_route_sharing: <%= link("cloud_c
max_labels_per_resource: <%= link("cloud_controller_internal").p("cc.max_labels_per_resource") %>
max_annotations_per_resource: <%= link("cloud_controller_internal").p("cc.max_annotations_per_resource") %>
custom_metric_tag_prefix_list: <%= link("cloud_controller_internal").p("cc.custom_metric_tag_prefix_list") %>
cpu_weight_min_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_min_memory") %>
cpu_weight_max_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_max_memory") %>
max_manifest_service_binding_poll_duration_in_seconds: <%= p("cc.max_manifest_service_binding_poll_duration_in_seconds") %>
2 changes: 2 additions & 0 deletions spec/cloud_controller_clock/cloud_controller_clock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ module Test
'max_labels_per_resource' => true,
'max_annotations_per_resource' => 'yus',
'disable_private_domain_cross_space_context_path_route_sharing' => false,
'cpu_weight_min_memory' => 128,
'cpu_weight_max_memory' => 8192,
'custom_metric_tag_prefix_list' => ['heck.yes.example.com']
}
}
Expand Down
2 changes: 2 additions & 0 deletions spec/cloud_controller_worker/cloud_controller_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ module Test
'max_labels_per_resource' => true,
'max_annotations_per_resource' => 'yus',
'disable_private_domain_cross_space_context_path_route_sharing' => false,
'cpu_weight_min_memory' => 128,
'cpu_weight_max_memory' => 8192,
'custom_metric_tag_prefix_list' => ['heck.yes.example.com']
}
}
Expand Down

0 comments on commit 669a596

Please sign in to comment.