Skip to main content

Documentation Index

Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt

Use this file to discover all available pages before exploring further.

The local resolver lets you resolve flags locally in your network for improved performance.

Create API Client and Credentials

1

Go to Confidence

2

Select Admin > API Clients

On the bottom of the left sidebar, select Admin > API Clients.
3

Click Create

4

Give the API client a name

For example, “local resolver.”
5

Select Admin > Policies

On the bottom of the left sidebar, select Admin > Policies.
6

Click Create

7

Add the role Flags Resolver Sidecar

Add the role Flags Resolver Sidecar to the principal with the name you just created, “local resolver”.
8

Click Create

Make note of the Client ID and client secret.

Run with Docker

Set the following environment variables:
  • CONFIDENCE_REGION - Your account region (EU or US)
  • CONFIDENCE_CLIENT_ID - The client ID of the API client you created
  • CONFIDENCE_CLIENT_SECRET - The client secret of the API client you created
Run the local resolver:
docker run -it --rm \
  -p 8090:8090 \
  -e CONFIDENCE_REGION="$CONFIDENCE_REGION" \
  -e CONFIDENCE_CLIENT_ID="$CONFIDENCE_CLIENT_ID" \
  -e CONFIDENCE_CLIENT_SECRET="$CONFIDENCE_CLIENT_SECRET" \
  europe-docker.pkg.dev/spotify-confidence/public/flags-resolver-sidecar:latest
The local resolver is available at http://localhost:8090.

Deploy in Kubernetes

Add the sidecar container configuration to your Kubernetes pod spec:
spec:
  containers:
  - name: my-service
    image: gcr.io/my-service/image:latest
    # whatever you already had configured

  # add this sidecar container to your pod
  - name: confidence-resolver-sidecar
    image: europe-docker.pkg.dev/spotify-confidence/public/flags-resolver-sidecar:latest
    env:
      - name: CONFIDENCE_REGION
        value: "<your-account-region>"
      - name: CONFIDENCE_CLIENT_ID
        value: "<your-api-client-id>"
      - name: CONFIDENCE_CLIENT_SECRET
        value: "<your-api-client-secret>"
    ports:
      - name: http
        containerPort: 8090
    readinessProbe:
      exec:
        command: ["/bin/grpc_health_probe", "-addr=:5990"]
      initialDelaySeconds: 5
    livenessProbe:
      exec:
        command: ["/bin/grpc_health_probe", "-addr=:5990"]
      initialDelaySeconds: 10
    resources:
      requests:
        cpu: 1
        memory: 256M
      limits:
        cpu: 2
        memory: 512M

Local Resolver Reference

Deep dive into local resolver configuration

Data Transfer

Understand flag resolution options

Manage Clients

Configure API clients and credentials

SDKs Reference

Learn about SDK integrations