Skip to content

About

Custom version of kube-httpcache with up to date Varnish.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

kube-httpcache with Varnish

This repository builds a container image that combines the kube-httpcache Kubernetes controller with Varnish, using Varnish 9.1.0 by default.

The image is intended for deployments that need the kube-httpcache controller and exporter binaries from the upstream project while using a specific Varnish base image. The repository contains only the image assembly and its publishing workflow; Kubernetes manifests and cache configuration are managed by the consumer or by the upstream kube-httpcache project.

How the image is assembled

The multi-stage Dockerfile:

  1. Uses quay.io/mittwald/kube-httpcache:stable as a build source.
  2. Uses varnish:9.1.0 as the final runtime image.
  3. Copies /kube-httpcache and /exporter from the upstream image.
  4. Starts the container with /kube-httpcache as its entrypoint.

The upstream image and Varnish image can be overridden at build time:

docker build \
  --build-arg KUBE_HTTPCACHE_IMAGE=quay.io/mittwald/kube-httpcache:stable \
  --build-arg VARNISH_IMAGE=varnish:9.1.0 \
  -t kube-httpcache-varnish:local .

Run and configure the resulting image according to the kube-httpcache documentation and the requirements of the target Kubernetes deployment:

docker run --rm kube-httpcache-varnish:local

The command above is primarily a smoke test for image startup. A useful deployment normally supplies the controller's required Kubernetes access and Varnish/cache configuration through the surrounding deployment setup.

Continuous delivery

GitHub Actions builds and pushes the image to:

ghcr.io/serit/kube-httpcache-varnish

The workflow runs automatically when a tag beginning with v is pushed, and can also be started manually. It publishes Linux amd64 images with both the version tag and an immutable Git SHA tag.

To create a release image, push a version tag, for example:

git tag v9.1.0-2
git push origin v9.1.0-2

The workflow requires permission to write GitHub Packages and uses the workflow-provided GITHUB_TOKEN to authenticate to GHCR.

Repository layout

Dockerfile                  Image assembly definition
.github/workflows/docker.yml GitHub Actions build and publish workflow

Updating versions

Update the VARNISH_IMAGE default in Dockerfile when moving to a new Varnish version. The upstream KUBE_HTTPCACHE_IMAGE can also be pinned or updated there when a specific controller release is required. After changing either base image, build locally and verify the resulting image before creating a version tag.

About

Custom version of kube-httpcache with up to date Varnish.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages