Skip to content

Configuration ​

With Helm, configure Valetkey through Helm values. Underneath, the binary reads these environment variables:

VariableDefaultDescription
OPERATOR_NAMESPACEvaletkey-systemNamespace for providers, tenants and provider-key Secrets (set from the pod's namespace)
PROXY_URLhttp://valetkey.valetkey-system.svc.cluster.local:8000URL written into key Secrets and shown in the dashboard's examples
PROXY_PORT8000Tenant-facing port
METRICS_PORT8081Health checks and Prometheus metrics
ADMIN_ADDR127.0.0.1:8082Dashboard and admin API. Loopback by default, so only kubectl port-forward reaches it
LEASE_NAMEvaletkeyLease used to pick the replica that mints keys and writes status
PRICING_REFRESH6hHow often live prices are fetched (Go duration), or off
PROMETHEUS_URLnonePrometheus to read usage history from (set by the chart's prometheus.url)
TRUST_PROXYnoneNumber of reverse proxies in front of Valetkey (e.g. 1 behind one ingress). The client IP for allow lists is then read from X-Forwarded-For

Ports ​

PortExposed byPaths
8000Service valetkey/v1/chat/completions, /v1/messages, /v1/embeddings, /v1/responses, /v1/models
8081Service valetkey/healthz, /readyz, /metrics
8082nothing (pod loopback)/ (dashboard), /api/v1/*

Resources ​

The chart requests 20m CPU and 32 Mi memory with a 256 Mi limit.

RBAC ​

The service account can:

  • read and write proxykeys in every namespace, and their status;
  • create, update and delete Secrets in every namespace (key Secrets have generated names, so they can't be narrowed with resourceNames);
  • list namespaces (for the dashboard's tenant picker);
  • read and write providers and tenants and their status, and Secrets, in its own namespace.

See charts/valetkey/templates/rbac.yaml.

Released under the ISC License.