apisix

by QuenchWorks

Helm chartv0.0.27App 3.20.0Apache-2.0Verified publisher

Apache APISIX, the cloud-native API gateway built on OpenResty/LuaJIT: dynamic routing, load balancing, authentication and observability driven by an etcd-backed control plane and a REST Admin API. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Apache APISIX

Hardened Apache APISIX, the cloud-native API gateway built on OpenResty/LuaJIT, on a minimal, nonroot, CVE-gated image built from source, cosign-signed and pinned by digest. Runs as a stateless Deployment with its configuration in etcd: routes, upstreams, plugins and certificates are written through the REST Admin API at runtime, not through this chart's values.

The bundled control-plane store is the catalogue's own hardened quench/etcd chart, so there is one etcd implementation in the catalogue rather than a second vendored copy.

Install

helm install gw oci://ghcr.io/quenchworks/charts/apisix

That gives you APISIX plus a 3-node etcd. The Admin API key is generated at install time and kept in a Secret:

KEY=$(kubectl get secret gw-apisix-admin -o jsonpath='{.data.admin-key}' | base64 -d)
kubectl port-forward svc/gw-apisix 9180:9180 9080:9080

# declare a route
curl -X PUT http://127.0.0.1:9180/apisix/admin/routes/1 \
  -H "X-API-KEY: $KEY" \
  -d '{"uri":"/get","upstream":{"type":"roundrobin","nodes":{"httpbin.org:80":1}}}'

# and call it through the proxy
curl http://127.0.0.1:9080/get

The key is only generated when admin.key is empty, and every later helm upgrade reads it back out of the Secret rather than rotating it. Set admin.key yourself, or point admin.existingSecret at a Secret you manage.

Ports

PortWhat
9080HTTP proxy: the data plane
9443HTTPS proxy, only when tls.enabled=true (certificates come from the Admin API, not from values)
9180Admin API, key-protected
9090Control API, bound to 0.0.0.0 so the kubelet's probes can reach /v1/healthcheck
9091Prometheus, at /apisix/prometheus/metrics

All five are APISIX's own defaults and all sit above 1024, so the nonroot user binds them with no capability granted.

Roles: traditional, hybrid, standalone

role picks the topology. One chart, one image, four shapes:

roleProxiesAdmin APIConfig store
traditional (default)yesyesetcd
control_planenoyes, ClusterIP onlyetcd
data_planeyesnothe control plane's etcd
standaloneyesmode: api onlynone: values (mode: file) or memory (mode: api)

