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
7be8865c
Commit
7be8865c
authored
Oct 12, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix VCL errors in the template for primary-only self-sharding.
parent
b420e67a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
self-shard.tmpl
pkg/varnish/vcl/self-shard.tmpl
+3
-3
primaryonly_shard.golden
pkg/varnish/vcl/testdata/primaryonly_shard.golden
+3
-3
No files found.
pkg/varnish/vcl/self-shard.tmpl
View file @
7be8865c
...
...
@@ -52,7 +52,7 @@ sub vcl_recv {
if (remote.ip !~ vk8s_cluster_acl
&& "" + vk8s_cluster.backend(resolve=NOW) != server.identity) {
set req.http.VK8S-Shard-Primary-Only = "true";
set req.backend_hint = cluster.backend(resolve=NOW);
set req.backend_hint =
vk8s_
cluster.backend(resolve=NOW);
return (pass);
}
else {{ end }}if (remote.ip ~ vk8s_cluster_acl) {
...
...
@@ -77,7 +77,7 @@ sub vcl_recv {
{{ if .PrimaryOnly }}
sub vcl_pass {
if (req.http.VK8S-Shard-Primary-Only) {
return (
pass
);
return (
fetch
);
}
}
{{ end }}
...
...
@@ -127,7 +127,7 @@ sub vcl_backend_error {
sub vcl_deliver {
{{- if .PrimaryOnly }}
if (
be
req.http.VK8S-Shard-Primary-Only) {
if (req.http.VK8S-Shard-Primary-Only) {
return (deliver);
}
{{- end }}
...
...
pkg/varnish/vcl/testdata/primaryonly_shard.golden
View file @
7be8865c
...
...
@@ -50,7 +50,7 @@ sub vcl_recv {
if (remote.ip !~ vk8s_cluster_acl
&& "" + vk8s_cluster.backend(resolve=NOW) != server.identity) {
set req.http.VK8S-Shard-Primary-Only = "true";
set req.backend_hint = cluster.backend(resolve=NOW);
set req.backend_hint =
vk8s_
cluster.backend(resolve=NOW);
return (pass);
}
else if (remote.ip ~ vk8s_cluster_acl) {
...
...
@@ -75,7 +75,7 @@ sub vcl_recv {
sub vcl_pass {
if (req.http.VK8S-Shard-Primary-Only) {
return (
pass
);
return (
fetch
);
}
}
...
...
@@ -120,7 +120,7 @@ sub vcl_backend_error {
}
sub vcl_deliver {
if (
be
req.http.VK8S-Shard-Primary-Only) {
if (req.http.VK8S-Shard-Primary-Only) {
return (deliver);
}
unset resp.http.VK8S-Cluster-TTL;
...
...
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