@bluedynamics/cdk8s-plone 0.1.23 → 0.1.24

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.
package/API.md CHANGED
@@ -389,6 +389,176 @@ Use this to reference the cache service from ingress or other constructs.
389
389
  ---
390
390
 
391
391
 
392
+ ### PloneVinylCache <a name="PloneVinylCache" id="@bluedynamics/cdk8s-plone.PloneVinylCache"></a>
393
+
394
+ PloneVinylCache construct for deploying Varnish Cache via cloud-vinyl operator.
395
+
396
+ Creates a VinylCache custom resource with Plone backend/frontend services
397
+ auto-configured as backends. The cloud-vinyl operator manages the full
398
+ Varnish lifecycle including VCL generation, agent delivery, and monitoring.
399
+
400
+ Requires the cloud-vinyl operator to be installed in the cluster.
401
+
402
+ *Example*
403
+
404
+ ```typescript
405
+ const plone = new Plone(chart, 'plone');
406
+ const cache = new PloneVinylCache(chart, 'cache', {
407
+ plone: plone,
408
+ replicas: 2,
409
+ });
410
+ // Use cache.vinylCacheServiceName for IngressRoute
411
+ ```
412
+
413
+
414
+ #### Initializers <a name="Initializers" id="@bluedynamics/cdk8s-plone.PloneVinylCache.Initializer"></a>
415
+
416
+ ```typescript
417
+ import { PloneVinylCache } from '@bluedynamics/cdk8s-plone'
418
+
419
+ new PloneVinylCache(scope: Construct, id: string, options: PloneVinylCacheOptions)
420
+ ```
421
+
422
+ | **Name** | **Type** | **Description** |
423
+ | --- | --- | --- |
424
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
425
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
426
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.Initializer.parameter.options">options</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions">PloneVinylCacheOptions</a></code> | *No description.* |
427
+
428
+ ---
429
+
430
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@bluedynamics/cdk8s-plone.PloneVinylCache.Initializer.parameter.scope"></a>
431
+
432
+ - *Type:* constructs.Construct
433
+
434
+ ---
435
+
436
+ ##### `id`<sup>Required</sup> <a name="id" id="@bluedynamics/cdk8s-plone.PloneVinylCache.Initializer.parameter.id"></a>
437
+
438
+ - *Type:* string
439
+
440
+ ---
441
+
442
+ ##### `options`<sup>Required</sup> <a name="options" id="@bluedynamics/cdk8s-plone.PloneVinylCache.Initializer.parameter.options"></a>
443
+
444
+ - *Type:* <a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions">PloneVinylCacheOptions</a>
445
+
446
+ ---
447
+
448
+ #### Methods <a name="Methods" id="Methods"></a>
449
+
450
+ | **Name** | **Description** |
451
+ | --- | --- |
452
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.toString">toString</a></code> | Returns a string representation of this construct. |
453
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.with">with</a></code> | Applies one or more mixins to this construct. |
454
+
455
+ ---
456
+
457
+ ##### `toString` <a name="toString" id="@bluedynamics/cdk8s-plone.PloneVinylCache.toString"></a>
458
+
459
+ ```typescript
460
+ public toString(): string
461
+ ```
462
+
463
+ Returns a string representation of this construct.
464
+
465
+ ##### `with` <a name="with" id="@bluedynamics/cdk8s-plone.PloneVinylCache.with"></a>
466
+
467
+ ```typescript
468
+ public with(mixins: ...IMixin[]): IConstruct
469
+ ```
470
+
471
+ Applies one or more mixins to this construct.
472
+
473
+ Mixins are applied in order. The list of constructs is captured at the
474
+ start of the call, so constructs added by a mixin will not be visited.
475
+ Use multiple `with()` calls if subsequent mixins should apply to added
476
+ constructs.
477
+
478
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@bluedynamics/cdk8s-plone.PloneVinylCache.with.parameter.mixins"></a>
479
+
480
+ - *Type:* ...constructs.IMixin[]
481
+
482
+ The mixins to apply.
483
+
484
+ ---
485
+
486
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
487
+
488
+ | **Name** | **Description** |
489
+ | --- | --- |
490
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
491
+
492
+ ---
493
+
494
+ ##### `isConstruct` <a name="isConstruct" id="@bluedynamics/cdk8s-plone.PloneVinylCache.isConstruct"></a>
495
+
496
+ ```typescript
497
+ import { PloneVinylCache } from '@bluedynamics/cdk8s-plone'
498
+
499
+ PloneVinylCache.isConstruct(x: any)
500
+ ```
501
+
502
+ Checks if `x` is a construct.
503
+
504
+ Use this method instead of `instanceof` to properly detect `Construct`
505
+ instances, even when the construct library is symlinked.
506
+
507
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
508
+ disk are seen as independent, completely different libraries. As a
509
+ consequence, the class `Construct` in each copy of the `constructs` library
510
+ is seen as a different class, and an instance of one class will not test as
511
+ `instanceof` the other class. `npm install` will not create installations
512
+ like this, but users may manually symlink construct libraries together or
513
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
514
+ library can be accidentally installed, and `instanceof` will behave
515
+ unpredictably. It is safest to avoid using `instanceof`, and using
516
+ this type-testing method instead.
517
+
518
+ ###### `x`<sup>Required</sup> <a name="x" id="@bluedynamics/cdk8s-plone.PloneVinylCache.isConstruct.parameter.x"></a>
519
+
520
+ - *Type:* any
521
+
522
+ Any object.
523
+
524
+ ---
525
+
526
+ #### Properties <a name="Properties" id="Properties"></a>
527
+
528
+ | **Name** | **Type** | **Description** |
529
+ | --- | --- | --- |
530
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
531
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCache.property.vinylCacheServiceName">vinylCacheServiceName</a></code> | <code>string</code> | Name of the VinylCache service created by the operator. |
532
+
533
+ ---
534
+
535
+ ##### `node`<sup>Required</sup> <a name="node" id="@bluedynamics/cdk8s-plone.PloneVinylCache.property.node"></a>
536
+
537
+ ```typescript
538
+ public readonly node: Node;
539
+ ```
540
+
541
+ - *Type:* constructs.Node
542
+
543
+ The tree node.
544
+
545
+ ---
546
+
547
+ ##### `vinylCacheServiceName`<sup>Required</sup> <a name="vinylCacheServiceName" id="@bluedynamics/cdk8s-plone.PloneVinylCache.property.vinylCacheServiceName"></a>
548
+
549
+ ```typescript
550
+ public readonly vinylCacheServiceName: string;
551
+ ```
552
+
553
+ - *Type:* string
554
+
555
+ Name of the VinylCache service created by the operator.
556
+
557
+ Use this to reference the cache service from ingress or other constructs.
558
+
559
+ ---
560
+
561
+
392
562
  ## Structs <a name="Structs" id="Structs"></a>
