Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
159f919a
Commit
159f919a
authored
Jul 09, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Empty response bodies for readiness and configured checks.
Update comments and fix up whitespace while we're here.
parent
ba45234c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
boot.vcl
container/boot.vcl
+10
-4
notavailable.vcl
container/notavailable.vcl
+8
-2
ready.vcl
container/ready.vcl
+8
-2
No files found.
container/boot.vcl
View file @
159f919a
...
...
@@ -5,12 +5,18 @@ include "bogo_backend.vcl";
sub vcl_recv {
if (local.socket == "k8s") {
if (req.url == "/ready") {
return (synth(200));
return (synth(
65
200));
}
return (synth(404));
return (synth(
65
404));
}
if (local.socket == "vk8s_cfg") {
return (vcl(vk8s_readiness));
}
return (vcl(vk8s_regular));
}
sub vcl_synth {
if (resp.status == 65200 || resp.status == 65404) {
return (deliver);
}
}
container/notavailable.vcl
View file @
159f919a
...
...
@@ -3,7 +3,13 @@ vcl 4.1;
include "bogo_backend.vcl";
# Send a synthetic response with status 503 to every request.
# Used for the readiness check and regular traffic when Varnish is not ready.
# Used for the configured check and regular traffic when Varnish is
# not configured to implement an Ingress.
sub vcl_recv {
return(synth(503));
}
# Empty response body.
sub vcl_synth {
return (deliver);
}
container/ready.vcl
View file @
159f919a
...
...
@@ -3,7 +3,13 @@ vcl 4.1;
include "bogo_backend.vcl";
# Send a synthetic response with status 200 to every request.
# Used for the readiness check when Varnish is ready.
# Used for the configured check when Varnish is configured to implement
# an Ingress.
sub vcl_recv {
return(synth(200));
}
# Empty response body.
sub vcl_synth {
return (deliver);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment