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 |
|---|---|---|---|---|
|
|
Yes |
- |
Container image (e.g., ‘plone/plone-backend:6.1.3’) |
|
|
No |
|
Image pull policy |
|
|
No |
|
Number of pod replicas |
|
|
No |
- |
Environment variables (cdk8s-plus-30.Env) |
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 |
Description |
|---|---|---|
|
|
CPU request (e.g., ‘500m’, ‘1’) |
|
|
CPU limit |
|
|
Memory request (e.g., ‘512Mi’, ‘1Gi’) |
|
|
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) |
|
|
Maximum unavailable pods during updates |
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',
},
}
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 |
|
|
No |
- |
Path to VCL configuration 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 ServiceMonitor |
|
|
No |
|
Enable Prometheus exporter sidecar |
|
|
No |
latest |
kube-httpcache Helm chart version |
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',
});
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¶
API Documentation - Complete API reference
Quick Start Tutorial - Get started guide
Scale Resources - How to adjust resources
Configure Monitoring - Prometheus setup