Skip to content

Commit db449e4

Browse files
Joseph PalermoClay Kauzlaric
authored andcommitted
Bump src/code.cloudfoundry.org/gorouter
Bump Clay Kauzlaric: Add ability to disable hairpin routing to internal route services [finishes #164809856] Signed-off-by: Clay Kauzlaric <[email protected]>
1 parent a55a1f3 commit db449e4

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

jobs/gorouter/spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ properties:
136136
router.route_services_secret:
137137
description: "Support for route services is disabled when no value is configured. A robust passphrase is recommended."
138138
default: ""
139+
router.route_services_internal_lookup:
140+
description: "setting this property to true causes gorouter to bypass another trip through the load balancer when directing traffic to a route service that is a known route by the gorouter."
141+
default: false
139142
router.route_services_secret_decrypt_only:
140143
description: "To rotate keys, add your new key here and deploy. Then swap this key with the value of route_services_secret and deploy again."
141144
default: ""

jobs/gorouter/templates/gorouter.yml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ route_services_timeout: <%= p("router.route_services_timeout") %>s
171171
route_services_secret: <%= p("router.route_services_secret") %>
172172
route_services_secret_decrypt_only: <%= p("router.route_services_secret_decrypt_only") %>
173173
route_services_recommend_https: <%= p("router.route_services_recommend_https") %>
174+
route_services_hairpinning: <%= p("router.route_services_internal_lookup") %>
174175

175176
extra_headers_to_log: <%= p("router.extra_headers_to_log") %>
176177
token_fetcher_max_retries: 3

spec/gorouter.yml.erb.erb_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,22 @@
139139
end
140140
end
141141

142+
context 'route_services_internal_lookup' do
143+
it 'defaults to false' do
144+
expect(parsed_yaml['route_services_hairpinning']).to eq(false)
145+
end
146+
147+
context 'when enabled' do
148+
before do
149+
deployment_manifest_fragment['router']['route_services_internal_lookup'] = true
150+
end
151+
152+
it 'parses to true' do
153+
expect(parsed_yaml['route_services_hairpinning']).to eq(true)
154+
end
155+
end
156+
end
157+
142158
context 'tls_pem' do
143159
context 'when correct tls_pem is provided' do
144160
it 'should configure the property' do
@@ -177,6 +193,7 @@
177193
end
178194
end
179195
end
196+
180197
describe 'backends' do
181198
context 'when both cert_chain and private_key are provided' do
182199
it 'should configure the property' do

0 commit comments

Comments
 (0)