ThinkAd Static CDN (thdazuredemosa)

Files are stored in Azure Blob Storage and synchronized to pods running nginx. Use this endpoint to fetch static assets.

Usage

Public (or authenticated) assets are served under your domain or service IP. Examples:

  • https://cdn.private.azuredemo.thinkad.ai/index.html — root page
  • https://cdn.private.azuredemo.thinkad.ai/assets/logo.png — image asset
  • https://cdn.private.azuredemo.thinkad.ai/css/main.css — stylesheet

How to upload

  1. Upload files to your Azure container (e.g. cdn) using AzCopy, Azure CLI, portal, or CI.
  2. Presync Job and CronJob will copy blobs to the PVC that NGINX serves.
  3. Files are available after the presync Job completes; CronJob updates them thereafter.

Cache-control recommendations

  • Immutable assets (content-hashed filenames): Cache-Control: public, max-age=31536000, immutable
  • HTML pages: Cache-Control: no-cache (so updates are discovered quickly)
  • Use versioned filenames for long caching

Purging

To forcibly replace files, upload new versions and either:

  • Run the presync Job manually to re-populate the PVC, or
  • Let the CronJob run (within the sync interval) — of course, if you enabled --delete-destination=true it will remove extraneous files from the PVC to match the container.

Security & auth

  • We use Azure Workload Identity (User Assigned Identity) for AzCopy access — no long-lived SAS tokens required.
  • Ensure the UAI has Storage Blob Data Reader on the container.
  • Network: if your storage account has firewall rules or private endpoints, ensure pods can reach the storage endpoint.

Developer notes

  • The sync scripts live in a ConfigMap mounted at /scripts for easier iteration.
  • For production, consider baking AzCopy into a small image to avoid runtime downloads.
  • Readiness probe is recommended: e.g. test -f /usr/share/nginx/html/index.html.