Search Proxy Deployment

5 min read

How to deploy Search Proxy in any Kubernetes environment and wire assistants-core to it. The Helm chart is the single source of truth; this page explains how to use it. It does not prescribe a GitOps tool or a secret backend, but it does require Cilium (see Networking).

For what Search Proxy does at request time, see Search Proxy (Architecture). For credential field names, see Search Engine Setup and Web Page Reader Setup.


The chart is the contract

Artifact

Location

Helm chart (OCI)

ghcr.io/unique-ag/ai/helm/search-proxy

Container image

ghcr.io/unique-ag/ai/search-proxy

Chart source + full values reference

connectors/unique_search_proxy/unique_search_proxy_client/deploy/helm-chart/ in the ai repo (README is helm-docs-generated from the chart)

Two properties of this chart matter for operators:

  1. Provider blocks are generated from the application's settings code. Every provider block (googleSearch, braveSearch, perplexitySearch, bingAgent, vertexaiAgent and the third-party web page readers) plus httpClient, requestLimits and urlSafety is derived from the Pydantic settings classes. If a provider block is enabled without its required fields, helm template fails with an explicit message naming the missing value, so you cannot deploy a half-configured provider.

  2. Everything environment-specific is a values override. The chart ships with all providers disabled and no scheduling constraints, but with the network policy on. Some defaults, such as the assistants-core namespace (chat), can be overridden.

bash
helm install search-proxy oci://ghcr.io/unique-ag/ai/helm/search-proxy \
  --version <version> -n <namespace> -f my-values.yaml

Defaults: release and service name search-proxy, service port 80 (pod 8080), health probes on /health, non-root with a read-only root filesystem.


Minimal working values

One enabled provider is enough for a functional deployment:

yaml
googleSearch:
  enabled: true
  connection:
    engineId: "<your-cx-id>"
    apiKey:
      fromSecret:
        name: search-proxy-secret        # any Kubernetes Secret you manage
        key: GOOGLE_SEARCH_API_KEY

Secrets are accepted in exactly two shapes — the schema rejects plaintext:

  • fromSecret: { name, key } — any existing Kubernetes Secret, however you produce it (External Secrets Operator, Sealed Secrets, manual, CI)

  • fromSecretProvider: { vault, secretKey } — Azure Key Vault via CSI Secret Store (declare the vault once under top-level secretProvider:)

Non-secret required fields: Google engineId can be set inline or via fromSecret. The Bing fields (endpoint, bingResourceConnectionString, bingAgentModel) are treated as secrets and accept only fromSecret or fromSecretProvider.

Enable additional providers the same way. Agent providers additionally need cloud identity:

yaml
# Bing (Azure AI grounding): Azure workload identity
# Vertex AI (Google grounding): GCP workload identity federation
workloadIdentity:
  azure:
    enabled: true
    clientId: <uami-client-id>
  gcp:
    enabled: true
    projectId: "<project-number>"
    workloadIdentityPool: <pool>
    provider: <provider>
    serviceAccountEmail: <sa>@<project>.iam.gserviceaccount.com

vertexaiAgent:
  enabled: true
  connection:
    credentialType: workload_identity   # or service account JSON via secret

Networking

Search Proxy does not authenticate callers, so keep it internal: do not add an Ingress or any other route to it. The Cilium network policy controls who can reach it, which is why the chart requires Cilium and turns the policy on by default.

What the policy allows

  • Ingress: assistants-core and Prometheus. Override their namespaces if they differ from the defaults (below).

  • Egress: DNS, the enabled providers, the corporate proxy if configured, and ports 80 and 443 to the internet for reading web pages. URL safety checks keep those reads away from internal addresses.

yaml
# Only needed when your namespaces differ from the defaults
internalServices:
  dependents:
    assistantsCore:
      namespace: <assistants-core namespace>   # default: chat
networkPolicy:
  baseline:
    prometheus:
      namespace: <prometheus namespace>        # default: system

Egress FQDN rules for enabled providers are generated automatically from each provider's endpoint: enable braveSearch and the api.search.brave.com:443 rule appears. You never hand-maintain provider FQDNs. Add only rules specific to your environment, such as in-cluster peers, under networkPolicy.egress.

