Configuration options¶
Complete reference for all configuration options in cdk8s-plone.
Key constructs¶
Plone¶
Main construct for deploying Plone CMS. Supports two variants:
VOLTO: Modern React frontend with REST API backend (default)
CLASSICUI: Traditional server-side rendered Plone
Properties:
backendServiceName- Name of the backend Kubernetes servicefrontendServiceName- Name of the frontend service (VOLTO only)variant- Deployment variant (VOLTO or CLASSICUI)siteId- Plone site ID in ZODB (default: ‘Plone’)
Example:
import { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';
new Plone(chart, 'my-plone', {
variant: PloneVariant.VOLTO,
siteId: 'MySite',
backend: {
image: 'plone/plone-backend:6.1.3',
replicas: 3,
},
frontend: {
image: 'plone/plone-frontend:16.0.0',
replicas: 2,
},
});
PloneHttpcache¶
Varnish HTTP caching layer using the kube-httpcache Helm chart. Provides cluster-wide cache invalidation.
Properties:
httpcacheServiceName- Name of the Varnish service
Example:
import { PloneHttpcache } from '@bluedynamics/cdk8s-plone';
new PloneHttpcache(chart, 'cache', {
plone: ploneInstance,
existingSecret: 'varnish-secret',
replicas: 2,
});
Configuration interfaces¶
PloneOptions¶
Main configuration interface for the Plone construct.
Property |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
No |
- |
Version of your project |
|
|
No |
|
Plone site ID in ZODB |
|
|
No |
|
Deployment variant (VOLTO or CLASSICUI) |
|
|
Yes |
- |
Backend configuration |
|
|
Conditional |
- |
Frontend configuration (required for VOLTO) |
|
|
No |
- |
Image pull secrets for private registries |
Example:
const options: PloneOptions = {
version: '1.0.0',
siteId: 'MySite',
variant: PloneVariant.VOLTO,
backend: { /* ... */ },
frontend: { /* ... */ },
imagePullSecrets: ['my-registry-secret'],
};
PloneBaseOptions¶
Configuration for backend or frontend components.
Container configuration¶
Property |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
No |
|
Container image |
|
|
No |
|
Image pull policy |
|
|
No |
|
Number of pod replicas |
|
|
No |
- |
Environment variables (cdk8s-plus-30 |
Example:
import { Env } from 'cdk8s-plus-30';
backend: {
image: 'plone/plone-backend:6.1.3',
replicas: 3,
imagePullPolicy: 'Always',
environment: {
variables: {
SITE: Env.value('MySite'),
DEBUG_MODE: Env.value('off'),
},
},
}
Resource configuration¶
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
CPU request |
|
|
|
CPU limit |
|
|
|
Memory request |
|
|
|
Memory limit |
Example:
backend: {
image: 'plone/plone-backend:6.1.3',
requestCpu: '500m',
limitCpu: '2',
requestMemory: '512Mi',
limitMemory: '2Gi',
}
High availability¶
Property |
Type |
Description |
|---|---|---|
|
|
Minimum pods available during updates (for PodDisruptionBudget). Accepts an absolute number or a percentage string such as |
|
|
Maximum unavailable pods during updates. Accepts an absolute number or a percentage string such as |
Example:
backend: {
image: 'plone/plone-backend:6.1.3',
replicas: 5,
minAvailable: 3, // At least 3 pods must be available during updates
}
Readiness probe¶
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Enable readiness probe |
|
|
|
Seconds before first probe |
|
|
|
Probe timeout |
|
|
|
Probe frequency |
|
|
|
Consecutive successes required |
|
|
|
Consecutive failures before marking unready |
Example:
backend: {
image: 'plone/plone-backend:6.1.3',
readinessEnabled: true,
readinessInitialDelaySeconds: 10,
readinessTimeoutSeconds: 5,
readinessPeriodSeconds: 10,
readinessFailureThreshold: 3,
}
Liveness probe¶
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Enable liveness probe (recommended |
|
|
|
Seconds before first probe |
|
|
|
Probe timeout |
|
|
|
Probe frequency |
|
|
|
Consecutive successes required |
|
|
|
Consecutive failures before restart |
Example:
frontend: {
image: 'plone/plone-frontend:16.0.0',
livenessEnabled: true, // Recommended for frontend
livenessInitialDelaySeconds: 30,
livenessTimeoutSeconds: 5,
livenessPeriodSeconds: 30,
livenessFailureThreshold: 3,
}
Annotations¶
Property |
Type |
Description |
|---|---|---|
|
|
Deployment metadata annotations |
|
|
Pod template annotations (e.g., for Prometheus) |
|
|
Service annotations (e.g., for external-dns) |
Example:
backend: {
image: 'plone/plone-backend:6.1.3',
podAnnotations: {
'prometheus.io/scrape': 'true',
'prometheus.io/port': '8080',
},
serviceAnnotations: {
'external-dns.alpha.kubernetes.io/hostname': 'backend.example.com',
},
}
Prometheus monitoring¶
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Create a Prometheus |
|
|
main service port |
Service port name or number that exposes metrics. |
|
|
|
HTTP path the Prometheus scraper requests. |
You must instrument the backend or frontend container to expose metrics at the configured endpoint. For step-by-step setup, see Enable Prometheus monitoring.
Example:
backend: {
image: 'plone/plone-backend:6.1.3',
servicemonitor: true,
metricsPath: '/metrics',
},
frontend: {
image: 'plone/plone-frontend:16.0.0',
servicemonitor: true,
metricsPort: 9090,
}
Scheduling¶
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
- |
Constrain pods to nodes whose labels match all entries. |
For tainted nodes and taint-based scheduling, see Schedule pods to specific nodes.
Example:
backend: {
image: 'plone/plone-backend:6.1.3',
nodeSelector: {
'topology.kubernetes.io/region': 'fsn1',
},
}
Security context¶
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
- |
Container security settings (capabilities, UID/GID, read-only root, privilege escalation). |
PloneSecurityContext fields:
Property |
Type |
Description |
|---|---|---|
|
|
Linux capabilities to add or drop. |
|
|
Run the container as this UID. |
|
|
Run the container as this GID. |
|
|
Require the container to run as non-root. |
|
|
Mount the root filesystem read-only. |
|
|
Allow the process to gain more privileges than its parent. |
|
|
Run the container in privileged mode. |
PloneCapabilities fields:
Property |
Type |
Description |
|---|---|---|
|
|
Capabilities to add (e.g., |
|
|
Capabilities to drop (e.g., |
For a hardening walk-through, see Configure security context.
Example:
backend: {
image: 'plone/plone-backend:6.1.3',
securityContext: {
runAsNonRoot: true,
runAsUser: 500,
readOnlyRootFilesystem: true,
allowPrivilegeEscalation: false,
capabilities: {
drop: ['ALL'],
},
},
}
PloneHttpcacheOptions¶
Configuration for the Varnish HTTP cache layer.
Property |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
Yes |
- |
Plone construct to attach cache to |
|
|
No |
- |
VCL configuration as string. Takes precedence over |
|
|
No |
built-in |
Path to a VCL template file |
|
|
No |
- |
Kubernetes secret for Varnish admin credentials |
|
|
No |
|
Number of Varnish replicas |
|
|
No |
|
CPU request |
|
|
No |
|
CPU limit |
|
|
No |
|
Memory request |
|
|
No |
|
Memory limit |
|
|
No |
|
Enable Prometheus |
|
|
No |
|
Enable Prometheus exporter sidecar |
|
|
No |
chart latest |
kube-httpcache Helm chart version |
|
|
No |
matches |
kube-httpcache container image tag |
|
|
No |
- |
Additional env vars for the kube-httpcache container |
|
|
No |
- |
Pod tolerations for tainted nodes |
HttpcacheEnvVar fields:
Property |
Type |
Description |
|---|---|---|
|
|
Environment variable name |
|
|
Environment variable value |
HttpcacheToleration fields:
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
- |
Taint key to tolerate |
|
|
|
|
|
|
- |
Taint value (required for |
|
|
- |
|
Example:
new PloneHttpcache(chart, 'cache', {
plone: ploneInstance,
existingSecret: 'varnish-secret',
replicas: 3,
requestCpu: '250m',
limitCpu: '1',
requestMemory: '256Mi',
limitMemory: '1Gi',
servicemonitor: true,
exporterEnabled: true,
});
VCL Configuration:
// Inline VCL
new PloneHttpcache(chart, 'cache', {
plone: ploneInstance,
varnishVcl: `
vcl 4.1;
backend default {
.host = "backend-service";
.port = "8080";
}
`,
});
// VCL from file
new PloneHttpcache(chart, 'cache', {
plone: ploneInstance,
varnishVclFile: './varnish/default.vcl',
});
Extra Environment Variables:
Pass additional environment variables to the kube-httpcache container.
These are appended to the built-in env vars (BACKEND_SERVICE_NAME, BACKEND_SERVICE_PORT, BACKEND_SITE_ID, FRONTEND_SERVICE_NAME, FRONTEND_SERVICE_PORT) and can be referenced in VCL templates using Go template syntax {{ .Env.VAR_NAME }}.
new PloneHttpcache(chart, 'cache', {
plone: ploneInstance,
varnishVclFile: './config/custom-varnish.tpl.vcl',
extraEnvVars: [
{ name: 'THUMBOR_SERVICE_NAME', value: 'my-thumbor-service' },
],
});
PloneVinylCacheOptions¶
Configuration for the Varnish HTTP cache layer via the cloud-vinyl operator. Requires the cloud-vinyl operator to be installed in the cluster.
Property |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
Yes |
- |
Plone construct to attach cache to |
|
|
No |
|
Container image for the Varnish pods |
|
|
No |
|
Number of Varnish replicas |
|
|
No |
|
CPU request |
|
|
No |
|
CPU limit |
|
|
No |
|
Memory request |
|
|
No |
|
Memory limit |
|
|
No |
- |
Varnish storage backends. If omitted, the operator falls back to the varnishd default (~100 MB malloc), which is almost always too small. |
|
|
No |
- |
Additional backends appended after the auto-generated Plone backends. |
|
|
No |
|
Director type: |
|
|
No |
operator default ( |
Shard director: value to hash ( |
|
|
No |
operator default ( |
Shard director: backend health requirement ( |
|
|
No |
operator default ( |
Shard director: ramp-up window for newly added backends. |
|
|
No |
operator default ( |
Shard director: Ketama replicas per backend. |
|
|
No |
built-in |
Custom VCL snippet for |
|
|
No |
built-in |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
- |
Custom VCL snippet for |
|
|
No |
|
Enable PURGE/BAN/xkey cache invalidation |
|
|
No |
|
Enable Prometheus metrics and |
|
|
No |
- |
Pod tolerations for tainted nodes |
|
|
No |
- |
Constrain Varnish pods to nodes matching all labels. |
VinylCacheStorage fields:
Property |
Type |
Required |
Description |
|---|---|---|---|
|
|
Yes |
Internal storage identifier (must match |
|
|
Yes |
Storage backend type |
|
|
Yes |
Kubernetes resource quantity (e.g. |
|
|
for |
Filesystem path for file-type storage |
VinylCacheBackend fields:
Property |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
Yes |
- |
VCL identifier (must match |
|
|
Yes |
- |
Kubernetes Service name to use as backend |
|
|
Yes |
- |
Service port |
|
|
No |
- |
Health probe configuration |
|
|
No |
operator default |
Relative weight in the director. |
VinylCacheBackendProbe fields:
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
URL to probe |
|
|
|
Probe interval |
|
|
|
Probe timeout |
|
|
|
Number of recent probes evaluated |
|
|
|
Healthy threshold within the window |
|
|
|
Expected HTTP status code |
VinylCacheToleration fields:
Property |
Type |
Default |
Description |
|---|---|---|---|
|
|
- |
Taint key to tolerate |
|
|
|
|
|
|
- |
Taint value (required for |
|
|
- |
|
Example:
const cache = new PloneVinylCache(chart, 'cache', {
plone: ploneInstance,
replicas: 2,
requestCpu: '200m',
limitCpu: '1',
requestMemory: '256Mi',
limitMemory: '1Gi',
monitoring: true,
});
// Use the service name for IngressRoute
console.log(cache.vinylCacheServiceName);
Custom VCL Snippets:
new PloneVinylCache(chart, 'cache', {
plone: ploneInstance,
vclRecvSnippet: `
// Custom routing logic
if (req.url ~ "^/api/") {
set req.backend_hint = plone_backend.backend();
}
`,
});
Storage sizing:
new PloneVinylCache(chart, 'cache', {
plone: ploneInstance,
limitMemory: '2Gi',
storage: [
{ name: 's0', type: 'malloc', size: '1500M' },
],
});
Without an explicit storage entry, varnishd runs with its stock default (~100 MB malloc) regardless of the container’s memory limit. Size malloc storage below the pod’s memory limit to leave headroom for varnishd overhead and transient allocations.
vs PloneHttpcache:
PloneHttpcachedeploys Varnish via mittwald Helm chart (self-contained, no operator needed)PloneVinylCachecreates a VinylCache CR managed by the cloud-vinyl operator (requires operator in cluster)VinylCache provides structured VCL generation, agent-based config delivery, and built-in invalidation proxy
PloneVariant enum¶
Defines the deployment variant:
Value |
Description |
|---|---|
|
Modern React frontend with REST API backend (default) |
|
Traditional server-side rendered Plone |
Example:
import { PloneVariant } from '@bluedynamics/cdk8s-plone';
// Volto (modern)
variant: PloneVariant.VOLTO
// Classic UI
variant: PloneVariant.CLASSICUI
Complete example¶
import { App, Chart } from 'cdk8s';
import { Plone, PloneVariant, PloneHttpcache } from '@bluedynamics/cdk8s-plone';
import { Env } from 'cdk8s-plus-30';
const app = new App();
const chart = new Chart(app, 'PloneDeployment');
const plone = new Plone(chart, 'my-plone', {
version: '1.0.0',
siteId: 'MySite',
variant: PloneVariant.VOLTO,
imagePullSecrets: ['registry-secret'],
backend: {
image: 'plone/plone-backend:6.1.3',
replicas: 3,
requestCpu: '500m',
limitCpu: '2',
requestMemory: '512Mi',
limitMemory: '2Gi',
minAvailable: 2,
readinessEnabled: true,
readinessInitialDelaySeconds: 10,
environment: {
variables: {
SITE: Env.value('MySite'),
},
},
podAnnotations: {
'prometheus.io/scrape': 'true',
},
},
frontend: {
image: 'plone/plone-frontend:16.0.0',
replicas: 2,
requestCpu: '250m',
limitCpu: '1',
requestMemory: '256Mi',
limitMemory: '1Gi',
livenessEnabled: true,
livenessInitialDelaySeconds: 30,
},
});
new PloneHttpcache(chart, 'cache', {
plone: plone,
existingSecret: 'varnish-secret',
replicas: 2,
requestCpu: '250m',
requestMemory: '256Mi',
servicemonitor: true,
});
app.synth();
See also¶
Quick start — Get started guide
Deploy production Volto example — Production-ready Volto deployment
Deploy Classic UI example — Classic UI deployment
Deploy with cloud-vinyl cache —
PloneVinylCachewalk-throughEnable Prometheus monitoring — Wire up
ServiceMonitorConfigure security context — Harden backend and frontend pods
Schedule pods to specific nodes —
nodeSelectorandtolerations