393
563
 
394
564
  ### HttpcacheEnvVar <a name="HttpcacheEnvVar" id="@bluedynamics/cdk8s-plone.HttpcacheEnvVar"></a>
@@ -1372,6 +1542,291 @@ This is used in Kubernetes labels and doesn't affect the actual image versions.
1372
1542
 
1373
1543
  ---
1374
1544
 
1545
+ ### PloneVinylCacheOptions <a name="PloneVinylCacheOptions" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions"></a>
1546
+
1547
+ Configuration options for PloneVinylCache (cloud-vinyl operator).
1548
+
1549
+ Creates a VinylCache custom resource that the cloud-vinyl operator
1550
+ reconciles into a Varnish Cache cluster with agent-based VCL delivery.
1551
+
1552
+ Requires the cloud-vinyl operator to be installed in the cluster.
1553
+
1554
+ #### Initializer <a name="Initializer" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.Initializer"></a>
1555
+
1556
+ ```typescript
1557
+ import { PloneVinylCacheOptions } from '@bluedynamics/cdk8s-plone'
1558
+
1559
+ const ploneVinylCacheOptions: PloneVinylCacheOptions = { ... }
1560
+ ```
1561
+
1562
+ #### Properties <a name="Properties" id="Properties"></a>
1563
+
1564
+ | **Name** | **Type** | **Description** |
1565
+ | --- | --- | --- |
1566
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.plone">plone</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.Plone">Plone</a></code> | The Plone construct to attach the cache to. |
1567
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.director">director</a></code> | <code>string</code> | Director type for load distribution. |
1568
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.image">image</a></code> | <code>string</code> | Container image for the Varnish pods. |
1569
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.invalidation">invalidation</a></code> | <code>boolean</code> | Enable cache invalidation (PURGE, BAN, xkey). |
1570
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.limitCpu">limitCpu</a></code> | <code>string</code> | CPU limit for Varnish pods. |
1571
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.limitMemory">limitMemory</a></code> | <code>string</code> | Memory limit for Varnish pods. |
1572
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.monitoring">monitoring</a></code> | <code>boolean</code> | Enable Prometheus monitoring (metrics + ServiceMonitor). |
1573
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.replicas">replicas</a></code> | <code>number</code> | Number of Varnish pod replicas. |
1574
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.requestCpu">requestCpu</a></code> | <code>string</code> | CPU request for Varnish pods. |
1575
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.requestMemory">requestMemory</a></code> | <code>string</code> | Memory request for Varnish pods. |
1576
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.tolerations">tolerations</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheToleration">VinylCacheToleration</a>[]</code> | Tolerations for the Varnish pods. |
1577
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclBackendResponseSnippet">vclBackendResponseSnippet</a></code> | <code>string</code> | Custom VCL snippet for vcl_backend_response subroutine. |
1578
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclRecvSnippet">vclRecvSnippet</a></code> | <code>string</code> | Custom VCL snippet for vcl_recv subroutine. |
1579
+
1580
+ ---
1581
+
1582
+ ##### `plone`<sup>Required</sup> <a name="plone" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.plone"></a>
1583
+
1584
+ ```typescript
1585
+ public readonly plone: Plone;
1586
+ ```
1587
+
1588
+ - *Type:* <a href="#@bluedynamics/cdk8s-plone.Plone">Plone</a>
1589
+
1590
+ The Plone construct to attach the cache to.
1591
+
1592
+ Backends are auto-configured from the Plone services.
1593
+
1594
+ ---
1595
+
1596
+ ##### `director`<sup>Optional</sup> <a name="director" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.director"></a>
1597
+
1598
+ ```typescript
1599
+ public readonly director: string;
1600
+ ```
1601
+
1602
+ - *Type:* string
1603
+ - *Default:* 'shard'
1604
+
1605
+ Director type for load distribution.
1606
+
1607
+ ---
1608
+
1609
+ ##### `image`<sup>Optional</sup> <a name="image" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.image"></a>
1610
+
1611
+ ```typescript
1612
+ public readonly image: string;
1613
+ ```
1614
+
1615
+ - *Type:* string
1616
+ - *Default:* 'varnish:7.6'
1617
+
1618
+ Container image for the Varnish pods.
1619
+
1620
+ ---
1621
+
1622
+ ##### `invalidation`<sup>Optional</sup> <a name="invalidation" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.invalidation"></a>
1623
+
1624
+ ```typescript
1625
+ public readonly invalidation: boolean;
1626
+ ```
1627
+
1628
+ - *Type:* boolean
1629
+ - *Default:* true
1630
+
1631
+ Enable cache invalidation (PURGE, BAN, xkey).
1632
+
1633
+ ---
1634
+
1635
+ ##### `limitCpu`<sup>Optional</sup> <a name="limitCpu" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.limitCpu"></a>
1636
+
1637
+ ```typescript
1638
+ public readonly limitCpu: string;
1639
+ ```
1640
+
1641
+ - *Type:* string
1642
+ - *Default:* '500m'
1643
+
1644
+ CPU limit for Varnish pods.
1645
+
1646
+ ---
1647
+
1648
+ ##### `limitMemory`<sup>Optional</sup> <a name="limitMemory" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.limitMemory"></a>
1649
+
1650
+ ```typescript
1651
+ public readonly limitMemory: string;
1652
+ ```
1653
+
1654
+ - *Type:* string
1655
+ - *Default:* '512Mi'
1656
+
1657
+ Memory limit for Varnish pods.
1658
+
1659
+ ---
1660
+
1661
+ ##### `monitoring`<sup>Optional</sup> <a name="monitoring" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.monitoring"></a>
1662
+
1663
+ ```typescript
1664
+ public readonly monitoring: boolean;
1665
+ ```
1666
+
1667
+ - *Type:* boolean
1668
+ - *Default:* false
1669
+
1670
+ Enable Prometheus monitoring (metrics + ServiceMonitor).
1671
+
1672
+ ---
1673
+
1674
+ ##### `replicas`<sup>Optional</sup> <a name="replicas" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.replicas"></a>
1675
+
1676
+ ```typescript
1677
+ public readonly replicas: number;
1678
+ ```
1679
+
1680
+ - *Type:* number
1681
+ - *Default:* 2
1682
+
1683
+ Number of Varnish pod replicas.
1684
+
1685
+ ---
1686
+
1687
+ ##### `requestCpu`<sup>Optional</sup> <a name="requestCpu" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.requestCpu"></a>
1688
+
1689
+ ```typescript
1690
+ public readonly requestCpu: string;
1691
+ ```
1692
+
1693
+ - *Type:* string
1694
+ - *Default:* '100m'
1695
+
1696
+ CPU request for Varnish pods.
1697
+
1698
+ ---
1699
+
1700
+ ##### `requestMemory`<sup>Optional</sup> <a name="requestMemory" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.requestMemory"></a>
1701
+
1702
+ ```typescript
1703
+ public readonly requestMemory: string;
1704
+ ```
1705
+
1706
+ - *Type:* string
1707
+ - *Default:* '256Mi'
1708
+
1709
+ Memory request for Varnish pods.
1710
+
1711
+ ---
1712
+
1713
+ ##### `tolerations`<sup>Optional</sup> <a name="tolerations" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.tolerations"></a>
1714
+
1715
+ ```typescript
1716
+ public readonly tolerations: VinylCacheToleration[];
1717
+ ```
1718
+
1719
+ - *Type:* <a href="#@bluedynamics/cdk8s-plone.VinylCacheToleration">VinylCacheToleration</a>[]
1720
+ - *Default:* no tolerations
1721
+
1722
+ Tolerations for the Varnish pods.
1723
+
1724
+ ---
1725
+
1726
+ ##### `vclBackendResponseSnippet`<sup>Optional</sup> <a name="vclBackendResponseSnippet" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclBackendResponseSnippet"></a>
1727
+
1728
+ ```typescript
1729
+ public readonly vclBackendResponseSnippet: string;
1730
+ ```
1731
+
1732
+ - *Type:* string
1733
+ - *Default:* uses built-in plone-vinyl-backend-response.vcl
1734
+
1735
+ Custom VCL snippet for vcl_backend_response subroutine.
1736
+
1737
+ Replaces the default Plone backend_response snippet.
1738
+
1739
+ ---
1740
+
1741
+ ##### `vclRecvSnippet`<sup>Optional</sup> <a name="vclRecvSnippet" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclRecvSnippet"></a>
1742
+
1743
+ ```typescript
1744
+ public readonly vclRecvSnippet: string;
1745
+ ```
1746
+
1747
+ - *Type:* string
1748
+ - *Default:* uses built-in plone-vinyl-recv.vcl
1749
+
1750
+ Custom VCL snippet for vcl_recv subroutine.
1751
+
1752
+ Replaces the default Plone recv snippet.
1753
+
1754
+ ---
1755
+
1756
+ ### VinylCacheToleration <a name="VinylCacheToleration" id="@bluedynamics/cdk8s-plone.VinylCacheToleration"></a>
1757
+
1758
+ A Kubernetes toleration for the Varnish pods.
1759
+
1760
+ #### Initializer <a name="Initializer" id="@bluedynamics/cdk8s-plone.VinylCacheToleration.Initializer"></a>
1761
+
1762
+ ```typescript
1763
+ import { VinylCacheToleration } from '@bluedynamics/cdk8s-plone'
1764
+
1765
+ const vinylCacheToleration: VinylCacheToleration = { ... }
1766
+ ```
1767
+
1768
+ #### Properties <a name="Properties" id="Properties"></a>
1769
+
1770
+ | **Name** | **Type** | **Description** |
1771
+ | --- | --- | --- |
1772
+ | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheToleration.property.key">key</a></code> | <code>string</code> | The taint key to tolerate. |
1773
+ | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheToleration.property.effect">effect</a></code> | <code>string</code> | The taint effect to tolerate (NoSchedule, PreferNoSchedule, NoExecute). |
1774
+ | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheToleration.property.operator">operator</a></code> | <code>string</code> | The operator (Equal or Exists). |
1775
+ | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheToleration.property.value">value</a></code> | <code>string</code> | The taint value to match (when operator is Equal). |
1776
+
1777
+ ---
1778
+
1779
+ ##### `key`<sup>Required</sup> <a name="key" id="@bluedynamics/cdk8s-plone.VinylCacheToleration.property.key"></a>
1780
+
1781
+ ```typescript
1782
+ public readonly key: string;
1783
+ ```
1784
+
1785
+ - *Type:* string
1786
+
1787
+ The taint key to tolerate.
1788
+
1789
+ ---
1790
+
1791
+ ##### `effect`<sup>Optional</sup> <a name="effect" id="@bluedynamics/cdk8s-plone.VinylCacheToleration.property.effect"></a>
1792
+
1793
+ ```typescript
1794
+ public readonly effect: string;
1795
+ ```
1796
+
1797
+ - *Type:* string
1798
+ - *Default:* tolerate all effects
1799
+
1800
+ The taint effect to tolerate (NoSchedule, PreferNoSchedule, NoExecute).
1801
+
1802
+ ---
1803
+
1804
+ ##### `operator`<sup>Optional</sup> <a name="operator" id="@bluedynamics/cdk8s-plone.VinylCacheToleration.property.operator"></a>
1805
+
1806
+ ```typescript
1807
+ public readonly operator: string;
1808
+ ```
1809
+
1810
+ - *Type:* string
1811
+ - *Default:* 'Equal'
1812
+
1813
+ The operator (Equal or Exists).
1814
+
1815
+ ---
1816
+
1817
+ ##### `value`<sup>Optional</sup> <a name="value" id="@bluedynamics/cdk8s-plone.VinylCacheToleration.property.value"></a>
1818
+
1819
+ ```typescript
1820
+ public readonly value: string;
1821
+ ```
1822
+
1823
+ - *Type:* string
1824
+ - *Default:* no value
1825
+
1826
+ The taint value to match (when operator is Equal).
1827
+
1828
+ ---
1829
+
1375
1830
 
