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
06b3fabb
Commit
06b3fabb
authored
Apr 29, 2021
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the TemplateConfig test for kubectl-type deployments.
parent
abcc1b5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
tmplcfg.yaml
test/e2e/tmplcfg/tmplcfg.yaml
+7
-8
varnish.yaml
test/e2e/tmplcfg/varnish.yaml
+9
-0
No files found.
test/e2e/tmplcfg/tmplcfg.yaml
View file @
06b3fabb
...
@@ -474,17 +474,17 @@ spec:
...
@@ -474,17 +474,17 @@ spec:
vk8s_cluster.reconfigure();
vk8s_cluster.reconfigure();
{{- digest_init . }}
{{- digest_init . }}
{{ if .PrimaryOnly -}}
{{ if .PrimaryOnly -}}
new vk8s_cluster_primary = taskvar.backend();
new vk8s_cluster_primary = taskvar.backend();
{{
- end
}}
{{- end }}
}
}
sub vcl_recv {
sub vcl_recv {
{{ if .PrimaryOnly -}}
{{ if .PrimaryOnly -}}
{{- digest_update 'c' . }}
{{- digest_update 'c' . }}
vk8s_cluster_primary.set(vk8s_cluster.backend(resolve=NOW
vk8s_cluster_primary.set(vk8s_cluster.backend(resolve=NOW
{{
- key 'c' .
}}
));
{{- key 'c' .}}));
if (remote.ip !~ vk8s_cluster_acl
if (remote.ip !~ vk8s_cluster_acl
&&
"
"
+ vk8s_cluster_primary.get() != server.identity) {
&& "" + vk8s_cluster_primary.get() != server.identity) {
set req.backend_hint = vk8s_cluster_primary.get();
set req.backend_hint = vk8s_cluster_primary.get();
return (pipe);
return (pipe);
}
}
...
@@ -546,10 +546,9 @@ spec:
...
@@ -546,10 +546,9 @@ spec:
}
}
sub vcl_deliver {
sub vcl_deliver {
set resp.http.Shard-Template = "override";
if (remote.ip ~ vk8s_cluster_acl
if (remote.ip ~ vk8s_cluster_acl
{{
- if .PrimaryOnly
}}
&&
!
vk8s_cluster_primary.defined()
{{- if .PrimaryOnly }} && ! vk8s_cluster_primary.defined()
{{
- end
}}
) {
{{- end }}) {
if (! obj.uncacheable) {
if (! obj.uncacheable) {
set resp.http.VK8S-Cluster-TTL = obj.ttl;
set resp.http.VK8S-Cluster-TTL = obj.ttl;
}
}
...
...
test/e2e/tmplcfg/varnish.yaml
View file @
06b3fabb
...
@@ -45,6 +45,15 @@ spec:
...
@@ -45,6 +45,15 @@ spec:
mountPath
:
"
/var/run/varnish-home"
mountPath
:
"
/var/run/varnish-home"
-
name
:
offload
-
name
:
offload
mountPath
:
"
/var/run/offload"
mountPath
:
"
/var/run/offload"
env
:
-
name
:
POD_NAMESPACE
valueFrom
:
fieldRef
:
fieldPath
:
metadata.namespace
-
name
:
POD_NAME
valueFrom
:
fieldRef
:
fieldPath
:
metadata.name
livenessProbe
:
livenessProbe
:
exec
:
exec
:
command
:
command
:
...
...
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