whitespace unification

git diff -b shows no difference
parent 056e7261
...@@ -45,8 +45,8 @@ import selector; ...@@ -45,8 +45,8 @@ import selector;
probe vk8s_probe_varnish { probe vk8s_probe_varnish {
.request = "HEAD /vk8s_cluster_health HTTP/1.1" .request = "HEAD /vk8s_cluster_health HTTP/1.1"
"Host: vk8s_cluster" "Host: vk8s_cluster"
"Connection: close"; "Connection: close";
{{- if .Probe }} {{- if .Probe }}
{{- if .Probe.Timeout}} {{- if .Probe.Timeout}}
.timeout = {{.Probe.Timeout}}; .timeout = {{.Probe.Timeout}};
...@@ -117,14 +117,14 @@ sub vcl_recv { ...@@ -117,14 +117,14 @@ sub vcl_recv {
if ( if (
{{- range $cidx, $cond := $rule.Conditions}} {{- range $cidx, $cond := $rule.Conditions}}
{{- if ne $cidx 0}} && {{- if ne $cidx 0}} &&
{{end}} {{end}}
{{- if .Negate}}! {{end}} {{- if .Negate}}! {{end}}
{{- if condNeedsMatcher $cond}} {{- if condNeedsMatcher $cond}}
{{- condMatcher $ridx $cidx}}.{{match .Compare}}({{.Comparand}}) {{- condMatcher $ridx $cidx}}.{{match .Compare}}({{.Comparand}})
{{- else if exists .Compare}} {{- else if exists .Compare}}
{{- .Comparand}} {{- .Comparand}}
{{- else}} {{- else}}
{{- .Comparand}} {{cmpRelation .Compare .Negate}} {{value $cond}} {{- .Comparand}} {{cmpRelation .Compare .Negate}} {{value $cond}}
{{- end}} {{- end}}
{{- end -}} {{- end -}}
) { ) {
...@@ -169,7 +169,7 @@ sub vcl_recv { ...@@ -169,7 +169,7 @@ sub vcl_recv {
} }
sub vk8s_cluster_fetch { sub vk8s_cluster_fetch {
if (bereq.retries > 0 if (bereq.retries > 0
|| bereq.uncacheable || bereq.uncacheable
|| remote.ip ~ vk8s_cluster_acl || remote.ip ~ vk8s_cluster_acl
|| "" + vk8s_cluster.backend(resolve=NOW) == server.identity) { || "" + vk8s_cluster.backend(resolve=NOW) == server.identity) {
...@@ -178,14 +178,14 @@ sub vk8s_cluster_fetch { ...@@ -178,14 +178,14 @@ sub vk8s_cluster_fetch {
{{ range $ridx, $rule := .Rules -}} {{ range $ridx, $rule := .Rules -}}
{{ ifElseIf $ridx (len $.Rules) $rule }} {{ ifElseIf $ridx (len $.Rules) $rule }}
{{ if not $rule.PrimaryOnly }} {{ if not $rule.PrimaryOnly }}
{{- range $cidx, $cond := $rule.Conditions}} {{- range $cidx, $cond := $rule.Conditions}}
{{- if .Negate}}! {{end}} {{- if .Negate}}! {{end}}
{{- if condNeedsMatcher $cond}} {{- if condNeedsMatcher $cond}}
{{- condMatcher $ridx $cidx}}.{{match .Compare}}({{ctx 'b' .Comparand}}) {{- condMatcher $ridx $cidx}}.{{match .Compare}}({{ctx 'b' .Comparand}})
{{- else if exists .Compare}} {{- else if exists .Compare}}
{{- ctx 'b' .Comparand}} {{- ctx 'b' .Comparand}}
{{- else}} {{- else}}
{{- ctx 'b' .Comparand}} {{cmpRelation .Compare .Negate}} {{value $cond}} {{- ctx 'b' .Comparand}} {{cmpRelation .Compare .Negate}} {{value $cond}}
{{- end}} {{- end}}
{{- end}} {{- end}}
{{ closeIf $rule }} {{ closeIf $rule }}
...@@ -216,15 +216,15 @@ sub vcl_backend_fetch { ...@@ -216,15 +216,15 @@ sub vcl_backend_fetch {
sub vcl_backend_response { sub vcl_backend_response {
if (bereq.backend == vk8s_cluster.backend(resolve=LAZY)) { if (bereq.backend == vk8s_cluster.backend(resolve=LAZY)) {
if (beresp.http.VK8S-Cluster-TTL) { if (beresp.http.VK8S-Cluster-TTL) {
set beresp.ttl = std.duration( set beresp.ttl = std.duration(
beresp.http.VK8S-Cluster-TTL + "s", 1s); beresp.http.VK8S-Cluster-TTL + "s", 1s);
if (beresp.ttl > {{.MaxSecondaryTTL}}) { if (beresp.ttl > {{.MaxSecondaryTTL}}) {
set beresp.ttl = {{.MaxSecondaryTTL}}; set beresp.ttl = {{.MaxSecondaryTTL}};
} }
unset beresp.http.VK8S-Cluster-TTL; unset beresp.http.VK8S-Cluster-TTL;
} }
else { else {
set beresp.uncacheable = true; set beresp.uncacheable = true;
} }
return (deliver); return (deliver);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment