@bluedynamics/cdk8s-plone 0.1.40 → 0.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.jsii +294 -28
  2. package/API.md +225 -10
  3. package/CLAUDE.md +1 -1
  4. package/README.md +4 -4
  5. package/docs/superpowers/plans/2026-06-12-configurable-service-spec.md +608 -0
  6. package/docs/superpowers/specs/2026-06-12-configurable-service-spec-design.md +192 -0
  7. package/documentation/sources/explanation/architecture.md +7 -6
  8. package/documentation/sources/explanation/features.md +9 -7
  9. package/documentation/sources/how-to/{deploy-classic-ui.md → deploy-blicca.md} +43 -39
  10. package/documentation/sources/how-to/deploy-production-volto.md +1 -1
  11. package/documentation/sources/how-to/index.md +1 -1
  12. package/documentation/sources/reference/api/index.md +1 -1
  13. package/documentation/sources/reference/configuration-options.md +55 -11
  14. package/documentation/sources/tutorials/01-quick-start.md +1 -1
  15. package/examples/{classic-ui → blicca}/README.md +24 -25
  16. package/examples/{classic-ui → blicca}/__snapshots__/main.test.ts.snap +3 -3
  17. package/examples/{classic-ui → blicca}/config/varnish.tpl.vcl +1 -1
  18. package/examples/{classic-ui → blicca}/main.test.ts +3 -3
  19. package/examples/{classic-ui → blicca}/main.ts +6 -6
  20. package/examples/{classic-ui → blicca}/package.json +2 -2
  21. package/lib/httpcache.js +1 -1
  22. package/lib/index.d.ts +1 -0
  23. package/lib/index.js +1 -1
  24. package/lib/plone.d.ts +23 -5
  25. package/lib/plone.js +22 -8
  26. package/lib/service.d.ts +81 -0
  27. package/lib/service.js +24 -6
  28. package/lib/vinylcache.js +1 -1
  29. package/package.json +1 -1
  30. /package/examples/{classic-ui → blicca}/.env.example +0 -0
  31. /package/examples/{classic-ui → blicca}/cdk8s.yaml +0 -0
  32. /package/examples/{classic-ui → blicca}/ingress.ts +0 -0
  33. /package/examples/{classic-ui → blicca}/jest.config.js +0 -0
  34. /package/examples/{classic-ui → blicca}/postgres.bitnami.ts +0 -0
  35. /package/examples/{classic-ui → blicca}/postgres.cloudnativepg.ts +0 -0
package/API.md CHANGED
@@ -12,8 +12,8 @@ This construct creates all necessary Kubernetes resources for running Plone:
12
12
  - Optional PodDisruptionBudget for high availability
13
13
 
14
14
  Supports two deployment variants:
15
- - VOLTO: Modern React frontend with REST API backend (default)
16
- - CLASSICUI: Traditional server-side rendered Plone
15
+ - VOLTO: React single-page frontend talking to the REST API backend (default)
16
+ - BLICCA: the Plone backend renders the UI server-side and serves HTML directly
17
17
 
18
18
  *Example*
19
19
 
@@ -150,7 +150,7 @@ Any object.
150
150
  | <code><a href="#@bluedynamics/cdk8s-plone.Plone.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
151
151
  | <code><a href="#@bluedynamics/cdk8s-plone.Plone.property.backendServiceName">backendServiceName</a></code> | <code>string</code> | Name of the backend Kubernetes service. |
152
152
  | <code><a href="#@bluedynamics/cdk8s-plone.Plone.property.siteId">siteId</a></code> | <code>string</code> | The Plone site ID in ZODB. |
153
- | <code><a href="#@bluedynamics/cdk8s-plone.Plone.property.variant">variant</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.PloneVariant">PloneVariant</a></code> | The deployment variant being used (VOLTO or CLASSICUI). |
153
+ | <code><a href="#@bluedynamics/cdk8s-plone.Plone.property.variant">variant</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.PloneVariant">PloneVariant</a></code> | The deployment variant being used (VOLTO or BLICCA). |
154
154
  | <code><a href="#@bluedynamics/cdk8s-plone.Plone.property.frontendServiceName">frontendServiceName</a></code> | <code>string</code> | Name of the frontend Kubernetes service. |
155
155
 
156
156
  ---
@@ -201,7 +201,7 @@ public readonly variant: PloneVariant;
201
201
 
202
202
  - *Type:* <a href="#@bluedynamics/cdk8s-plone.PloneVariant">PloneVariant</a>
203
203
 
204
- The deployment variant being used (VOLTO or CLASSICUI).
204
+ The deployment variant being used (VOLTO or BLICCA).
205
205
 
206
206
  ---
207
207
 
@@ -727,6 +727,7 @@ const ploneBaseOptions: PloneBaseOptions = { ... }
727
727
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.requestCpu">requestCpu</a></code> | <code>string</code> | CPU request for the container. |
728
728
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.requestMemory">requestMemory</a></code> | <code>string</code> | Memory request for the container. |
729
729
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.securityContext">securityContext</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.PloneSecurityContext">PloneSecurityContext</a></code> | Security context for the container. |
730
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.service">service</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec">PloneServiceSpec</a></code> | Service configuration: type, trafficDistribution, sessionAffinity, annotations/labels, and a raw `overrides` escape hatch for any other ServiceSpec field. |
730
731
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.serviceAnnotations">serviceAnnotations</a></code> | <code>{[ key: string ]: string}</code> | Annotations to add to the Service metadata. |
731
732
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.servicemonitor">servicemonitor</a></code> | <code>boolean</code> | Enable Prometheus ServiceMonitor for metrics collection. |
732
733
 
@@ -1182,7 +1183,31 @@ Use to set capabilities, run as non-root, read-only filesystem, etc.
1182
1183
  ```
1183
1184
 
1184
1185
 
1185
- ##### `serviceAnnotations`<sup>Optional</sup> <a name="serviceAnnotations" id="@bluedynamics/cdk8s-plone.PloneBaseOptions.property.serviceAnnotations"></a>
1186
+ ##### `service`<sup>Optional</sup> <a name="service" id="@bluedynamics/cdk8s-plone.PloneBaseOptions.property.service"></a>
1187
+
1188
+ ```typescript
1189
+ public readonly service: PloneServiceSpec;
1190
+ ```
1191
+
1192
+ - *Type:* <a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec">PloneServiceSpec</a>
1193
+ - *Default:* construct-managed defaults only
1194
+
1195
+ Service configuration: type, trafficDistribution, sessionAffinity, annotations/labels, and a raw `overrides` escape hatch for any other ServiceSpec field.
1196
+
1197
+ Applies to this component's Service.
1198
+
1199
+ ---
1200
+
1201
+ *Example*
1202
+
1203
+ ```typescript
1204
+ { type: 'LoadBalancer', trafficDistribution: 'PreferClose' }
1205
+ ```
1206
+
1207
+
1208
+ ##### ~~`serviceAnnotations`~~<sup>Optional</sup> <a name="serviceAnnotations" id="@bluedynamics/cdk8s-plone.PloneBaseOptions.property.serviceAnnotations"></a>
1209
+
1210
+ - *Deprecated:* use `service.annotations` instead
1186
1211
 
1187
1212
  ```typescript
1188
1213
  public readonly serviceAnnotations: {[ key: string ]: string};
@@ -1761,6 +1786,184 @@ Run the container as a specific user ID.
1761
1786
 
1762
1787
  ---
1763
1788
 
1789
+ ### PloneServiceSpec <a name="PloneServiceSpec" id="@bluedynamics/cdk8s-plone.PloneServiceSpec"></a>
1790
+
1791
+ Configuration for the generated Kubernetes Service spec.
1792
+
1793
+ Curated fields cover the common cases; use `overrides` as an escape hatch
1794
+ for any other `ServiceSpec` field. `overrides` has the highest precedence and
1795
+ can override every field, including the construct-managed `ports`/`selector`
1796
+ (at your own risk).
1797
+
1798
+ #### Initializer <a name="Initializer" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.Initializer"></a>
1799
+
1800
+ ```typescript
1801
+ import { PloneServiceSpec } from '@bluedynamics/cdk8s-plone'
1802
+
1803
+ const ploneServiceSpec: PloneServiceSpec = { ... }
1804
+ ```
1805
+
1806
+ #### Properties <a name="Properties" id="Properties"></a>
1807
+
1808
+ | **Name** | **Type** | **Description** |
1809
+ | --- | --- | --- |
1810
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.annotations">annotations</a></code> | <code>{[ key: string ]: string}</code> | Annotations to add to the Service metadata. |
1811
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.externalTrafficPolicy">externalTrafficPolicy</a></code> | <code>string</code> | External traffic policy, 'Cluster' \| 'Local'. |
1812
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.internalTrafficPolicy">internalTrafficPolicy</a></code> | <code>string</code> | Internal traffic policy, 'Cluster' \| 'Local'. |
1813
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.labels">labels</a></code> | <code>{[ key: string ]: string}</code> | Extra labels to add to the Service metadata. |
1814
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.loadBalancerClass">loadBalancerClass</a></code> | <code>string</code> | Load balancer implementation class. |
1815
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.loadBalancerSourceRanges">loadBalancerSourceRanges</a></code> | <code>string[]</code> | Source IP ranges allowed to access a LoadBalancer service. |
1816
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.overrides">overrides</a></code> | <code>{[ key: string ]: any}</code> | Raw ServiceSpec overrides as a free-form map (e.g. `{ ipFamilyPolicy: 'PreferDualStack' }`). Highest precedence — merged on top of all curated fields and the construct-managed base. Use for any ServiceSpec field not covered above. Keys and values are passed through to the Service spec verbatim and are not validated by this construct. |
1817
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.publishNotReadyAddresses">publishNotReadyAddresses</a></code> | <code>boolean</code> | Publish not-ready addresses (e.g. for headless services with StatefulSets). |
1818
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.sessionAffinity">sessionAffinity</a></code> | <code>string</code> | Session affinity, 'ClientIP' \| 'None'. |
1819
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.trafficDistribution">trafficDistribution</a></code> | <code>string</code> | Traffic distribution preference, e.g. 'PreferClose' for topology-aware routing. |
1820
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.type">type</a></code> | <code>string</code> | Service type, e.g. ClusterIP \| NodePort \| LoadBalancer \| ExternalName. |
1821
+
1822
+ ---
1823
+
1824
+ ##### `annotations`<sup>Optional</sup> <a name="annotations" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.annotations"></a>
1825
+
1826
+ ```typescript
1827
+ public readonly annotations: {[ key: string ]: string};
1828
+ ```
1829
+
1830
+ - *Type:* {[ key: string ]: string}
1831
+ - *Default:* none
1832
+
1833
+ Annotations to add to the Service metadata.
1834
+
1835
+ ---
1836
+
1837
+ ##### `externalTrafficPolicy`<sup>Optional</sup> <a name="externalTrafficPolicy" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.externalTrafficPolicy"></a>
1838
+
1839
+ ```typescript
1840
+ public readonly externalTrafficPolicy: string;
1841
+ ```
1842
+
1843
+ - *Type:* string
1844
+ - *Default:* Cluster (Kubernetes default)
1845
+
1846
+ External traffic policy, 'Cluster' | 'Local'.
1847
+
1848
+ ---
1849
+
1850
+ ##### `internalTrafficPolicy`<sup>Optional</sup> <a name="internalTrafficPolicy" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.internalTrafficPolicy"></a>
1851
+
1852
+ ```typescript
1853
+ public readonly internalTrafficPolicy: string;
1854
+ ```
1855
+
1856
+ - *Type:* string
1857
+ - *Default:* Cluster (Kubernetes default)
1858
+
1859
+ Internal traffic policy, 'Cluster' | 'Local'.
1860
+
1861
+ ---
1862
+
1863
+ ##### `labels`<sup>Optional</sup> <a name="labels" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.labels"></a>
1864
+
1865
+ ```typescript
1866
+ public readonly labels: {[ key: string ]: string};
1867
+ ```
1868
+
1869
+ - *Type:* {[ key: string ]: string}
1870
+ - *Default:* none
1871
+
1872
+ Extra labels to add to the Service metadata.
1873
+
1874
+ ---
1875
+
1876
+ ##### `loadBalancerClass`<sup>Optional</sup> <a name="loadBalancerClass" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.loadBalancerClass"></a>
1877
+
1878
+ ```typescript
1879
+ public readonly loadBalancerClass: string;
1880
+ ```
1881
+
1882
+ - *Type:* string
1883
+ - *Default:* none
1884
+
1885
+ Load balancer implementation class.
1886
+
1887
+ ---
1888
+
1889
+ ##### `loadBalancerSourceRanges`<sup>Optional</sup> <a name="loadBalancerSourceRanges" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.loadBalancerSourceRanges"></a>
1890
+
1891
+ ```typescript
1892
+ public readonly loadBalancerSourceRanges: string[];
1893
+ ```
1894
+
1895
+ - *Type:* string[]
1896
+ - *Default:* none
1897
+
1898
+ Source IP ranges allowed to access a LoadBalancer service.
1899
+
1900
+ ---
1901
+
1902
+ ##### `overrides`<sup>Optional</sup> <a name="overrides" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.overrides"></a>
1903
+
1904
+ ```typescript
1905
+ public readonly overrides: {[ key: string ]: any};
1906
+ ```
1907
+
1908
+ - *Type:* {[ key: string ]: any}
1909
+ - *Default:* none
1910
+
1911
+ Raw ServiceSpec overrides as a free-form map (e.g. `{ ipFamilyPolicy: 'PreferDualStack' }`). Highest precedence — merged on top of all curated fields and the construct-managed base. Use for any ServiceSpec field not covered above. Keys and values are passed through to the Service spec verbatim and are not validated by this construct.
1912
+
1913
+ ---
1914
+
1915
+ ##### `publishNotReadyAddresses`<sup>Optional</sup> <a name="publishNotReadyAddresses" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.publishNotReadyAddresses"></a>
1916
+
1917
+ ```typescript
1918
+ public readonly publishNotReadyAddresses: boolean;
1919
+ ```
1920
+
1921
+ - *Type:* boolean
1922
+ - *Default:* false
1923
+
1924
+ Publish not-ready addresses (e.g. for headless services with StatefulSets).
1925
+
1926
+ ---
1927
+
1928
+ ##### `sessionAffinity`<sup>Optional</sup> <a name="sessionAffinity" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.sessionAffinity"></a>
1929
+
1930
+ ```typescript
1931
+ public readonly sessionAffinity: string;
1932
+ ```
1933
+
1934
+ - *Type:* string
1935
+ - *Default:* None (Kubernetes default)
1936
+
1937
+ Session affinity, 'ClientIP' | 'None'.
1938
+
1939
+ ---
1940
+
1941
+ ##### `trafficDistribution`<sup>Optional</sup> <a name="trafficDistribution" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.trafficDistribution"></a>
1942
+
1943
+ ```typescript
1944
+ public readonly trafficDistribution: string;
1945
+ ```
1946
+
1947
+ - *Type:* string
1948
+ - *Default:* none
1949
+
1950
+ Traffic distribution preference, e.g. 'PreferClose' for topology-aware routing.
1951
+
1952
+ ---
1953
+
1954
+ ##### `type`<sup>Optional</sup> <a name="type" id="@bluedynamics/cdk8s-plone.PloneServiceSpec.property.type"></a>
1955
+
1956
+ ```typescript
1957
+ public readonly type: string;
1958
+ ```
1959
+
1960
+ - *Type:* string
1961
+ - *Default:* ClusterIP (Kubernetes default)
1962
+
1963
+ Service type, e.g. ClusterIP | NodePort | LoadBalancer | ExternalName.
1964
+
1965
+ ---
1966
+
1764
1967
  ### PloneVinylCacheOptions <a name="PloneVinylCacheOptions" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions"></a>