Turning the policy off

networkPolicy.enabled: false fails the render unless networkPolicy.allowDisabled: true is also set. Set that only when another control restricts who can reach Search Proxy. You then enforce egress yourself, for example on a firewall outside the cluster. Destinations by provider:

Enabled block

Destination (default endpoint)

Port

googleSearch

www.googleapis.com

443

braveSearch

api.search.brave.com

443

perplexitySearch

api.perplexity.ai

443

Third-party web page readers

The API host of each enabled reader block

443

bingAgent

Azure AD (login.microsoftonline.com) + your Azure AI project endpoint

443

vertexaiAgent

aiplatform.googleapis.com, oauth2.googleapis.com

443

Basic crawler

the URLs your users crawl — arbitrary web unless you restrict it

80/443

If a provider's connection.apiEndpoint is overridden in your values, allowlist that host instead. The same value drives both the runtime call and the rule the chart generates.

Corporate forward proxy

If all egress must go through an HTTP(S) forward proxy, configure the chart's httpClient block (none / username_password / ssl_tls auth, CA bundle, mTLS). All outbound calls from Search Proxy then go through it, except Grounding with Bing when usePrivateEndpointTransport is on. Full variable reference: Proxy Configuration.

yaml
httpClient:
  connection:
    proxyAuthMode: username_password
    proxyProtocol: http
    proxyHost: proxy.corp.example
    proxyPort: 3128
    proxyUsername:
      fromSecret: { name: search-proxy-secret, key: PROXY_USER }
    proxyPassword:
      fromSecret: { name: search-proxy-secret, key: PROXY_PASS }

To block direct internet access, so that page reads can only leave through the proxy, set networkPolicy.baseline.egress.worldHttp.enabled: false. Grounding with Bing and Grounding with VertexAI then need their Microsoft and Google Cloud hosts added under networkPolicy.egress.


Scheduling and sizing

To pin the workload to a dedicated node pool, use the standard chart values:

yaml
nodeSelector:
  pool: <dedicated-pool>
tolerations:
  - key: <pool-taint>
    operator: Exists
    effect: NoSchedule
resources:
  requests: { cpu: "1", memory: 2Gi }
  limits: { cpu: "1", memory: 4Gi }

affinity, priorityClassName, autoscaling (HPA) and pdb are also available. Size resources per environment.


Wiring assistants-core

assistants-core reaches Search Proxy through one env var: SEARCH_PROXY_BASE_URL. With the assistants-core dedicated chart, don't set the URL by hand — enable the dependency and the URL is derived:

yaml
# assistants-core environment overlay
internalServices:
  dependencies:
    searchProxy:
      enabled: true
      namespace: <namespace where search-proxy runs>

If assistants-core is deployed some other way, set SEARCH_PROXY_BASE_URL=http://search-proxy.<namespace>.svc.cluster.local directly.

Without SEARCH_PROXY_BASE_URL, assistants-core uses the legacy direct-provider path — Brave and Perplexity will not work, and provider secrets plus egress move back onto assistants-core. See Activation Reference.

With SEARCH_PROXY_BASE_URL set there is no fallback: every search engine and web page reader runs on Search Proxy (Customized API only when its feature flag is on), and credentials on assistants-core are not used. Put the credentials for every engine in ACTIVE_SEARCH_ENGINES on Search Proxy.

Engine/reader visibility is still controlled on assistants-core (ACTIVE_SEARCH_ENGINES, ACTIVE_INHOUSE_CRAWLERS) — deploying Search Proxy alone does not surface new engines in the UI.


Verification

bash
kubectl -n <namespace> port-forward svc/search-proxy 8080:80

curl -s localhost:8080/health                        # liveness and readiness
curl -s localhost:8080/ready                         # HTTP client and providers
curl -s localhost:8080/v1/configuration/providers    # built-in providers

/ready and /v1/configuration/providers list every built-in provider, whether or not it has credentials, so they do not show what is configured. To check a provider, run a search with it: if its credentials are missing, Search Proxy returns 503 ENGINE_NOT_CONFIGURED naming the missing env vars.

Then on assistants-core: confirm SEARCH_PROXY_BASE_URL is set and run a Web Search in a Space with an active engine.


Last updated