Hybrid (APISIX's decoupled mode) is two releases on one etcd. The control plane keeps the Admin API inside the cluster (the chart refuses a non-ClusterIP Service for it); the data plane owns the public Service:

helm install cp oci://ghcr.io/quenchworks/charts/apisix --set role=control_plane
helm install dp oci://ghcr.io/quenchworks/charts/apisix --set role=data_plane \
  --set etcd.enabled=false --set 'etcdClient.hosts={http://cp-etcd:2379}' \
  --set service.type=LoadBalancer

For etcd over TLS, use https:// hosts and set etcdClient.tls.existingSecret to a Secret with tls.crt, tls.key and ca.crt (a cert-manager Certificate has that layout). Set etcdClient.tls.sni to a name in etcd's certificate: with verification on and no SNI, APISIX fails every handshake and nothing syncs.

Standalone needs no etcd (etcd.enabled=false). APISIX has no other database, so the config lives in a file or in memory:

  • standalone.mode: file: standalone.config is rendered into conf/apisix.yaml (routes, upstreams, ssls, ... in APISIX's own schema). A helm upgrade that changes it rolls the pods. No Admin API.
  • standalone.mode: api: the whole config is replaced through PUT /apisix/admin/configs with an X-Digest header (any version string, e.g. a hash of the body; APISIX refuses the push without it). This is what apisix-ingress-controller 2.x drives. Each pod holds its own copy and starts empty after a restart until it is pushed again.

An existing etcd

helm install gw oci://ghcr.io/quenchworks/charts/apisix \
  --set etcd.enabled=false \
  --set 'etcdClient.hosts={http://etcd.data.svc.cluster.local:2379}'

Leaving both off is an error, not a silent half-install: APISIX has nowhere to keep its configuration without etcd.

Anything the values do not model

config.extra is deep-merged over everything the chart renders into conf/config.yaml, so plugin lists, service discovery, etcd TLS and nginx tuning are all reachable without a fork:

config:
  extra:
    apisix:
      enable_ipv6: false
    plugins:
      - jwt-auth
      - limit-req
      - prometheus

Ingress controller

The APISIX Ingress Controller is a separate chart, apisix-ingress-controller. It was an optional component of this chart in 0.0.1 and never worked: the controller cannot sync without its adc sidecar, which this chart did not run, and it owns twelve cluster-scoped apisix.apache.org CRDs plus an IngressClass, objects a data-plane chart must not claim if you ever want two APISIX releases in one cluster.

Install it alongside and point it at this release's Admin API:

helm install aic oci://ghcr.io/quenchworks/charts/apisix-ingress-controller \
  --set dataPlane.endpoints[0]=http://<release>-apisix:9180 \
  --set dataPlane.adminKey.existingSecret=<release>-apisix-admin

Verify the image

cosign verify ghcr.io/quenchworks/images/apisix \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/apisix --owner quenchworks.

Values

KeyDefaultNotes
image.repositoryghcr.io/quenchworks/images/apisix
image.digest(CI-written)Required. Charts pin by digest, never a tag.
image.pullPolicyIfNotPresent
nameOverride""Override the chart name in resource names.
replicaCount1Stateless Deployment (ignored when autoscaling is on).
etcd.enabledtrueBundle the quench/etcd chart as the control-plane store. Any other key under etcd is passed straight to it.
etcdClient.hosts[]Client URLs of an existing etcd. Required when etcd.enabled=false.
etcdClient.prefix/apisixKey prefix APISIX owns.
etcdClient.timeout30Seconds APISIX waits on an etcd call.
admin.enabledtrueServe the Admin API. false makes this release a data plane only.
admin.allowAdmin["0.0.0.0/0"]CIDRs allowed to call the Admin API.
admin.key""The X-API-KEY value. Empty generates a random 32-character key, stable across upgrades.
admin.existingSecret""Read the key from a Secret you manage instead.
admin.existingSecretKeyadmin-keyKey inside that Secret.
tls.enabledfalseOpen the HTTPS proxy listener. Certificates are loaded through the Admin API.
metrics.enabledtrueBind the Prometheus exporter to 0.0.0.0.
metrics.serviceMonitor.enabledfalsePrometheus Operator ServiceMonitor.
metrics.serviceMonitor.interval30s
containerPorts.http / .https / .admin / .control / .metrics9080 / 9443 / 9180 / 9090 / 9091APISIX's own defaults.
config.extra{}YAML deep-merged over the rendered conf/config.yaml.
resources.requestscpu 100m / mem 256Mi
resources.limitscpu 1 / mem 1Gi
service.typeClusterIPClusterIP, NodePort, or LoadBalancer.
service.port9080HTTP proxy. Also what the Ingress fronts.
service.httpsPort / .adminPort / .metricsPort9443 / 9180 / 9091Only published when the matching feature is on.
autoscaling.enabledfalseHPA on CPU (autoscaling/v2).
autoscaling.minReplicas1
autoscaling.maxReplicas5
autoscaling.targetCPUUtilizationPercentage80
serviceAccount.createtrueToken automount is off; APISIX itself never calls the API server.
serviceAccount.name""Use an existing ServiceAccount.
rbac.createfalseMinimal Role/RoleBinding.
networkPolicy.enabledtrueRestricts ingress to the gateway's own ports.
networkPolicy.allowExternaltrueSet false to restrict ingress to the release namespace.
podDisruptionBudget.enabledtrueminAvailable: 1.
ingress.enabledfalseCreate an Ingress in front of the proxy port. HTTP only.
ingress.className""IngressClass to claim it. Empty leaves it unset, so the cluster default applies.
ingress.annotations{}Controller annotations.
ingress.hosts[]e.g. [{host: api.example.com, paths: [{path: /, pathType: Prefix}]}].
ingress.tls[]Standard Ingress TLS list.

Plus the shared quench-common knobs: podLabels, podAnnotations, commonLabels, commonAnnotations, nodeSelector, affinity, tolerations, topologySpreadConstraints, priorityClassName, schedulerName, terminationGracePeriodSeconds, updateStrategy, extraEnvVars, extraEnvVarsCM, extraEnvVarsSecret, extraVolumes, extraVolumeMounts, initContainers, sidecars, lifecycleHooks, command, args, podSecurityContext, containerSecurityContext, and the probe overrides (livenessProbe, readinessProbe, customLivenessProbe, customReadinessProbe, customStartupProbe).

How it runs

The container is nonroot (uid 1001) on a read-only root filesystem. APISIX needs exactly three writable paths, each an emptyDir:

  • /usr/local/apisix/conf: apisix init regenerates nginx.conf here on every start. The image ships it empty and re-seeds it from a read-only conf.default/, so the chart's config.yaml is mounted on top and everything else (mime.types, cert templates) is filled in behind it.
  • /usr/local/apisix/logs: error log and the worker_events sockets.
  • /tmp: nginx's five temp paths, redirected there by config.yaml.

An init container waits for etcd on a TCP connect before the gateway starts: apisix init_etcd exits when the store is not up yet, and Helm creates Deployments before StatefulSets, so without it a fresh install would CrashLoopBackOff its way through etcd's own startup.

Deploy apisix with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has apisix 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 chartapisix is pinned at v0.0.27 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