1765
1968
 
1766
1969
  Configuration options for PloneVinylCache (cloud-vinyl operator).
@@ -2632,25 +2835,37 @@ Plone deployment variants.
2632
2835
 
2633
2836
  | **Name** | **Description** |
2634
2837
  | --- | --- |
2635
- | <code><a href="#@bluedynamics/cdk8s-plone.PloneVariant.VOLTO">VOLTO</a></code> | Volto variant: ReactJS frontend (Volto) with REST API backend. |
2636
- | <code><a href="#@bluedynamics/cdk8s-plone.PloneVariant.CLASSICUI">CLASSICUI</a></code> | Classic UI variant: Traditional Plone with server-side rendering. |
2838
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVariant.VOLTO">VOLTO</a></code> | Volto variant: ReactJS single-page frontend (Volto) talking to the Plone REST API. |
2839
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVariant.BLICCA">BLICCA</a></code> | Blicca variant: the Plone backend renders the UI server-side and serves the HTML directly. |
2840
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVariant.CLASSICUI">CLASSICUI</a></code> | Deprecated alias for the Blicca variant (formerly "Classic UI"). |
2637
2841
 
2638
2842
  ---
2639
2843
 
2640
2844
  ##### `VOLTO` <a name="VOLTO" id="@bluedynamics/cdk8s-plone.PloneVariant.VOLTO"></a>
