whoami

by m11s

Helm chartv0.4.3App v1.12.0Verified publisher

Deploy Traefik Whoami, an HTTP server that reports runtime and request details

About this chart

whoami Helm Chart

whoami is a tiny HTTP server that prints OS information and HTTP request details. Useful for testing ingress, routing, and load balancing.

Installation

helm repo add m11s https://m11s-io.github.io/helm-charts
helm repo update
helm install whoami m11s/whoami -n whoami --create-namespace

Configuration

ParameterDescriptionDefault
hostUsersSet spec.hostUsers for user namespaces; requires cluster and runtime supportnull
whoami.portPort whoami listens on inside the container80
whoami.nameDisplay name printed in responses (useful with multiple replicas)""
whoami.verboseEnable verbose request loggingfalse
replicaCountNumber of pod replicas1
service.typeKubernetes Service typeClusterIP
service.portPort the Service listens on80
httpRoute.enabledEnable a Gateway API HTTPRoutefalse
httpRoute.parentRefsGateways the HTTPRoute attaches to; required when enabled[]
httpRoute.hostnamesHostnames the HTTPRoute matches[]
resources.requests.cpuDefault CPU request10m
resources.requests.memoryDefault memory request16Mi
resources.limits.memoryDefault memory limit64Mi

Endpoints

PathDescription
/Prints hostname, IPs, and full HTTP request
/apiSame as / but as JSON
/healthHealth check; returns 200 by default, accepts POST to change the status code
/dataReturns a configurable payload size (?size=1&unit=MB)
/benchMinimal response for benchmarking
/echoWebSocket echo

Examples

Multiple named replicas with HTTPRoute

replicaCount: 3

whoami:
  name: my-app

httpRoute:
  enabled: true
  parentRefs:
    - name: gateway
      namespace: gateway
  hostnames:
    - whoami.example.com

The chart creates only an HTTPRoute. It does not create a Gateway, because Gateways are usually owned by the cluster/platform layer. If the Gateway is in another namespace, its listener must allow routes from the whoami namespace with Gateway API allowedRoutes.

Manipulate the health check for testing

# Make /health return 503
kubectl run -it --rm --restart=Never curl --image=curlimages/curl -- \
  curl -X POST -d '503' http://whoami.<namespace>/health

Source

Deploy whoami with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has whoami 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartwhoami is pinned at v0.4.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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