Skip to content

feat(k8s): deploy squid caching proxy with ssl bump for ollama 70b models #131

Closed

Description

@dan-petty

Description

Deploy and configure a dedicated, high-capacity Squid caching proxy with SSL-Bump (TLS inspection) in the Kubernetes cluster. Sized and tuned to cache outbound HTTP/HTTPS traffic originating from in-cluster pods, specifically handling multi-gigabyte Ollama 70B model downloads (~40GB–75GB per layer) with content-addressable deduplication.

Architecture & Key Deliverables

  1. Squid Manifests (k8s/squid/):
    • namespace.yaml: Dedicated squid namespace with baseline security profile.
    • pvc.yaml: 250Gi PersistentVolumeClaim for cache storage and SSL cert db.
    • configmap.yaml: squid.conf configured with:
      • maximum_object_size 100 GB
      • cache_dir ufs /var/spool/squid/cache 200000 16 256 (200GB disk cache)
      • range_offset_limit -1 (cache full object on range requests)
      • quick_abort_min -1, quick_abort_max -1
      • read_ahead_gap 64 MB
      • Content-addressable layer caching rules (/v2/.*/blobs/sha256: and registry.ollama.ai).
      • ssl-bump configuration terminating TLS with internal CA and dynamic host cert generation.
    • ca-secret-generator.yaml: CA cert generation job / secret provisioner.
    • service.yaml: ClusterIP service exposing port 3128 (squid.squid.svc.cluster.local:3128).
    • deployment.yaml: Squid deployment with health probes, volume mounts, and security context.
    • networkpolicy.yaml: Ingress from cluster pods, egress to Internet ports 80/443.
  2. Cluster & Ollama Integration:
    • Update k8s/llm/ollama-daemonset.yaml with proxy environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) and Squid CA cert trust mount.
    • Update root k8s/kustomization.yaml and k8s/namespaces.yaml.

Acceptance Criteria

  • Valid Kubernetes manifests in k8s/squid/.
  • Automated validation via kubectl apply --dry-run=client -k k8s/squid/.
  • Kubeconform / policy validation passes cleanly.
  • Documentation and task tracking updated.

Activity

  1. added this to the v0.2.16 milestone on Sep 10, 2026
  2. added
    type/feature
    scope/k8s
    priority/p1-high
    status/in-progress
    on Sep 10, 2026
  3. added 2 commits that reference this issue on Sep 11, 2026
    30184d0
    6f11b73
  4. dan-petty commented on Sep 11, 2026

    @dan-petty
    OwnerAuthor

    Delivered and verified via squash-merge of PR #134 into release/v0.2.16.

  5. added a commit that references this issue on Sep 12, 2026
    2ed28d4
  6. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/k8stype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions