Kubernetes Ingress Controller based on Varnish NOTE: WORK IN PROGRESS
Find a file
2025-10-23 15:51:00 +02:00
charts Bump chart versions to 0.5.3 2025-09-12 13:28:58 +02:00
cmd test M2M: Stabilize, hopefully 2025-10-21 13:55:31 +02:00
container klarlack containers: add slash 2025-10-11 13:04:14 +02:00
deploy Drop use of temporary variable 2025-07-23 14:14:23 +02:00
docs vcl/tmpl: make cluster backends available to custom vcl 2025-08-30 19:13:53 +02:00
examples Add missing argument to wait_until_configured 2025-09-04 17:08:03 +02:00
hack Restart registry container on Docker engine restart or failure 2025-07-30 17:41:48 +02:00
pkg controller/varnish: Load VCL from monitor goroutine 2025-10-23 15:25:02 +02:00
test tests: try to stabilize port forwarding 2025-09-30 09:40:06 +02:00
.gitignore Add gitlab-ci-local compatibility 2025-07-22 12:00:31 +02:00
.gitlab-ci-local-variables.yml Add gitlab-ci-local compatibility 2025-07-22 12:00:31 +02:00
.gitlab-ci.yml reduce noise with additions to mock 2025-10-16 14:29:25 +02:00
.kind-gitlab.yaml chore: update kind 2024-04-12 10:16:45 +02:00
CHANGES.md Release 0.5.9 2025-10-23 15:51:00 +02:00
common-vars.mk Add hint for shell command tracing 2025-07-30 17:43:38 +02:00
go.mod Update go1.24 and tidy mods 2025-10-20 12:46:40 +02:00
go.sum Update go1.24 and tidy mods 2025-10-20 12:46:40 +02:00
LICENSE We should be able to reformat, shound't we? 2022-12-01 16:08:56 +01:00
Makefile build: make linter comments fatal 2025-09-26 12:44:34 +02:00
README.md Vinylize the readme 2025-09-25 09:14:19 +02:00

VIKING: VInyl-cache Kubernetes INGress

This is an implementation of a Kubernetes Ingress controller based on Vinyl-Cache, with haproxy for TLS termination.

Throughout this repository, the former name "Varnish" might still be used to refer to the previous project name of Vinyl-Cache. We also refer to "Klarlack", which is a Vinyl-Cache based distribution.

The present documentation presupposes familiarity with both Kubernetes and Vinyl-Cache. For more information, see:

WORK IN PROGRESS

The Ingress controller implementation is presently in development and is undergoing initial testing. Features are subject to change on short notice. Testing and feedback are nevertheless welcome, and very valuable at this early stage.

Installation

Vinyl-Cache and haproxy for the purposes of Ingress run together in a Pod, and the controller that manages them runs in a separate Pod -- one controller can be used to manage a group of Pods implementing Ingress. The Dockerfiles and other files needed to build the three images are in the container/ folder, together with a Makefile that encapsulates the commands for the build.

The resulting images must then be pushed to a registry available to the Kubernetes cluster.

The Ingress can then be deployed by any of the means that are customary for Kubernetes. The deploy/ folder contains manifests (YAMLs) for some of the ways to deploy an Ingress, using tools such as kubectl. The charts/ folder contains charts for Helm deployments.

The deployment described in deploy/ targets a default setup in which the controller runs in the kube-system namespace and watches in all namespaces of the cluster for Ingresses, Services and so on that are intended for the Vinyl-Cache implementation. See the instructions for single-namespace deployments if you need to limit the deployment to one namespace.

The examples/ folder contains YAMLs for Services and Ingresses to test and demonstrate the Vinyl-Cache implementation and its features. You might want to begin with the "cafe" example inspired by other projects (a kind of "hello world" for Ingress).

This implementation requires that the Ingress definition includes an ingress.class Annotation specifying that its rules are to be implemented by Vinyl-Cache:

kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: "varnish"
[...]

The controller ignores all Ingress definitions that do not include the annotation. So you can work with other Ingress controllers that are based on other technologies in the same Kubernetes cluster.

Development

The source code for the controller, which listens to the k8s cluster API and issues commands to Vinyl-Cache instances to realize Ingress definitions, is in the pkg/ and cmd/ folders. The root folder of the repo contains a Makefile defining targets that encapsulate the build process for the controller executable. See the developer doc for details.

Documentation

See the docs/ folder for technical references and more detailed discussions of various topics.

Repositories