api-gateway
by Labs64
Helm chartv0.15.15App 0.1.8Verified publisher
Labs64.IO :: API Gateway (AuthProxy + Middlewares)
About this chart
api-gateway
Labs64.IO :: API Gateway (AuthProxy + Middlewares)
Homepage: https://labs64.io
Maintainers
| Name | Url | |
|---|---|---|
| Labs64 | [email protected] | https://labs64.io |
Source Code
- https://github.com/Labs64/labs64.io-helm-charts
- https://github.com/Labs64/labs64.io-authgateway/tree/master/traefik
Requirements
| Repository | Name | Version |
|---|---|---|
| file://../chart-libs | chart-libs | 0.8.8 |
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| applicationType | string | "python" | Security response headers are now emitted as a native Gateway API ResponseHeaderModifier filter on each HTTPRoute rule; the canonical values live in the chart-libs "chart-libs.securityHeaders" helper. (The former Traefik security-headers Middleware has been removed.) |
| authProxy | object | {"address":"","authResponseHeaders":["X-Auth-User","X-Auth-Scopes","X-Auth-Tenant","X-Request-ID"],"maxResponseBodySize":8192,"port":8081,"serviceName":"gateway-common","trustForwardHeader":false} | ForwardAuth middleware configuration (OIDC/JWT validation via this chart's own authproxy container) |
| authProxy.address | string | "" | Full URL override for the /auth endpoint; when empty the address is derived as http://..svc.cluster.local:/auth |
| authProxy.authResponseHeaders | list | ["X-Auth-User","X-Auth-Scopes","X-Auth-Tenant","X-Request-ID"] | Identity headers copied from the authproxy response onto the upstream request (the authproxy emits every one on each 2xx, so client values can never pass through) |
| authProxy.maxResponseBodySize | int | 8192 | Maximum size (bytes) of the authproxy's /auth response Traefik will read. The response carries only identity headers and no body, so this is a DoS guard, not a functional limit — set well above authResponseHeaders' combined size. |
| authProxy.port | int | 8081 | Service port of the authproxy container |
| authProxy.serviceName | string | "gateway-common" | Service name backing the ForwardAuth address. Must match fullnameOverride above since the authproxy Service is rendered by this same chart. |
| authProxy.trustForwardHeader | bool | false | Pass a caller-supplied X-Forwarded-Method / X-Forwarded-Uri on to the authproxy instead of the method and path Traefik actually serves. Keep it false: the authproxy authorises whatever those two headers name, so with true a caller behind a trusted proxy (the entry point's forwardedHeaders.trustedIPs, e.g. a load balancer that passes request headers through) could have a protected route checked as a public one. |
| autoscaling | object | {"enabled":false,"maxReplicas":3,"minReplicas":1,"targetCPUUtilizationPercentage":80} | This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ |
| buffering | object | {"enabled":true,"maxRequestBodyBytes":2621440} | Buffering middleware configuration (limits payload sizes to prevent OOM / large event attacks) |
| buffering.enabled | bool | true | Enable the shared buffering middleware |
| buffering.maxRequestBodyBytes | int | 2621440 | Maximum allowed request body size in bytes (default 2.5MB) |
| cerbos | object | {"url":"http://labs64io-authz-pdp:3592"} | Central Cerbos PDP HTTP endpoint (the authorization decision). |
| chart-libs | object | {} | Values passed to the chart-libs library dependency (present so the generated schema accepts the key Helm injects for the dependency) @schema type: object additionalProperties: true @schema |
| compress | object | {"enabled":true,"excludedContentTypes":["image/png","image/jpeg","image/gif","image/webp","application/grpc"],"minResponseBodyBytes":1024} | Response-compression middleware (edge optimization for all modules routed through Traefik) |
| compress.enabled | bool | true | Enable the shared compress middleware |
| compress.excludedContentTypes | list | ["image/png","image/jpeg","image/gif","image/webp","application/grpc"] | Content types excluded from compression (already-compressed formats) |
| compress.minResponseBodyBytes | int | 1024 | Do not compress responses below this size (bytes) |
| enabled | bool | true | |
| env | list | [] | Raw environment entries appended verbatim to the container. Escape hatch for anything not exposed above; container env wins over envFrom, so an entry here overrides the ConfigMap value of the same name. |
| externalSecrets.enabled | bool | false | |
| externalSecrets.secretKey | string | "" | Key/path of this module's secret in the external backend; every key becomes an env var. Defaults to the release fullname. |
| externalSecrets.storeName | string | "local-kubernetes-store" | |
| extraConfigChecksums | list | ["configmap-routes","configmap-static-policies"] | Roll the ACS whenever the generated routes / static-route ConfigMaps change (checksum/config already covers configmap.yaml; these are the extra dynamically generated ConfigMaps this chart mounts). |
| fullnameOverride | string | "gateway-common" | Fixed resource-name prefix (instead of the default "-api-gateway") so module charts can reference the shared middlewares by a stable name regardless of release name. Also fixes the name of this chart's own Deployment/Service, which is why authProxy.serviceName below must match this value. |
| image | object | {"digest":"sha256:c66e36110863cb18b34cb58a6cd5e0abb25589486845140e940f0fc61b18102c","pullPolicy":"IfNotPresent","repository":"labs64/traefik-authproxy","tag":""} | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ |
| image.digest | string | "sha256:c66e36110863cb18b34cb58a6cd5e0abb25589486845140e940f0fc61b18102c" | Pin the image by digest (sha256:<64 hex>). Takes precedence over tag — the release pipeline sets it so a deployment cannot follow a moved tag. |
| image.pullPolicy | string | "IfNotPresent" | This sets the pull policy for images. |
| image.tag | string | "" | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | [] | This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
| lifecycle.preStopDrainSeconds | int | 5 | preStop sleep (seconds) so Traefik/kube-proxy deregister the pod before shutdown; 0 disables |
| livenessProbe | object | {"failureThreshold":3,"httpGet":{"path":"/health","port":8081},"initialDelaySeconds":0,"periodSeconds":10,"timeoutSeconds":2} | This is to setup the liveness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
| logLevel | string | "INFO" | Log level for the auth proxy. |
| nameOverride | string | "" | This is to override the chart name. |
| networkPolicy | object | {"egress":[{"ports":[{"port":3592,"protocol":"TCP"}],"to":[{"podSelector":{"matchLabels":{"app.kubernetes.io/name":"authz-pdp"}}}]}],"enabled":false,"extraIngress":[],"gatewayNamespace":"tools","ingressControllerLabels":{},"observabilityNamespace":"monitoring","toolsEgress":[{"name":"mock-oidc","port":8080}]} | NetworkPolicy: allow ingress from Traefik and same-namespace pods only (rendered by chart-libs.networkpolicy) |
| networkPolicy.egress | list | [{"ports":[{"port":3592,"protocol":"TCP"}],"to":[{"podSelector":{"matchLabels":{"app.kubernetes.io/name":"authz-pdp"}}}]}] | Egress rules enforcing database-per-service isolation. |
| networkPolicy.extraIngress | list | [] | Additional raw ingress rules |
| networkPolicy.gatewayNamespace | string | "tools" | Namespace where Traefik runs |
| networkPolicy.ingressControllerLabels | object | {} | Ingress controller pod-selector labels; defaults to the internal Traefik standard (app.kubernetes.io/name: traefik) when empty @schema type: object additionalProperties: true @schema |
| networkPolicy.observabilityNamespace | string | "monitoring" | Namespace the observability/OTel collector runs in |
| networkPolicy.toolsEgress | list | [{"name":"mock-oidc","port":8080}] | Tools-namespace destinations this service needs (name + port pairs); rendered as scoped egress rules — NOT a blanket allow to the whole tools namespace — to preserve database-per-service isolation. |
| nodeSelector | object | {} | |
| observability | object | {"enabled":false,"metricsScrape":false,"otlpEndpoint":"http://$(NODE_IP):4318"} | Observability is infrastructure-owned: the same image runs with or without it. When enabled, the image's opentelemetry-instrument entrypoint auto-instruments FastAPI (traces + correlated logs + metrics via OTLP). |
| observability.enabled | bool | false | Enable runtime auto-instrumentation (traces + logs + metrics via OTLP) |
| observability.metricsScrape | bool | false | Emit prometheus.io/* scrape annotations. Disabled here: the authproxy is a FastAPI service that pushes metrics over OTLP and serves no Prometheus endpoint (its only routes are /health, /health/ready, /reload and /auth). With this on, the collector scraped /actuator/prometheus on the service port and logged a 404 every interval. |
| observability.otlpEndpoint | string | "http://$(NODE_IP):4318" | OTLP endpoint of the OpenTelemetry Collector |
| oidc | object | {"audience":"account","discoveryUrl":"http://keycloak-http.tools.svc.cluster.local/realms/labs64io/.well-known/openid-configuration","issuer":"","scopesClaimPaths":"scope,realm_access.roles,resource_access.{audience}.roles","tenantClaimPath":"tenant"} | OIDC provider settings. Rendered into this chart's ConfigMap and delivered via envFrom, as scalars rather than a raw env list: Helm replaces lists wholesale on merge, so with a list a caller overriding one field had to restate all eight — and silently lost any entry added upstream later. |
| oidc.audience | string | "account" | Expected JWT audience. |
| oidc.discoveryUrl | string | "http://keycloak-http.tools.svc.cluster.local/realms/labs64io/.well-known/openid-configuration" | Discovery URL (in-cluster transport; the token issuer is oidc.issuer). Defaults to the upstream codecentric/keycloakx release keycloak in the tools namespace (Service keycloak-http). keycloak: http://keycloak-http.tools.svc.cluster.local/realms/labs64io/.well-known/openid-configuration demo/dev: http://mock-oidc..svc.cluster.local:8080/labs64io/.well-known/openid-configuration |
| oidc.issuer | string | "" | Canonical JWT issuer. Set this when discovery uses an internal service URL while tokens carry a public issuer; empty falls back to discovery metadata. |
| oidc.scopesClaimPaths | string | "scope,realm_access.roles,resource_access.{audience}.roles" | Dot-paths (comma-separated) to collect scopes from the JWT; "{audience}" expands to oidc.audience. |
| oidc.tenantClaimPath | string | "tenant" | Dot-path to the tenant claim for X-Auth-Tenant; "-" is emitted when absent. |
| podAnnotations | object | {} | This is for setting Kubernetes Annotations to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| podDisruptionBudget | object | {"enabled":true,"minAvailable":1} | PodDisruptionBudget (rendered by chart-libs.pdb) |
| podLabels | object | {} | This is for setting Kubernetes Labels to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
| podSecurityContext | object | {} | |
| rateLimit | object | {"average":100,"burst":50,"global":false,"perUser":true} | Rate limit middleware configuration |
| rateLimit.average | int | 100 | Average requests per second |
| rateLimit.burst | int | 50 | Burst size |
| rateLimit.global | bool | false | One bucket per request host instead of per user: a fixed ceiling on the gateway's total ingress, identical for every caller, with per-tenant limits left to the services. Overrides perUser. Traefik keeps buckets in memory, so the ceiling applies per Traefik replica. |
| rateLimit.perUser | bool | true | Rate-limit per authenticated user (X-Auth-User header set by the auth middleware); falls back to per-IP when absent |
| readinessProbe | object | {"failureThreshold":3,"httpGet":{"path":"/health/ready","port":8081},"initialDelaySeconds":0,"periodSeconds":5,"timeoutSeconds":2} | This is to setup the readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
| replicaCount | int | 2 | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ The authproxy sits on the hot path of every protected request - keep at least 2 replicas. |
| resources.limits.cpu | string | "200m" | |
| resources.limits.memory | string | "256Mi" | |
| resources.requests.cpu | string | "50m" | |
| resources.requests.memory | string | "128Mi" | |
| routesDir | string | "/app/routes" | Directory of generated .routes.yaml manifests (mounted ConfigMap). |
| secrets | object | {"data":{}} | Secret data to be used as environment variables (delivered via envFrom) |
| securityContext.allowPrivilegeEscalation | bool | false | |
| securityContext.capabilities.drop[0] | string | "ALL" | |
| securityContext.readOnlyRootFilesystem | bool | true | |
| securityCont |
Deploy api-gateway with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has api-gateway 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 chartapi-gateway is pinned at v0.15.15 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