default-backend
by WyriHaximus
A Helm chart for Kubernetes
About this chart
Default Backend
Opinionated helm chart for wyrihaximusnet/default-backend.
Provided tags
random- Each time when the images are build a random image is selected and build, plus every hour an image is retagged asrandomand pushed.images/*- For each directory insideimages/.
Configuration
This chart has very little configuration, it runs without any. But it is recommended to set the number of replica's
(until autoscaling support has been added), and optionally configure ingress hosts. Listed below is my personal
configuration. Both k8s.wyrihaximus.net and
default-backend.k8s.wyrihaximus.net are active, refresh the pages a
few times. This configuration example also enables the cronjob that replaces the oldest pod, and forces the latest,
hourly retagged, Docker image to be used. It also has the horizontal pod autoscaler enabled.
replicas: 3
cron:
replaceOldestPodHourly: true
hpa:
enable: true
ingress:
hosts:
- k8s.wyrihaximus.net
- default-backend.k8s.wyrihaximus.net
Opinionated decisions
- requires kubernetes ^1.18
- Ports are hardcoded to
6969for the service, and9696for the metrics. - TLS is assumed to be required, and is set up based on supplied hosts in
ingress.hosts. - It's assumed that this helm chart will be run in it's own namespace, so the naming for all resources is kept as simple as possible.
- Prometheus export annotations are added for metric scraping.
- The default tag is random to randomly cycle through the different
404pages. - Comes with a pod
- Replace oldest pod every hour to hook into the hourly random image retagging
Deploy default-backend with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has default-backend on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartdefault-backend is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply