Skip to content

Commit

Permalink
Allow to configure read-header-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mariash committed Sep 9, 2024
1 parent 0ced0b0 commit ec03e98
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jobs/garden-windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ properties:
description: "An array of additional arguments which will be passed to the runtime plugin binary"
default: []

garden.read_header_timeout:
description: "The amount of time allowed to read request headers"
default: 30s

garden.image_plugin:
description: "Path to an image plugin binary"

Expand Down
1 change: 1 addition & 0 deletions jobs/garden-windows/templates/garden_ctl.ps1.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ C:\var\vcap\packages\guardian-windows\gdn.exe `
server `
--skip-setup `
--depot=$depotDir `
--read-header-timeout=<%= p("garden.read_header_timeout") %> `
--log-level=<%= p("garden.log_level") %> `
<% ip, port = p("garden.listen_address").split(":") %> `
--bind-ip=<%= ip %> `
Expand Down
4 changes: 4 additions & 0 deletions jobs/garden/spec
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ properties:
description: "Path to a runtime plugin binary"
default: /var/vcap/packages/runc/bin/runc

garden.read_header_timeout:
description: "The amount of time allowed to read request headers"
default: 30s

garden.no_image_plugin:
description: "If true, disables image plugin usage, thus ignoring other image plugin settings"
default: false
Expand Down
1 change: 1 addition & 0 deletions jobs/garden/templates/config/config.ini.erb
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ parse_ip(p('garden.network_pool'), 'garden.network_pool')
skip-setup = true
depot = /var/vcap/data/garden/depot
runtime-plugin=<%= p("garden.runtime_plugin") %>
read-header-timeout = <%= p("garden.read_header_timeout") %>

<% if p("garden.containerd_mode") -%>
; containerd
Expand Down
4 changes: 4 additions & 0 deletions spec/jobs/garden_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
expect(rendered_template['server']['runtime-plugin']).to eql('/var/vcap/packages/runc/bin/runc')
end

it 'sets the read header timeout to 30s' do
expect(rendered_template['server']['read-header-timeout']).to eql('30s')
end

it 'sets the max containers to 250' do
expect(rendered_template['server']['max-containers']).to eql(250)
end
Expand Down

0 comments on commit ec03e98

Please sign in to comment.