Reference
VinylCache CRD¶
Overview¶
The VinylCache custom resource defines a Varnish Cache cluster managed by the cloud-vinyl operator.
API Group:
vinyl.bluedynamics.euVersion:
v1alpha1Kind:
VinylCacheShort name:
vcScope: Namespaced
Spec Fields¶
Core¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
int32 |
No |
1 |
Number of Varnish pods (minimum 1) |
|
string |
No |
Operator default |
Container image for Varnish pods |
|
BackendSpec[] |
Yes |
— |
Upstream services (minimum 1) |
Routing¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
DirectorSpec |
No |
— |
Load balancing strategy: shard, round_robin, random, fallback |
|
ClusterSpec |
No |
— |
Pod-to-pod clustering configuration |
VCL¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
VCLSpec |
No |
— |
VCL generation: structured config, snippet hooks, or full override |
Cache Invalidation¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
InvalidationSpec |
No |
— |
PURGE, BAN, and xkey invalidation configuration |
Networking¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
ServiceSpec |
No |
— |
Kubernetes Service configuration (ClusterIP, NodePort, LoadBalancer) |
|
ProxyProtocolSpec |
No |
— |
PROXY protocol support |
Operations¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
ResourceRequirements |
No |
— |
CPU/memory requests and limits for Varnish pods |
|
MonitoringSpec |
No |
— |
Prometheus metrics, ServiceMonitor, alerting rules |
|
PodSpec |
No |
— |
Affinity, tolerations, labels, annotations |
|
StorageSpec |
No |
— |
Cache backends (malloc or file) |
|
map |
No |
— |
Runtime varnishd parameters (-p flags) |
Status¶
Field |
Type |
Description |
|---|---|---|
|
string |
Pending, Ready, Degraded, or Error |
|
Condition[] |
Ready, VCLSynced, BackendsAvailable, Progressing, VCLConsistent |
|
int32 |
Total replicas |
|
int32 |
Ready replicas |
|
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.