Skip to content
Observability Workspace Proxy

Observability Workspace Proxy

The Observability Workspace Proxy is an HTTP reverse proxy. A collector sends metrics or logs to the proxy. The proxy exchanges a projected Kubernetes service account token for a Thalassa bearer token and adds that token on the request to the workspace gateway.

The proxy forwards the request path and body unchanged. Use it for Prometheus remote write and query, Loki push and query, and OTLP.

Collector --> Proxy --> Workspace gateway
                |
                +--> POST /oidc/token

The collector does not hold a Thalassa client secret. Outbound workload identity is always enabled.

Modes

ModeListen addressInbound authenticationUse
Sidecar127.0.0.1:8080noneOne proxy next to Prometheus, Alloy, or Promtail
Shared:8080tokenreview or rbacOne Service for many clients

The shared chart defaults to inbound authentication rbac. A client sends a Kubernetes bearer token. The proxy checks that token with TokenReview and SubjectAccessReview. Set the token audience to the proxy --auth-audience.

Enable TLS on a shared proxy. Restrict the NetworkPolicy to the namespaces that send telemetry. An empty allowFromNamespaces list allows every namespace in the cluster.

Security behaviour

  • The proxy removes a client Authorization header before it calls the gateway. The gateway receives only the Thalassa bearer token.
  • The proxy does not log tokens or Authorization values.
  • A missing token file, a failed token exchange, or a failed inbound check stops the request.
  • The upstream is one configured host. The proxy is not an open proxy.

GET /healthz is the liveness probe. GET /readyz is ready when the cached Thalassa token is unexpired. The proxy refreshes that token before it expires.

Before you install

  • An Observability workspace and the gateway base URL. The URL has no path, for example https://prometheus.nl-01.thalassa.cloud.
  • A Thalassa Kubernetes cluster with an identity provider.
  • Helm 3, for the chart install.
  • A data-plane policy for the Thalassa service account. Remote write uses prometheus:RemoteWriteFullAccess. Log push uses a Loki push policy. See Default policies.

Install a shared proxy

Bootstrap the service account that the chart creates. The example release name is observability-workspace-proxy in the namespace observability. The service account name must match the chart.

export CLUSTER_ID="<cluster-id>"
export THALASSA_ORGANISATION_ID="<organisation-id>"

tcloud iam workload-identity-federation bootstrap kubernetes \
  --cluster "$CLUSTER_ID" \
  --namespace observability \
  --service-account observability-workspace-proxy \
  --policy prometheus:RemoteWriteFullAccess

Copy the Thalassa service account ID from the command output.

export THALASSA_SERVICE_ACCOUNT_ID="<thalassa-service-account-id>"

helm upgrade --install observability-workspace-proxy \
  oci://ghcr.io/thalassa-cloud/charts/observability-workspace-proxy --version <version> \
  --namespace observability --create-namespace \
  --set proxy.upstream=https://prometheus.nl-01.thalassa.cloud \
  --set proxy.organisationId="$THALASSA_ORGANISATION_ID" \
  --set proxy.serviceAccountId="$THALASSA_SERVICE_ACCOUNT_ID" \
  --set proxy.authAudience=https://observability-workspace-proxy.observability.svc \
  --set clientAccess.subjects[0].kind=ServiceAccount \
  --set clientAccess.subjects[0].name=prometheus \
  --set clientAccess.subjects[0].namespace=monitoring \
  --set networkPolicy.allowFromNamespaces[0]=monitoring

Replace <version> with the chart release you want to run. Point remote write at the proxy and keep the workspace path:

remote_write:
  - url: http://observability-workspace-proxy.observability.svc:8080/workspace/obsw-<id>/api/v1/push

Loki, PromQL, and OTLP use the same host. Keep the workspace path from the console or the API.

For rbac inbound authentication, the client must hold the Role that matches the proxy RBAC resource and verb. The chart defaults are resource services and verb proxy.

Sidecar

Run the proxy on 127.0.0.1:8080 in the collector pod and set inbound authentication to none. Mount a projected service account token with audience https://api.thalassa.cloud. The chart file values-sidecar.yaml and examples/sidecar-pod.yaml in the source repository show that layout.

A local binary uses the same flags:

./bin/thalassa-observability-workspace-proxy \
  --listen-address=127.0.0.1:8080 \
  --upstream=https://prometheus.nl-01.thalassa.cloud \
  --organisation-id="$THALASSA_ORGANISATION_ID" \
  --service-account-id="$THALASSA_SERVICE_ACCOUNT_ID" \
  --subject-token-file=/var/run/secrets/thalassa/token \
  --inbound-auth=none

Related documentation