frontier-squid

by ScienceBox

Helm chartv0.1.5App 4.17-2.1

Frontier Squid cache for CVMFS clients

About this chart

frontier-squid

The Helm chart for the frontier-squid proxy

Deploy

The chart can be installed via Helm with

helm repo add sciencebox https://registry.cern.ch/chartrepo/sciencebox
helm repo update

helm install squid sciencebox/frontier-squid

A Deployment will be created with one replica of the frontier-squid pod, together with a Service to make the frontier-squid proxy reachable by other applications running in the cluster. No ingress functionalities are provided: The proxy is meant for clients within the same Kubernetes cluster only.

The number of replicas can be increased to achieve high availability or provide more capacity for requests from clients. In this case, the Service provides load-balancing across all the available backend replicas.

Notable defaults

  • Squid on-disk cache:
    • Allowed cache size: 10 GB
    • Max object size on disk: 1 GB
  • Squid in-memory cache:
    • Allowed cache size: 256 MB
    • Max object size in memory: 32 KB
  • Allowed traffic:
    • Protocol: HTTP (80, 8080), HTTPS (443 -- Connect method only)
    • Source: Everyone
    • Destination: All known CVMFS Stratum One servers and other CVMFS-based infrastructures

Custom configuration

Several squid configuration parameters can be tuned in values.yaml:

config:
  fileDescriptors: 16384
  cache:
    minSize: "0 KB"             # Applies to both in-memory and on disk caches
    diskDirectory: "/var/cache/squid"
    diskSpace: 10000    # in MB
    diskMaxSize: "1 GB"         # Maximum object size to be cached on disk
    memorySpace: "256 MB"
    memoryMaxSize: "32 KB"      # Maximum object size to be cached in memory

Extensive documentation on such parameters is provided by the upstream squid-cache documentation.

It is also possible to replace the configuration file completely by setting configFile: <custom_configuration_file> in values.yaml. This configuration option will apply only if the configFile parameter is set and if the file at the provided path exists.

Deploy frontier-squid with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has frontier-squid on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartfrontier-squid is pinned at v0.1.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply