Reference

VinylCache CRD

Overview

The VinylCache custom resource defines a Varnish Cache cluster managed by the cloud-vinyl operator.

  • API Group: vinyl.bluedynamics.eu

  • Version: v1alpha1

  • Kind: VinylCache

  • Short name: vc

  • Scope: Namespaced

Spec Fields

Core

Field

Type

Required

Default

Description

replicas

int32

No

1

Number of Varnish pods (minimum 1)

image

string

No

Operator default

Container image for Varnish pods

backends

BackendSpec[]

Yes

Upstream services (minimum 1)

Routing

Field

Type

Required

Default

Description

director

DirectorSpec

No

Load balancing strategy: shard, round_robin, random, fallback

cluster

ClusterSpec

No

Pod-to-pod clustering configuration

VCL

Field

Type

Required

Default

Description

vcl

VCLSpec

No

VCL generation: structured config, snippet hooks, or full override

Cache Invalidation

Field

Type

Required

Default

Description

invalidation

InvalidationSpec

No

PURGE, BAN, and xkey invalidation configuration

Networking

Field

Type

Required

Default

Description

service

ServiceSpec

No

Kubernetes Service configuration (ClusterIP, NodePort, LoadBalancer)

proxyProtocol

ProxyProtocolSpec

No

PROXY protocol support

Operations

Field

Type

Required

Default

Description

resources

ResourceRequirements

No

CPU/memory requests and limits for Varnish pods

monitoring

MonitoringSpec

No

Prometheus metrics, ServiceMonitor, alerting rules

pod

PodSpec

No

Affinity, tolerations, labels, annotations

storage

StorageSpec

No

Cache backends (malloc or file)

varnishParameters

map

No

Runtime varnishd parameters (-p flags)

Status

Field

Type

Description

phase

string

Pending, Ready, Degraded, or Error

conditions

Condition[]

Ready, VCLSynced, BackendsAvailable, Progressing, VCLConsistent

replicas

int32

Total replicas

readyReplicas

int32

Ready replicas

activeVCL

object

Currently active VCL with hash

Example

apiVersion: vinyl.bluedynamics.eu/v1alpha1
kind: VinylCache
metadata:
  name: plone-cache
  namespace: my-plone-app
spec:
  replicas: 2
  backends:
    - name: plone-backend
      host: plone-backend-svc
      port: 8080
    - name: plone-frontend
      host: plone-frontend-svc
      port: 3000
  director:
    type: shard
  invalidation:
    purge:
      enabled: true
    xkey:
      enabled: true
  resources:
    requests:
      cpu: "100m"
      memory: "256Mi"
    limits:
      cpu: "500m"
      memory: "512Mi"

For the full CRD schema, see the cloud-vinyl documentation.