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
f0bea38c
Commit
f0bea38c
authored
Nov 21, 2018
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the chapter "Varnish as Ingress" to the front-page README.
parent
acab22f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
README.md
README.md
+44
-0
No files found.
README.md
View file @
f0bea38c
...
...
@@ -90,3 +90,47 @@ $ go get -d github.com/slimhazard/gogitversion
$ cd $GOPATH/src/github.com/slimhazard/gogitversion
$ make install
```
# Varnish as a Kubernetes Ingress
Since this project is currently in its early stages, the implementation of
Ingress definitions for a Varnish instance is subject to change as development
continues. Presently, an Ingress is realized by loading a
[
VCL
](
https://varnish-cache.org/docs/trunk/reference/vcl.html
)
configuration
that:
*
defines
[
directors
](
https://varnish-cache.org/docs/trunk/users-guide/vcl-backends.html#directors
)
that correspond to Services mentioned in the Ingress definition
*
This is currently hard-wired as the round-robin director.
*
defines
[
backends
](
https://varnish-cache.org/docs/trunk/users-guide/vcl-backends.html
)
corresponding to the Endpoints of the Services. These are assigned to the
director defined for the Service.
*
Endpoint definitions for a Service are obtained from an API query
when the VCL configuration is generated, so that the assignments
of Endpoints is current at VCL generation time.
*
The Varnish backend definitions currently only include the Endpoints'
IP addresses and ports. There is presently no means to define other
features of a backend, such as health checks and timeouts.
*
generates VCL code to implement the routing of requests to backends
based on the Host header and/or URL path according to the IngressRules
given in the Ingress definition.
*
Varnish may cache responses according to its default rules for
caching, and of course cache hits are delivered without routing the
requests further.
*
In case of a non-cache-hit (miss or pass), the Host header and/or
URL path is evaluated according to the IngressRules, and matching
requests are assigned to the director corresponding to the matched
Service.
*
The director in turn chooses a backend corresponding to an Endpoint
according to its load balancing algorithm (currently only round-robin).
*
If the request does not match any Service according to the
IngressRules, then:
*
If a default Backend (a Service) was defined in the IngressSpec,
then the request is assigned to the corresponding director.
*
Otherwise, a synthetic 404 Not Found response is generated by
Varnish.
*
If there is no valid Ingress definition (none has been defined
since the Varnish instance started, or the only valid definition
was deleted), then Varnish generates a synthetic 404 Not Found
response for every request.
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