Skip to content

Commit 07d9f4b

Browse files
authored
Implement RFC-0027: Add max_route_options_size BOSH property (#630)
* Implement RFC-0027: Add max_route_options_size BOSH property Adds the cc.max_route_options_size BOSH property (default: 1024 bytes) to control the maximum allowed size of route options JSON payloads. - Add cc.max_route_options_size property to cloud_controller_ng job spec - Expose property via cloud_controller_internal BOSH link - Map property into cloud_controller_ng.yml.erb for api job - Map property into cloud_controller_ng.yml.erb for worker job (via link) - Include git-sourced gem directories in cloud_controller_ng package spec * Add max_route_options_size to worker spec link fixture
1 parent ec31c38 commit 07d9f4b

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

jobs/cloud_controller_ng/spec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ provides:
149149
- cc.default_stack
150150
- cc.default_app_lifecycle
151151
- cc.disable_private_domain_cross_space_context_path_route_sharing
152+
- cc.max_route_options_size
152153
- cc.droplets.blobstore_provider
153154
- cc.droplets.blobstore_type
154155
- cc.droplets.cdn.key_pair_id
@@ -1143,6 +1144,10 @@ properties:
11431144
description: "Disallow route collisions over shared private domains when created in different spaces"
11441145
default: false
11451146

1147+
cc.max_route_options_size:
1148+
description: "Maximum size in bytes for the serialized route options JSON. Routes with options exceeding this limit will be rejected with HTTP 422 Unprocessable Entity. See RFC-0027 for details on tuning this alongside route emit interval."
1149+
default: 1024
1150+
11461151
cc.core_file_pattern:
11471152
description: "Filename template for core dump files. Use an empty string if you don't want core files saved."
11481153
default: "/var/vcap/sys/cores/core-%e-%s-%p-%t"

jobs/cloud_controller_ng/templates/cloud_controller_ng.yml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ custom_root_links.to_json
8686

8787
reserved_private_domains: <%= p("cc.reserved_private_domains", nil) %>
8888
disable_private_domain_cross_space_context_path_route_sharing: <%= p("cc.disable_private_domain_cross_space_context_path_route_sharing", false) %>
89+
max_route_options_size: <%= p("cc.max_route_options_size") %>
8990

9091
jobs:
9192
enable_dynamic_job_priorities: <%= p("cc.jobs.enable_dynamic_job_priorities") %>

jobs/cloud_controller_worker/templates/cloud_controller_ng.yml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ system_domain: <%= p("system_domain") %>
372372
system_hostnames: <%= link("cloud_controller_internal").p("cc.system_hostnames") %>
373373

374374
disable_private_domain_cross_space_context_path_route_sharing: <%= link("cloud_controller_internal").p("cc.disable_private_domain_cross_space_context_path_route_sharing") %>
375+
max_route_options_size: <%= link("cloud_controller_internal").p("cc.max_route_options_size") %>
375376

376377
max_service_credential_bindings_per_app_service_instance: <%= link("cloud_controller_internal").p("cc.max_service_credential_bindings_per_app_service_instance") %>
377378

spec/cloud_controller_worker/cloud_controller_worker_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module Test
7474
},
7575
'max_labels_per_resource' => true,
7676
'max_annotations_per_resource' => 'yus',
77+
'max_route_options_size' => 1024,
7778
'disable_private_domain_cross_space_context_path_route_sharing' => false,
7879
'cpu_weight_min_memory' => 128,
7980
'cpu_weight_max_memory' => 8192,

0 commit comments

Comments
 (0)