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
0a9b45d8
Commit
0a9b45d8
authored
May 03, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: in VCL set the backend in the "grace-hit" case.
Otherwise no backend is set for background fetches.
parent
33d04ce3
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
4 deletions
+44
-4
rewrite_test.go
pkg/varnish/vcl/rewrite_test.go
+2
-4
backendcfg.golden
pkg/varnish/vcl/testdata/backendcfg.golden
+7
-0
custom_vcl.golden
pkg/varnish/vcl/testdata/custom_vcl.golden
+7
-0
ingress_shard.golden
pkg/varnish/vcl/testdata/ingress_shard.golden
+7
-0
ingressrule.golden
pkg/varnish/vcl/testdata/ingressrule.golden
+7
-0
rewrite_auth_delete.golden
pkg/varnish/vcl/testdata/rewrite_auth_delete.golden
+7
-0
vcl.tmpl
pkg/varnish/vcl/vcl.tmpl
+7
-0
No files found.
pkg/varnish/vcl/rewrite_test.go
View file @
0a9b45d8
...
...
@@ -733,10 +733,8 @@ func TestRewriteDeleteAuth(t *testing.T) {
t
.
Fatal
(
"WriteFile():"
,
err
)
}
if
!
bytes
.
Equal
(
goldbytes
,
[]
byte
(
src
))
{
t
.
Fatalf
(
"Generated VCL does not match gold file: %s"
,
gold
)
if
testing
.
Verbose
()
{
t
.
Logf
(
"Generated: %s"
,
src
)
}
t
.
Fatalf
(
"Generated VCL does not match gold file: %s
\n
%s"
,
gold
,
src
)
}
}
...
...
pkg/varnish/vcl/testdata/backendcfg.golden
View file @
0a9b45d8
...
...
@@ -182,3 +182,10 @@ sub vcl_pass {
sub vcl_pipe {
call vk8s_set_backend;
}
sub vcl_hit {
if (obj.ttl < 0s) {
# Set a backend for a background fetch.
call vk8s_set_backend;
}
}
pkg/varnish/vcl/testdata/custom_vcl.golden
View file @
0a9b45d8
...
...
@@ -92,6 +92,13 @@ sub vcl_pass {
sub vcl_pipe {
call vk8s_set_backend;
}
sub vcl_hit {
if (obj.ttl < 0s) {
# Set a backend for a background fetch.
call vk8s_set_backend;
}
}
sub vcl_deliver {
set resp.http.Hello = "world";
}
\ No newline at end of file
pkg/varnish/vcl/testdata/ingress_shard.golden
View file @
0a9b45d8
...
...
@@ -93,6 +93,13 @@ sub vcl_pipe {
call vk8s_set_backend;
}
sub vcl_hit {
if (obj.ttl < 0s) {
# Set a backend for a background fetch.
call vk8s_set_backend;
}
}
import std;
import directors;
...
...
pkg/varnish/vcl/testdata/ingressrule.golden
View file @
0a9b45d8
...
...
@@ -92,3 +92,10 @@ sub vcl_pass {
sub vcl_pipe {
call vk8s_set_backend;
}
sub vcl_hit {
if (obj.ttl < 0s) {
# Set a backend for a background fetch.
call vk8s_set_backend;
}
}
pkg/varnish/vcl/testdata/rewrite_auth_delete.golden
View file @
0a9b45d8
...
...
@@ -34,6 +34,13 @@ sub vcl_pipe {
call vk8s_set_backend;
}
sub vcl_hit {
if (obj.ttl < 0s) {
# Set a backend for a background fetch.
call vk8s_set_backend;
}
}
import re2;
sub vcl_init {
...
...
pkg/varnish/vcl/vcl.tmpl
View file @
0a9b45d8
...
...
@@ -158,3 +158,10 @@ sub vcl_pass {
sub vcl_pipe {
call vk8s_set_backend;
}
sub vcl_hit {
if (obj.ttl < 0s) {
# Set a backend for a background fetch.
call vk8s_set_backend;
}
}
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