2641
2845
 
2642
- Volto variant: ReactJS frontend (Volto) with REST API backend.
2846
+ Volto variant: ReactJS single-page frontend (Volto) talking to the Plone REST API.
2643
2847
 
2644
2848
  Deploys both frontend and backend services.
2645
2849
 
2646
2850
  ---
2647
2851
 
2648
2852
 
2649
- ##### `CLASSICUI` <a name="CLASSICUI" id="@bluedynamics/cdk8s-plone.PloneVariant.CLASSICUI"></a>
2853
+ ##### `BLICCA` <a name="BLICCA" id="@bluedynamics/cdk8s-plone.PloneVariant.BLICCA"></a>
2650
2854
 
2651
- Classic UI variant: Traditional Plone with server-side rendering.
2855
+ Blicca variant: the Plone backend renders the UI server-side and serves the HTML directly.
2652
2856
 
2653
2857
  Deploys only the backend service.
2654
2858
 
2655
2859
  ---
2656
2860
 
2861
+
2862
+ ##### ~~`CLASSICUI`~~ <a name="CLASSICUI" id="@bluedynamics/cdk8s-plone.PloneVariant.CLASSICUI"></a>
2863
+
2864
+ - *Deprecated:* Renamed to {@link BLICCA }. Kept for backward compatibility and selects the
2865
+ same backend-only deployment. Existing configuration using `CLASSICUI` (or the literal
2866
+ value `'classicui'`) keeps working unchanged. Will be removed in a future major release.
2867
+
2868
+ Deprecated alias for the Blicca variant (formerly "Classic UI").
2869
+
2870
+ ---
2871
+
package/CLAUDE.md CHANGED
@@ -4,7 +4,7 @@ This document provides context and guidelines for Claude Code when working on th
4
4
 
5
5
  ## Project Overview
6
6
 
7
- **cdk8s-plone** is a TypeScript/Python library for deploying Plone CMS to Kubernetes using CDK8S constructs. It provides type-safe infrastructure as code with support for Volto (React frontend) and Classic UI deployments.
7
+ **cdk8s-plone** is a TypeScript/Python library for deploying Plone CMS to Kubernetes using CDK8S constructs. It provides type-safe infrastructure as code with support for Volto (React frontend) and Blicca (server-side rendered, formerly Classic UI) deployments.
8
8
 
9
9
  ## Git Workflow
10
10
 
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  cdk8s-plone provides CDK8S constructs for deploying [Plone CMS](https://plone.org/) on Kubernetes. Define your infrastructure using TypeScript or Python and generate Kubernetes manifests automatically.
12
12
 
13
13
  **Key Features:**
14
- - 🚀 Supports Volto (modern React frontend) and Classic UI
14
+ - 🚀 Supports Volto (React frontend) and Blicca (formerly Classic UI)
15
15
  - 📦 High availability with configurable replicas
16
16
  - ⚡ Optional Varnish HTTP caching via kube-httpcache (`PloneHttpcache`) or cloud-vinyl VinylCache operator (`PloneVinylCache`)
17
17
  - 🔧 Fine-grained resource and probe configuration
@@ -75,14 +75,14 @@ kubectl apply -f dist/
75
75
 
76
76
  Complete working examples are available in the [`examples/`](examples/) directory:
77
77
 
78
- - **[Production Volto](examples/production-volto/)** - Production-ready Plone 6 deployment with modern UI:
78
+ - **[Production Volto](examples/production-volto/)** - Production-ready Plone 6 deployment with the React single-page frontend:
79
79
  - Volto frontend (React) + REST API backend
80
80
  - PostgreSQL with RelStorage (CloudNativePG or Bitnami)
81
81
  - Varnish HTTP caching with kube-httpcache
82
82
  - Ingress support (Traefik/Kong) with TLS
83
83
 
84
- - **[Classic UI](examples/classic-ui/)** - Traditional Plone deployment with server-side rendering:
85
- - Classic UI (traditional Plone interface)
84
+ - **[Blicca](examples/blicca/)** - Plone deployment with server-side rendering (formerly Classic UI):
85
+ - Blicca (backend renders the UI, no separate frontend)
86
86
  - PostgreSQL with RelStorage (CloudNativePG or Bitnami)
87
87
  - Varnish HTTP caching with kube-httpcache
88
88
  - Ingress support (Traefik/Kong) with TLS