API Reference¶
Complete API reference for cdk8s-plone constructs, generated from TypeScript source code.
Overview¶
The cdk8s-plone library provides the following main constructs:
Plone: Main construct for deploying Plone CMS with support for both Volto (React frontend) and Classic UI variants
PloneHttpcache: HTTP caching layer using Varnish for improved performance
Language Support¶
This API documentation shows TypeScript usage examples. The library is also available for Python via JSII transpilation:
TypeScript/JavaScript:
@bluedynamics/cdk8s-ploneon npmPython:
cdk8s-ploneon PyPI
For Python-specific usage, the API remains the same but follows Python naming conventions (snake_case instead of camelCase).
Constructs ¶
Plone ¶
Plone construct for deploying Plone CMS to Kubernetes.
This construct creates all necessary Kubernetes resources for running Plone:
Deployment(s) for backend (and optionally frontend)
Service(s) for network access
Optional PodDisruptionBudget for high availability
Supports two deployment variants:
VOLTO: Modern React frontend with REST API backend (default)
CLASSICUI: Traditional server-side rendered Plone
Example
new Plone(chart, 'my-plone', {
variant: PloneVariant.VOLTO,
backend: {
image: 'plone/plone-backend:6.0.10',
replicas: 3,
},
frontend: {
image: 'plone/plone-frontend:16.0.0',
},
});
Initializers ¶
import { Plone } from '@bluedynamics/cdk8s-plone'
new Plone(scope: Construct, id: string, options?: PloneOptions)
Name |
Type |
Description |
|---|---|---|
|
No description. |
|
|
No description. |
|
No description. |
scopeRequired ¶
Type: constructs.Construct
idRequired ¶
Type: string
optionsOptional ¶
Type: PloneOptions
Methods ¶
Name |
Description |
|---|---|
Returns a string representation of this construct. |
toString ¶
public toString(): string
Returns a string representation of this construct.
Static Functions ¶
Name |
Description |
|---|---|
Checks if |
isConstruct ¶
import { Plone } from '@bluedynamics/cdk8s-plone'
Plone.isConstruct(x: any)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
Type: any
Any object.
Properties ¶
Name |
Type |
Description |
|---|---|---|
|
The tree node. |
|
|
Name of the backend Kubernetes service. |
|
|
The Plone site ID in ZODB. |
|
The deployment variant being used (VOLTO or CLASSICUI). |
||
|
Name of the frontend Kubernetes service. |
nodeRequired ¶
public readonly node: Node;
Type: constructs.Node
The tree node.
backendServiceNameRequired ¶
public readonly backendServiceName: string;
Type: string
Name of the backend Kubernetes service.
Use this to reference the backend service from other constructs.
siteIdRequired ¶
public readonly siteId: string;
Type: string
The Plone site ID in ZODB.
variantRequired ¶
public readonly variant: PloneVariant;
Type: PloneVariant
The deployment variant being used (VOLTO or CLASSICUI).
frontendServiceNameOptional ¶
public readonly frontendServiceName: string;
Type: string
Name of the frontend Kubernetes service.
Only set when variant is VOLTO, otherwise undefined.
PloneHttpcache ¶
PloneHttpcache construct for deploying Varnish HTTP caching layer.
Uses the mittwald/kube-httpcache Helm chart to deploy Varnish as a caching proxy in front of Plone backend and/or frontend services.
The cache automatically connects to the Plone services and provides HTTP cache invalidation capabilities.
Example
const plone = new Plone(chart, 'plone');
const cache = new PloneHttpcache(chart, 'cache', {
plone: plone,
existingSecret: 'varnish-secret',
});
Initializers ¶
import { PloneHttpcache } from '@bluedynamics/cdk8s-plone'
new PloneHttpcache(scope: Construct, id: string, options: PloneHttpcacheOptions)
Name |
Type |
Description |
|---|---|---|
|
No description. |
|
|
No description. |
|
No description. |
scopeRequired ¶
Type: constructs.Construct
idRequired ¶
Type: string
optionsRequired ¶
Type: PloneHttpcacheOptions
Methods ¶
Name |
Description |
|---|---|
Returns a string representation of this construct. |
toString ¶
public toString(): string
Returns a string representation of this construct.
Static Functions ¶
Name |
Description |
|---|---|
Checks if |
isConstruct ¶
import { PloneHttpcache } from '@bluedynamics/cdk8s-plone'
PloneHttpcache.isConstruct(x: any)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
Type: any
Any object.
Properties ¶
Name |
Type |
Description |
|---|---|---|
|
The tree node. |
|
|
Name of the Varnish service created by the Helm chart. |
nodeRequired ¶
public readonly node: Node;
Type: constructs.Node
The tree node.
httpcacheServiceNameRequired ¶
public readonly httpcacheServiceName: string;
Type: string
Name of the Varnish service created by the Helm chart.
Use this to reference the cache service from ingress or other constructs.
Structs ¶
PloneBaseOptions ¶
Base options for Plone backend or frontend configuration.
These options control container image, replica count, resource limits, environment variables, and health probes.
Initializer ¶
import { PloneBaseOptions } from '@bluedynamics/cdk8s-plone'
const ploneBaseOptions: PloneBaseOptions = { ... }
Properties ¶
Name |
Type |
Description |
|---|---|---|
|
Annotations to add to the Deployment metadata. |
|
|
Environment variables to set in the container. |
|
|
Container image to use for the deployment. |
|
|
Image pull policy for the container. |
|
|
CPU limit for the container. |
|
|
Memory limit for the container. |
|
|
Enable liveness probe for the container. |
|
|
Minimum consecutive failures for the liveness probe to be considered failed. |
|
|
Number of seconds after container start before liveness probe is initiated. |
|
|
How often (in seconds) to perform the liveness probe. |
|
|
Minimum consecutive successes for the liveness probe to be considered successful. |
|
|
Number of seconds after which the liveness probe times out. |
|
|
Maximum number of pods that can be unavailable during updates. |
|
|
Path to scrape metrics from. |
|
|
Port name or number to scrape metrics from. |
|
|
Minimum number of pods that must be available during updates. |
|
|
Annotations to add to the Pod template metadata. |
|
|
Enable readiness probe for the container. |
|
|
Minimum consecutive failures for the readiness probe to be considered failed. |
|
|
Number of seconds after container start before readiness probe is initiated. |
|
|
How often (in seconds) to perform the readiness probe. |
|
|
Minimum consecutive successes for the readiness probe to be considered successful. |
|
|
Number of seconds after which the readiness probe times out. |
|
|
Number of pod replicas to run. |
|
|
CPU request for the container. |
|
|
Memory request for the container. |
|
|
Annotations to add to the Service metadata. |
|
|
Enable Prometheus ServiceMonitor for metrics collection. |
annotationsOptional ¶
public readonly annotations: {[ key: string ]: string};
Type: {[ key: string ]: string}
Default: no additional annotations
Annotations to add to the Deployment metadata.
Example
{ 'deployment.kubernetes.io/revision': '1' }
environmentOptional ¶
public readonly environment: Env;
Type: cdk8s-plus-30.Env
Default: undefined (no additional environment variables)
Environment variables to set in the container.
Use cdk8s-plus-30 Env class to define variables and sources.
imageOptional ¶
public readonly image: string;
Type: string
Default: ‘plone/plone-backend:latest’ for backend, ‘plone/plone-frontend:latest’ for frontend
Container image to use for the deployment.
Example
'plone/plone-backend:6.0.10' or 'plone/plone-frontend:16.0.0'
imagePullPolicyOptional ¶
public readonly imagePullPolicy: string;
Type: string
Default: ‘IfNotPresent’
Image pull policy for the container.
limitCpuOptional ¶
public readonly limitCpu: string;
Type: string
Default: ‘500m’ for both backend and frontend
CPU limit for the container.
Example
'500m' or '1' or '2000m'
limitMemoryOptional ¶
public readonly limitMemory: string;
Type: string
Default: ‘512Mi’ for backend, ‘1Gi’ for frontend
Memory limit for the container.
Example
'512Mi' or '1Gi'
livenessEnabledOptional ¶
public readonly livenessEnabled: boolean;
Type: boolean
Default: false
Enable liveness probe for the container.
Liveness probes determine when to restart a container. Recommended: true for frontend, false for backend (Zope has its own recovery).
livenessFailureThresholdOptional ¶
public readonly livenessFailureThreshold: number;
Type: number
Default: 3
Minimum consecutive failures for the liveness probe to be considered failed.
livenessInitialDelaySecondsOptional ¶
public readonly livenessInitialDelaySeconds: number;
Type: number
Default: 30
Number of seconds after container start before liveness probe is initiated.
livenessPeriodSecondsOptional ¶
public readonly livenessPeriodSeconds: number;
Type: number
Default: 10
How often (in seconds) to perform the liveness probe.
livenessSuccessThresholdOptional ¶
public readonly livenessSuccessThreshold: number;
Type: number
Default: 1
Minimum consecutive successes for the liveness probe to be considered successful.
livenessTimeoutSecondsOptional ¶
public readonly livenessTimeoutSeconds: number;
Type: number
Default: 5
Number of seconds after which the liveness probe times out.
metricsPathOptional ¶
public readonly metricsPath: string;
Type: string
Default: ‘/metrics’
Path to scrape metrics from.
Only used when servicemonitor is enabled.
metricsPortOptional ¶
public readonly metricsPort: string | number;
Type: string | number
Default: uses the main service port
Port name or number to scrape metrics from.
Only used when servicemonitor is enabled.
podAnnotationsOptional ¶
public readonly podAnnotations: {[ key: string ]: string};
Type: {[ key: string ]: string}
Default: no additional annotations
Annotations to add to the Pod template metadata.
Common for Prometheus, Istio, backup policies, etc.
Example
{ 'prometheus.io/scrape': 'true', 'prometheus.io/port': '8080' }
readinessEnabledOptional ¶
public readonly readinessEnabled: boolean;
Type: boolean
Default: true
Enable readiness probe for the container.
Readiness probes determine when a container is ready to accept traffic.
readinessFailureThresholdOptional ¶
public readonly readinessFailureThreshold: number;
Type: number
Default: 3
Minimum consecutive failures for the readiness probe to be considered failed.
readinessInitialDelaySecondsOptional ¶
public readonly readinessInitialDelaySeconds: number;
Type: number
Default: 10
Number of seconds after container start before readiness probe is initiated.
readinessPeriodSecondsOptional ¶
public readonly readinessPeriodSeconds: number;
Type: number
Default: 10
How often (in seconds) to perform the readiness probe.
readinessSuccessThresholdOptional ¶
public readonly readinessSuccessThreshold: number;
Type: number
Default: 1
Minimum consecutive successes for the readiness probe to be considered successful.
readinessTimeoutSecondsOptional ¶
public readonly readinessTimeoutSeconds: number;
Type: number
Default: 15
Number of seconds after which the readiness probe times out.
replicasOptional ¶
public readonly replicas: number;
Type: number
Default: 2
Number of pod replicas to run.
requestCpuOptional ¶
public readonly requestCpu: string;
Type: string
Default: ‘200m’
CPU request for the container.
Example
'200m' or '0.5'
requestMemoryOptional ¶
public readonly requestMemory: string;
Type: string
Default: ‘256Mi’
Memory request for the container.
Example
'256Mi' or '512Mi'
serviceAnnotationsOptional ¶
public readonly serviceAnnotations: {[ key: string ]: string};
Type: {[ key: string ]: string}
Default: no additional annotations
Annotations to add to the Service metadata.
Common for external-dns, load balancers, service mesh, etc.
Example
{ 'external-dns.alpha.kubernetes.io/hostname': 'plone.example.com' }
servicemonitorOptional ¶
public readonly servicemonitor: boolean;
Type: boolean
Default: false
Enable Prometheus ServiceMonitor for metrics collection.
Requires Prometheus Operator to be installed in the cluster. When enabled, a ServiceMonitor resource will be created to scrape metrics.
PloneHttpcacheOptions ¶
Configuration options for PloneHttpcache (Varnish caching layer).
Initializer ¶
import { PloneHttpcacheOptions } from '@bluedynamics/cdk8s-plone'
const ploneHttpcacheOptions: PloneHttpcacheOptions = { ... }
Properties ¶
Name |
Type |
Description |
|---|---|---|
The Plone construct to attach the HTTP cache to. |
||
|
Version of the kube-httpcache Container Image to use. |
|
|
Version of the kube-httpcache Helm chart to use. |
|
|
Name of an existing Kubernetes secret containing Varnish admin credentials. |
|
|
Enable the Prometheus exporter for Varnish metrics. |
|
|
CPU limit for Varnish pods. |
|
|
Memory limit for Varnish pods. |
|
|
Number of Varnish pod replicas to run. |
|
|
CPU request for Varnish pods. |
|
|
Memory request for Varnish pods. |
|
|
Enable Prometheus ServiceMonitor for metrics collection. |
|
|
Varnish VCL configuration as a string. |
|
|
Path to a Varnish VCL configuration file. |
ploneRequired ¶
public readonly plone: Plone;
Type: Plone
The Plone construct to attach the HTTP cache to.
The cache will automatically connect to the backend and frontend services.
appVersionOptional ¶
public readonly appVersion: string;
Type: string
Default: undefined (chartVersion = with each chart release there is an image release too )
Version of the kube-httpcache Container Image to use.
If not specified, the latest version from the repository will be used.
chartVersionOptional ¶
public readonly chartVersion: string;
Type: string
Default: undefined (latest)
Version of the kube-httpcache Helm chart to use.
If not specified, the latest version from the repository will be used.
existingSecretOptional ¶
public readonly existingSecret: string;
Type: string
Default: undefined (no existing secret)
Name of an existing Kubernetes secret containing Varnish admin credentials.
The secret should be created separately in the same namespace.
exporterEnabledOptional ¶
public readonly exporterEnabled: boolean;
Type: boolean
Default: true
Enable the Prometheus exporter for Varnish metrics.
When enabled, the exporter sidecar container will be deployed alongside Varnish.
limitCpuOptional ¶
public readonly limitCpu: string;
Type: string
Default: ‘500m’
CPU limit for Varnish pods.
limitMemoryOptional ¶
public readonly limitMemory: string;
Type: string
Default: ‘500Mi’
Memory limit for Varnish pods.
replicasOptional ¶
public readonly replicas: number;
Type: number
Default: 2
Number of Varnish pod replicas to run.
requestCpuOptional ¶
public readonly requestCpu: string;
Type: string
Default: ‘100m’
CPU request for Varnish pods.
requestMemoryOptional ¶
public readonly requestMemory: string;
Type: string
Default: ‘100Mi’
Memory request for Varnish pods.
servicemonitorOptional ¶
public readonly servicemonitor: boolean;
Type: boolean
Default: false
Enable Prometheus ServiceMonitor for metrics collection.
Requires Prometheus Operator to be installed in the cluster.
varnishVclOptional ¶
public readonly varnishVcl: string;
Type: string
Default: loaded from varnishVclFile or default config file
Varnish VCL configuration as a string.
If provided, this takes precedence over varnishVclFile.
varnishVclFileOptional ¶
public readonly varnishVclFile: string;
Type: string
Default: uses default config/varnish.tpl.vcl
Path to a Varnish VCL configuration file.
If not provided, uses the default VCL file included in the library.
PloneOptions ¶
Main configuration options for Plone deployment.
Initializer ¶
import { PloneOptions } from '@bluedynamics/cdk8s-plone'
const ploneOptions: PloneOptions = { ... }
Properties ¶
Name |
Type |
Description |
|---|---|---|
Backend (Plone API) configuration. |
||
Frontend (Volto) configuration. |
||
|
Names of Kubernetes secrets to use for pulling private container images. |
|
|
Plone site ID in the ZODB. |
|
Plone deployment variant to use. |
||
|
Version string for labeling the deployment. |
backendOptional ¶
public readonly backend: PloneBaseOptions;
Type: PloneBaseOptions
Default: {} (uses default values from PloneBaseOptions)
Backend (Plone API) configuration.
frontendOptional ¶
public readonly frontend: PloneBaseOptions;
Type: PloneBaseOptions
Default: {} (uses default values from PloneBaseOptions)
Frontend (Volto) configuration.
Only used when variant is PloneVariant.VOLTO.
imagePullSecretsOptional ¶
public readonly imagePullSecrets: string[];
Type: string[]
Default: [] (no image pull secrets)
Names of Kubernetes secrets to use for pulling private container images.
These secrets must exist in the same namespace as the deployment.
Example
['my-registry-secret']
siteIdOptional ¶
public readonly siteId: string;
Type: string
Default: ‘Plone’
Plone site ID in the ZODB.
This is used to construct the internal API path for Volto frontend.
variantOptional ¶
public readonly variant: PloneVariant;
Type: PloneVariant
Default: PloneVariant.VOLTO
Plone deployment variant to use.
versionOptional ¶
public readonly version: string;
Type: string
Default: ‘undefined’
Version string for labeling the deployment.
This is used in Kubernetes labels and doesn’t affect the actual image versions.
Enums ¶
PloneVariant ¶
Plone deployment variants.
Members ¶
Name |
Description |
|---|---|
Volto variant: ReactJS frontend (Volto) with REST API backend. |
|
Classic UI variant: Traditional Plone with server-side rendering. |
VOLTO ¶
Volto variant: ReactJS frontend (Volto) with REST API backend.
Deploys both frontend and backend services.
CLASSICUI ¶
Classic UI variant: Traditional Plone with server-side rendering.
Deploys only the backend service.
This API reference is automatically generated from the TypeScript source code. For the latest version, run npx projen docgen in the project root.