1376
1831
 
1377
1832
  ## Enums <a name="Enums" id="Enums"></a>
package/README.md CHANGED
@@ -13,7 +13,7 @@ cdk8s-plone provides CDK8S constructs for deploying [Plone CMS](https://plone.or
13
13
  **Key Features:**
14
14
  - 🚀 Supports Volto (modern React frontend) and Classic UI
15
15
  - 📦 High availability with configurable replicas
16
- - ⚡ Optional Varnish HTTP caching layer
16
+ - ⚡ Optional Varnish HTTP caching via kube-httpcache (`PloneHttpcache`) or cloud-vinyl VinylCache operator (`PloneVinylCache`)
17
17
  - 🔧 Fine-grained resource and probe configuration
18
18
  - 🌍 Multi-language support (TypeScript/JavaScript and Python)
19
19
  - ✅ Type-safe infrastructure as code
@@ -57,6 +57,24 @@ cdk8s-plone supports two deployment variants:
57
57
  - Better scalability
58
58
  - Automatic cache invalidation on content changes
59
59
 
60
+ ### Caching Options
61
+
62
+ cdk8s-plone supports two HTTP caching approaches:
63
+
64
+ **PloneHttpcache (mittwald/kube-httpcache)**
65
+ - Self-contained: deploys Varnish via Helm chart, no operator needed
66
+ - Full VCL template with Go template variable injection
67
+ - Prometheus exporter sidecar for metrics
68
+
69
+ **PloneVinylCache (cloud-vinyl operator)**
70
+ - Operator-managed: creates a VinylCache custom resource
71
+ - Structured VCL generation with snippet injection hooks
72
+ - Built-in cache invalidation proxy (PURGE, BAN, xkey)
73
+ - Agent-based VCL delivery and Prometheus metrics
74
+ - Requires the [cloud-vinyl operator](https://github.com/bluedynamics/cloud-vinyl) in the cluster
75
+
76
+ Choose PloneHttpcache for standalone deployments without cloud-vinyl. Choose PloneVinylCache when the operator is available for centralized cache management.
77
+
60
78
  ### Multi-Language Support
61
79
 
62
80
  The library is published in multiple languages:
@@ -44,12 +44,20 @@ backend: {
44
44
 
45
45
  ### HTTP Caching with Varnish
46
46
 
47
- **kube-httpcache Integration**
48
- - Production-grade Varnish deployment
47
+ cdk8s-plone supports two caching backends: the self-contained mittwald kube-httpcache Helm chart (`PloneHttpcache`) and the operator-managed cloud-vinyl VinylCache (`PloneVinylCache`).
48
+
49
+ **kube-httpcache Integration (PloneHttpcache)**
50
+ - Production-grade Varnish deployment, no operator required
49
51
  - Cluster-wide cache invalidation
50
52
  - Automatic invalidation on content changes
51
53
  - HTTP/2 support
52
54
 
55
+ **cloud-vinyl VinylCache Integration (PloneVinylCache)**
56
+ - Operator-managed Varnish via VinylCache custom resource
57
+ - Structured VCL generation with snippet injection hooks
58
+ - Built-in cache invalidation proxy (PURGE, BAN, xkey)
59
+ - Requires the cloud-vinyl operator in the cluster
60
+
53
61
  **Benefits:**
54
62
  - Dramatically reduced backend load
55
63
  - Faster response times
@@ -0,0 +1,115 @@
1
+ ```{image} ../_static/kup6s-icon-howto.svg
2
+ :align: center
3
+ :class: section-icon-large
4
+ ```
5
+
6
+ # Deploy with Cloud-Vinyl Cache
7
+
8
+ <div class="page-metadata">
9
+ <div class="metadata-content">
10
+ <p><strong>Type</strong>: How-To (Task-oriented)</p>
11
+ <p><strong>Difficulty</strong>: Intermediate</p>
12
+ <p><strong>Time</strong>: 15 minutes</p>
13
+ </div>
14
+ </div>
15
+
16
+ ## Prerequisites
17
+
18
+ - The **cloud-vinyl operator** must be installed in your cluster
19
+ - A working Plone deployment using `cdk8s-plone`
20
+ - `@bluedynamics/cdk8s-plone` version with VinylCache support
21
+
22
+ ## Steps
23
+
24
+ ### 1. Add PloneVinylCache to Your Deployment
25
+
26
+ ```typescript
27
+ import { Plone, PloneVinylCache } from '@bluedynamics/cdk8s-plone';
28
+
29
+ const plone = new Plone(chart, 'plone', {
30
+ backend: { image: 'plone/plone-backend:6.1.3' },
31
+ frontend: { image: 'plone/plone-frontend:16.0.0' },
32
+ });
33
+
34
+ const cache = new PloneVinylCache(chart, 'cache', {
35
+ plone: plone,
36
+ replicas: 2,
37
+ });
38
+ ```
39
+
40
+ ### 2. Use the Cache Service in Your IngressRoute
41
+
42
+ The cache exposes a service that should be used as the upstream in your IngressRoute:
43
+
44
+ ```typescript
45
+ // Use cache.vinylCacheServiceName as the service target
46
+ // instead of plone.frontendServiceName
47
+ ```
48
+
49
+ ### 3. Build and Deploy
50
+
51
+ ```bash
52
+ npm run build
53
+ # Review generated manifests
54
+ # Deploy via ArgoCD or kubectl apply
55
+ ```
56
+
57
+ ### 4. Verify
58
+
59
+ ```bash
60
+ # Check VinylCache status
61
+ kubectl get vinylcache -n <namespace>
62
+
63
+ # Check Varnish pods
64
+ kubectl get pods -n <namespace> -l app.kubernetes.io/managed-by=cloud-vinyl
65
+ ```
66
+
67
+ ## Customization
68
+
69
+ ### Custom VCL
70
+
71
+ Override the default Plone VCL snippets for custom caching logic:
72
+
73
+ ```typescript
74
+ new PloneVinylCache(chart, 'cache', {
75
+ plone: plone,
76
+ vclRecvSnippet: fs.readFileSync('./config/custom-recv.vcl', 'utf8'),
77
+ vclBackendResponseSnippet: fs.readFileSync('./config/custom-beresp.vcl', 'utf8'),
78
+ });
79
+ ```
80
+
81
+ ### Cache Invalidation
82
+
83
+ Invalidation is enabled by default (PURGE, BAN, xkey). Configure `plone.cachepurging` to point to the VinylCache invalidation proxy endpoint.
84
+
85
+ To disable invalidation:
86
+
87
+ ```typescript
88
+ new PloneVinylCache(chart, 'cache', {
89
+ plone: plone,
90
+ invalidation: false,
91
+ });
92
+ ```
93
+
94
+ ## Migrating from PloneHttpcache
95
+
96
+ Replace `PloneHttpcache` with `PloneVinylCache`:
97
+
98
+ ```typescript
99
+ // Before (mittwald)
100
+ // import { PloneHttpcache } from '@bluedynamics/cdk8s-plone';
101
+ // const cache = new PloneHttpcache(chart, 'cache', {
102
+ // plone, varnishVcl: '...', existingSecret: 'secret',
103
+ // });
104
+ // const serviceName = cache.httpcacheServiceName;
105
+
106
+ // After (cloud-vinyl)
107
+ import { PloneVinylCache } from '@bluedynamics/cdk8s-plone';
108
+ const cache = new PloneVinylCache(chart, 'cache', { plone });
109
+ const serviceName = cache.vinylCacheServiceName;
110
+ ```
111
+
112
+ Key differences:
113
+ - No VCL template needed (operator generates VCL from structured config)
114
+ - No `existingSecret` needed (operator manages agent authentication)
115
+ - Service name property is `vinylCacheServiceName` (not `httpcacheServiceName`)
@@ -32,6 +32,7 @@ titlesonly: true
32
32
  ---
33
33
  deploy-production-volto
34
34
  deploy-classic-ui
35
+ deploy-with-vinyl-cache
35
36
  ```
36
37
 
37
38
  ## Configuration