@bluedynamics/cdk8s-plone 0.1.64 → 0.2.1
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/.jsii +401 -90
- package/API.md +252 -8
- package/documentation/sources/how-to/deploy-with-vinyl-cache.md +58 -9
- package/documentation/sources/how-to/upgrade-and-rollout.md +12 -2
- package/documentation/sources/reference/configuration-options.md +13 -0
- package/lib/deployment.d.ts +23 -0
- package/lib/deployment.js +39 -1
- package/lib/httpcache.js +1 -1
- package/lib/imports/vinyl.bluedynamics.eu.d.ts +7796 -77
- package/lib/imports/vinyl.bluedynamics.eu.js +3636 -12
- package/lib/index.d.ts +2 -1
- package/lib/index.js +1 -1
- package/lib/kube.d.ts +6 -0
- package/lib/kube.js +19 -1
- package/lib/plone.d.ts +10 -0
- package/lib/plone.js +4 -2
- package/lib/service.d.ts +9 -5
- package/lib/service.js +26 -3
- package/lib/vinylcache.d.ts +84 -6
- package/lib/vinylcache.js +72 -7
- package/package.json +1 -1
package/API.md
CHANGED
|
@@ -620,6 +620,9 @@ Has the form `http://<cache>-invalidation.<namespace>:8090`, the same
|
|
|
620
620
|
address the operator reports in `status.invalidationURL`. The proxy serves
|
|
621
621
|
all namespaces and routes by `Host`, so the bare Service name is rejected.
|
|
622
622
|
|
|
623
|
+
Purges from clients that cannot set an `X-Vinyl-Purge-Host` header, such
|
|
624
|
+
as `plone.cachepurging`, only match cached pages if `purgeHosts` is set.
|
|
625
|
+
|
|
623
626
|
Throws if the chart has no namespace, because the URL cannot be built
|
|
624
627
|
without one, or if `invalidation` is disabled.
|
|
625
628
|
|
|
@@ -808,6 +811,7 @@ const ploneBaseOptions: PloneBaseOptions = { ... }
|
|
|
808
811
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.replicas">replicas</a></code> | <code>number</code> | Number of pod replicas to run. |
|
|
809
812
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.requestCpu">requestCpu</a></code> | <code>string</code> | CPU request for the container. |
|
|
810
813
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.requestMemory">requestMemory</a></code> | <code>string</code> | Memory request for the container. |
|
|
814
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.rollingUpdate">rollingUpdate</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.PloneRollingUpdate">PloneRollingUpdate</a></code> | Rolling update settings for the Deployment (`spec.strategy.rollingUpdate`). For rollouts without a capacity dip use `{ maxUnavailable: 0, maxSurge: '50%' }`: Plone needs time to become ready, and the default lets a quarter of the pods go away first. Not to be confused with the top-level `maxUnavailable` and `minAvailable`, which configure the PodDisruptionBudget. |
|
|
811
815
|
| <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. |
|
|
812
816
|
| <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. |
|
|
813
817
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneBaseOptions.property.serviceAnnotations">serviceAnnotations</a></code> | <code>{[ key: string ]: string}</code> | Annotations to add to the Service metadata. |
|
|
@@ -1265,6 +1269,19 @@ Memory request for the container.
|
|
|
1265
1269
|
```
|
|
1266
1270
|
|
|
1267
1271
|
|
|
1272
|
+
##### `rollingUpdate`<sup>Optional</sup> <a name="rollingUpdate" id="@bluedynamics/cdk8s-plone.PloneBaseOptions.property.rollingUpdate"></a>
|
|
1273
|
+
|
|
1274
|
+
```typescript
|
|
1275
|
+
public readonly rollingUpdate: PloneRollingUpdate;
|
|
1276
|
+
```
|
|
1277
|
+
|
|
1278
|
+
- *Type:* <a href="#@bluedynamics/cdk8s-plone.PloneRollingUpdate">PloneRollingUpdate</a>
|
|
1279
|
+
- *Default:* Kubernetes default ('25%' surge, '25%' unavailable)
|
|
1280
|
+
|
|
1281
|
+
Rolling update settings for the Deployment (`spec.strategy.rollingUpdate`). For rollouts without a capacity dip use `{ maxUnavailable: 0, maxSurge: '50%' }`: Plone needs time to become ready, and the default lets a quarter of the pods go away first. Not to be confused with the top-level `maxUnavailable` and `minAvailable`, which configure the PodDisruptionBudget.
|
|
1282
|
+
|
|
1283
|
+
---
|
|
1284
|
+
|
|
1268
1285
|
##### `securityContext`<sup>Optional</sup> <a name="securityContext" id="@bluedynamics/cdk8s-plone.PloneBaseOptions.property.securityContext"></a>
|
|
1269
1286
|
|
|
1270
1287
|
```typescript
|
|
@@ -1780,6 +1797,53 @@ This is used in Kubernetes labels and doesn't affect the actual image versions.
|
|
|
1780
1797
|
|
|
1781
1798
|
---
|
|
1782
1799
|
|
|
1800
|
+
### PloneRollingUpdate <a name="PloneRollingUpdate" id="@bluedynamics/cdk8s-plone.PloneRollingUpdate"></a>
|
|
1801
|
+
|
|
1802
|
+
Rolling update settings for a Deployment (`spec.strategy.rollingUpdate`).
|
|
1803
|
+
|
|
1804
|
+
#### Initializer <a name="Initializer" id="@bluedynamics/cdk8s-plone.PloneRollingUpdate.Initializer"></a>
|
|
1805
|
+
|
|
1806
|
+
```typescript
|
|
1807
|
+
import { PloneRollingUpdate } from '@bluedynamics/cdk8s-plone'
|
|
1808
|
+
|
|
1809
|
+
const ploneRollingUpdate: PloneRollingUpdate = { ... }
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1812
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1813
|
+
|
|
1814
|
+
| **Name** | **Type** | **Description** |
|
|
1815
|
+
| --- | --- | --- |
|
|
1816
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.PloneRollingUpdate.property.maxSurge">maxSurge</a></code> | <code>string \| number</code> | Maximum number of pods created above the desired replica count during an update, as an absolute number (e.g. 1) or a percentage (e.g. '50%'). |
|
|
1817
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.PloneRollingUpdate.property.maxUnavailable">maxUnavailable</a></code> | <code>string \| number</code> | Maximum number of pods that can be unavailable during an update, as an absolute number (e.g. 0) or a percentage (e.g. '25%'). Not to be confused with the PodDisruptionBudget's `maxUnavailable`. |
|
|
1818
|
+
|
|
1819
|
+
---
|
|
1820
|
+
|
|
1821
|
+
##### `maxSurge`<sup>Optional</sup> <a name="maxSurge" id="@bluedynamics/cdk8s-plone.PloneRollingUpdate.property.maxSurge"></a>
|
|
1822
|
+
|
|
1823
|
+
```typescript
|
|
1824
|
+
public readonly maxSurge: string | number;
|
|
1825
|
+
```
|
|
1826
|
+
|
|
1827
|
+
- *Type:* string | number
|
|
1828
|
+
- *Default:* Kubernetes default ('25%')
|
|
1829
|
+
|
|
1830
|
+
Maximum number of pods created above the desired replica count during an update, as an absolute number (e.g. 1) or a percentage (e.g. '50%').
|
|
1831
|
+
|
|
1832
|
+
---
|
|
1833
|
+
|
|
1834
|
+
##### `maxUnavailable`<sup>Optional</sup> <a name="maxUnavailable" id="@bluedynamics/cdk8s-plone.PloneRollingUpdate.property.maxUnavailable"></a>
|
|
1835
|
+
|
|
1836
|
+
```typescript
|
|
1837
|
+
public readonly maxUnavailable: string | number;
|
|
1838
|
+
```
|
|
1839
|
+
|
|
1840
|
+
- *Type:* string | number
|
|
1841
|
+
- *Default:* Kubernetes default ('25%')
|
|
1842
|
+
|
|
1843
|
+
Maximum number of pods that can be unavailable during an update, as an absolute number (e.g. 0) or a percentage (e.g. '25%'). Not to be confused with the PodDisruptionBudget's `maxUnavailable`.
|
|
1844
|
+
|
|
1845
|
+
---
|
|
1846
|
+
|
|
1783
1847
|
### PloneSecurityContext <a name="PloneSecurityContext" id="@bluedynamics/cdk8s-plone.PloneSecurityContext"></a>
|
|
1784
1848
|
|
|
1785
1849
|
Security context for a Plone container.
|
|
@@ -1933,7 +1997,7 @@ const ploneServiceSpec: PloneServiceSpec = { ... }
|
|
|
1933
1997
|
| <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. |
|
|
1934
1998
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.loadBalancerClass">loadBalancerClass</a></code> | <code>string</code> | Load balancer implementation class. |
|
|
1935
1999
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.loadBalancerSourceRanges">loadBalancerSourceRanges</a></code> | <code>string[]</code> | Source IP ranges allowed to access a LoadBalancer service. |
|
|
1936
|
-
| <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
|
|
2000
|
+
| <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 in manifest form (e.g. `{ ipFamilyPolicy: 'PreferDualStack' }`). Highest precedence: each top-level key replaces the field on top of all curated fields and the construct-managed base. Use for any ServiceSpec field not covered above. Keys and values are written to the Service spec verbatim and are not validated by this construct. cdk8s value objects such as `IntOrString.fromNumber(8080)` are unwrapped, and the TypeScript spellings `clusterIp`, `loadBalancerIp` and `sessionAffinityConfig.clientIp` are accepted for `clusterIP`, `loadBalancerIP` and `clientIP`. |
|
|
1937
2001
|
| <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). |
|
|
1938
2002
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneServiceSpec.property.sessionAffinity">sessionAffinity</a></code> | <code>string</code> | Session affinity, 'ClientIP' \| 'None'. |
|
|
1939
2003
|
| <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. |
|
|
@@ -2028,7 +2092,7 @@ public readonly overrides: {[ key: string ]: any};
|
|
|
2028
2092
|
- *Type:* {[ key: string ]: any}
|
|
2029
2093
|
- *Default:* none
|
|
2030
2094
|
|
|
2031
|
-
Raw ServiceSpec overrides as a free-form map (e.g. `{ ipFamilyPolicy: 'PreferDualStack' }`). Highest precedence
|
|
2095
|
+
Raw ServiceSpec overrides as a free-form map in manifest form (e.g. `{ ipFamilyPolicy: 'PreferDualStack' }`). Highest precedence: each top-level key replaces the field on top of all curated fields and the construct-managed base. Use for any ServiceSpec field not covered above. Keys and values are written to the Service spec verbatim and are not validated by this construct. cdk8s value objects such as `IntOrString.fromNumber(8080)` are unwrapped, and the TypeScript spellings `clusterIp`, `loadBalancerIp` and `sessionAffinityConfig.clientIp` are accepted for `clusterIP`, `loadBalancerIP` and `clientIP`.
|
|
2032
2096
|
|
|
2033
2097
|
---
|
|
2034
2098
|
|
|
@@ -2091,7 +2155,8 @@ Configuration options for PloneVinylCache (cloud-vinyl operator).
|
|
|
2091
2155
|
Creates a VinylCache custom resource that the cloud-vinyl operator
|
|
2092
2156
|
reconciles into a Varnish Cache cluster with agent-based VCL delivery.
|
|
2093
2157
|
|
|
2094
|
-
Requires
|
|
2158
|
+
Requires cloud-vinyl 1.0.0-rc.2 or later in the cluster
|
|
2159
|
+
(`vinyl.bluedynamics.eu/v1`).
|
|
2095
2160
|
|
|
2096
2161
|
#### Initializer <a name="Initializer" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.Initializer"></a>
|
|
2097
2162
|
|
|
@@ -2108,6 +2173,7 @@ const ploneVinylCacheOptions: PloneVinylCacheOptions = { ... }
|
|
|
2108
2173
|
| <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. |
|
|
2109
2174
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.cluster">cluster</a></code> | <code>boolean</code> | Enable clustering between the Varnish pods (`spec.cluster.enabled`). |
|
|
2110
2175
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.director">director</a></code> | <code>string</code> | Director type for load distribution. |
|
|
2176
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.esi">esi</a></code> | <code>boolean</code> | Process Edge Side Includes (`spec.esi.enabled`) in backend responses that carry `Surrogate-Control: content="ESI/1.0"`. Do not use `varnishParameters: { feature: '+esi' }` instead: that is not a varnishd feature bit and makes varnishd fail to start. |
|
|
2111
2177
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.extraBackends">extraBackends</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheBackend">VinylCacheBackend</a>[]</code> | Additional backends to add after the auto-generated Plone backends. |
|
|
2112
2178
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.image">image</a></code> | <code>string</code> | Container image for the Varnish pods. |
|
|
2113
2179
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.invalidation">invalidation</a></code> | <code>boolean</code> | Enable cache invalidation (PURGE, BAN, xkey). |
|
|
@@ -2115,6 +2181,7 @@ const ploneVinylCacheOptions: PloneVinylCacheOptions = { ... }
|
|
|
2115
2181
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.limitMemory">limitMemory</a></code> | <code>string</code> | Memory limit for Varnish pods. |
|
|
2116
2182
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.monitoring">monitoring</a></code> | <code>boolean</code> | Enable Prometheus monitoring. |
|
|
2117
2183
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.nodeSelector">nodeSelector</a></code> | <code>{[ key: string ]: string}</code> | Node selector labels for the Varnish pods. |
|
|
2184
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.purgeHosts">purgeHosts</a></code> | <code>string[]</code> | Public site hostnames a PURGE through the invalidation proxy applies to, e.g. `['example.org', 'www.example.org']` (`spec.invalidation.purge.hosts`). |
|
|
2118
2185
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.replicas">replicas</a></code> | <code>number</code> | Number of Varnish pod replicas. |
|
|
2119
2186
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.requestCpu">requestCpu</a></code> | <code>string</code> | CPU request for Varnish pods. |
|
|
2120
2187
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.requestMemory">requestMemory</a></code> | <code>string</code> | Memory request for Varnish pods. |
|
|
@@ -2124,6 +2191,7 @@ const ploneVinylCacheOptions: PloneVinylCacheOptions = { ... }
|
|
|
2124
2191
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.shardReplicas">shardReplicas</a></code> | <code>number</code> | Shard director: number of Ketama replicas per backend in the hash ring. |
|
|
2125
2192
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.storage">storage</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheStorage">VinylCacheStorage</a>[]</code> | Varnish storage backends (`spec.storage`). |
|
|
2126
2193
|
| <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. |
|
|
2194
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.tracing">tracing</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing">VinylCacheTracing</a></code> | Export OpenTelemetry trace spans built from the Varnish log through the vinyl-tracer sidecar (`spec.tracing`). Setting it enables the tracer. Tracing needs a varnish 9 image, such as the default. |
|
|
2127
2195
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.varnishParameters">varnishParameters</a></code> | <code>{[ key: string ]: string}</code> | Runtime parameters passed to varnishd as `-p name=value` (`spec.varnishParameters`), for example `{ nuke_limit: '1000' }`. |
|
|
2128
2196
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclBackendErrorSnippet">vclBackendErrorSnippet</a></code> | <code>string</code> | Custom VCL snippet for vcl_backend_error subroutine. |
|
|
2129
2197
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclBackendFetchSnippet">vclBackendFetchSnippet</a></code> | <code>string</code> | Custom VCL snippet for vcl_backend_fetch subroutine. |
|
|
@@ -2188,6 +2256,19 @@ Director type for load distribution.
|
|
|
2188
2256
|
|
|
2189
2257
|
---
|
|
2190
2258
|
|
|
2259
|
+
##### `esi`<sup>Optional</sup> <a name="esi" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.esi"></a>
|
|
2260
|
+
|
|
2261
|
+
```typescript
|
|
2262
|
+
public readonly esi: boolean;
|
|
2263
|
+
```
|
|
2264
|
+
|
|
2265
|
+
- *Type:* boolean
|
|
2266
|
+
- *Default:* not set; no ESI processing
|
|
2267
|
+
|
|
2268
|
+
Process Edge Side Includes (`spec.esi.enabled`) in backend responses that carry `Surrogate-Control: content="ESI/1.0"`. Do not use `varnishParameters: { feature: '+esi' }` instead: that is not a varnishd feature bit and makes varnishd fail to start.
|
|
2269
|
+
|
|
2270
|
+
---
|
|
2271
|
+
|
|
2191
2272
|
##### `extraBackends`<sup>Optional</sup> <a name="extraBackends" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.extraBackends"></a>
|
|
2192
2273
|
|
|
2193
2274
|
```typescript
|
|
@@ -2210,10 +2291,12 @@ public readonly image: string;
|
|
|
2210
2291
|
```
|
|
2211
2292
|
|
|
2212
2293
|
- *Type:* string
|
|
2213
|
-
- *Default:* 'varnish:
|
|
2294
|
+
- *Default:* 'varnish:9.1.0'
|
|
2214
2295
|
|
|
2215
2296
|
Container image for the Varnish pods.
|
|
2216
2297
|
|
|
2298
|
+
cloud-vinyl 1.0 is tested with the docker-library `varnish` 9.1 image.
|
|
2299
|
+
|
|
2217
2300
|
---
|
|
2218
2301
|
|
|
2219
2302
|
##### `invalidation`<sup>Optional</sup> <a name="invalidation" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.invalidation"></a>
|
|
@@ -2287,6 +2370,25 @@ Constrains pods to nodes matching all specified labels.
|
|
|
2287
2370
|
|
|
2288
2371
|
---
|
|
2289
2372
|
|
|
2373
|
+
##### `purgeHosts`<sup>Optional</sup> <a name="purgeHosts" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.purgeHosts"></a>
|
|
2374
|
+
|
|
2375
|
+
```typescript
|
|
2376
|
+
public readonly purgeHosts: string[];
|
|
2377
|
+
```
|
|
2378
|
+
|
|
2379
|
+
- *Type:* string[]
|
|
2380
|
+
- *Default:* none, purges apply only to the host the client sends
|
|
2381
|
+
|
|
2382
|
+
Public site hostnames a PURGE through the invalidation proxy applies to, e.g. `['example.org', 'www.example.org']` (`spec.invalidation.purge.hosts`).
|
|
2383
|
+
|
|
2384
|
+
Varnish keys cached pages by URL and site host, while clients reach the
|
|
2385
|
+
proxy through `invalidationUrl`. For a purge without an
|
|
2386
|
+
`X-Vinyl-Purge-Host` header, the proxy sends one purge per listed host.
|
|
2387
|
+
Clients that cannot set headers, such as `plone.cachepurging`, need this,
|
|
2388
|
+
or their purges match nothing. At most 16 lowercase hostnames.
|
|
2389
|
+
|
|
2390
|
+
---
|
|
2391
|
+
|
|
2290
2392
|
##### `replicas`<sup>Optional</sup> <a name="replicas" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.replicas"></a>
|
|
2291
2393
|
|
|
2292
2394
|
```typescript
|
|
@@ -2333,13 +2435,13 @@ public readonly shardBy: string;
|
|
|
2333
2435
|
```
|
|
2334
2436
|
|
|
2335
2437
|
- *Type:* string
|
|
2336
|
-
- *Default:* operator default ("
|
|
2438
|
+
- *Default:* operator default ("URL")
|
|
2337
2439
|
|
|
2338
2440
|
Shard director: what value is hashed for shard selection.
|
|
2339
2441
|
|
|
2340
|
-
"
|
|
2442
|
+
Only "URL" (the request URL) is supported. cloud-vinyl 1.0 removed "HASH":
|
|
2443
|
+
the cluster routing runs in vcl_recv, before Varnish computes the hash.
|
|
2341
2444
|
Only applied when director is "shard".
|
|
2342
|
-
Requires cloud-vinyl operator >= 0.4.2.
|
|
2343
2445
|
|
|
2344
2446
|
---
|
|
2345
2447
|
|
|
@@ -2357,7 +2459,6 @@ Shard director: which backends the director considers when selecting a shard.
|
|
|
2357
2459
|
"CHOSEN" (default) only considers the chosen backend healthy; "ALL" requires all
|
|
2358
2460
|
backends to be healthy.
|
|
2359
2461
|
Only applied when director is "shard".
|
|
2360
|
-
Requires cloud-vinyl operator >= 0.4.2.
|
|
2361
2462
|
|
|
2362
2463
|
---
|
|
2363
2464
|
|
|
@@ -2435,6 +2536,19 @@ Tolerations for the Varnish pods.
|
|
|
2435
2536
|
|
|
2436
2537
|
---
|
|
2437
2538
|
|
|
2539
|
+
##### `tracing`<sup>Optional</sup> <a name="tracing" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.tracing"></a>
|
|
2540
|
+
|
|
2541
|
+
```typescript
|
|
2542
|
+
public readonly tracing: VinylCacheTracing;
|
|
2543
|
+
```
|
|
2544
|
+
|
|
2545
|
+
- *Type:* <a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing">VinylCacheTracing</a>
|
|
2546
|
+
- *Default:* no tracing
|
|
2547
|
+
|
|
2548
|
+
Export OpenTelemetry trace spans built from the Varnish log through the vinyl-tracer sidecar (`spec.tracing`). Setting it enables the tracer. Tracing needs a varnish 9 image, such as the default.
|
|
2549
|
+
|
|
2550
|
+
---
|
|
2551
|
+
|
|
2438
2552
|
##### `varnishParameters`<sup>Optional</sup> <a name="varnishParameters" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.varnishParameters"></a>
|
|
2439
2553
|
|
|
2440
2554
|
```typescript
|
|
@@ -2987,6 +3101,136 @@ The taint value to match (when operator is Equal).
|
|
|
2987
3101
|
|
|
2988
3102
|
---
|
|
2989
3103
|
|
|
3104
|
+
### VinylCacheTracing <a name="VinylCacheTracing" id="@bluedynamics/cdk8s-plone.VinylCacheTracing"></a>
|
|
3105
|
+
|
|
3106
|
+
Tracer sidecar configuration (`spec.tracing`), see `PloneVinylCacheOptions.tracing`.
|
|
3107
|
+
|
|
3108
|
+
#### Initializer <a name="Initializer" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.Initializer"></a>
|
|
3109
|
+
|
|
3110
|
+
```typescript
|
|
3111
|
+
import { VinylCacheTracing } from '@bluedynamics/cdk8s-plone'
|
|
3112
|
+
|
|
3113
|
+
const vinylCacheTracing: VinylCacheTracing = { ... }
|
|
3114
|
+
```
|
|
3115
|
+
|
|
3116
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
3117
|
+
|
|
3118
|
+
| **Name** | **Type** | **Description** |
|
|
3119
|
+
| --- | --- | --- |
|
|
3120
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.otlpEndpoint">otlpEndpoint</a></code> | <code>string</code> | OTLP collector address as `host:port`, without scheme, e.g. `'otel-collector.monitoring:4317'`. |
|
|
3121
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.insecure">insecure</a></code> | <code>boolean</code> | Disable TLS for the OTLP connection. |
|
|
3122
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitCpu">limitCpu</a></code> | <code>string</code> | CPU limit for the tracer sidecar. |
|
|
3123
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitMemory">limitMemory</a></code> | <code>string</code> | Memory limit for the tracer sidecar. |
|
|
3124
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.protocol">protocol</a></code> | <code>string</code> | OTLP transport: `'grpc'` or `'http/protobuf'`. |
|
|
3125
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestCpu">requestCpu</a></code> | <code>string</code> | CPU request for the tracer sidecar. |
|
|
3126
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestMemory">requestMemory</a></code> | <code>string</code> | Memory request for the tracer sidecar. |
|
|
3127
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.serviceName">serviceName</a></code> | <code>string</code> | OpenTelemetry `service.name` of the exported spans. |
|
|
3128
|
+
|
|
3129
|
+
---
|
|
3130
|
+
|
|
3131
|
+
##### `otlpEndpoint`<sup>Required</sup> <a name="otlpEndpoint" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.otlpEndpoint"></a>
|
|
3132
|
+
|
|
3133
|
+
```typescript
|
|
3134
|
+
public readonly otlpEndpoint: string;
|
|
3135
|
+
```
|
|
3136
|
+
|
|
3137
|
+
- *Type:* string
|
|
3138
|
+
|
|
3139
|
+
OTLP collector address as `host:port`, without scheme, e.g. `'otel-collector.monitoring:4317'`.
|
|
3140
|
+
|
|
3141
|
+
---
|
|
3142
|
+
|
|
3143
|
+
##### `insecure`<sup>Optional</sup> <a name="insecure" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.insecure"></a>
|
|
3144
|
+
|
|
3145
|
+
```typescript
|
|
3146
|
+
public readonly insecure: boolean;
|
|
3147
|
+
```
|
|
3148
|
+
|
|
3149
|
+
- *Type:* boolean
|
|
3150
|
+
- *Default:* false
|
|
3151
|
+
|
|
3152
|
+
Disable TLS for the OTLP connection.
|
|
3153
|
+
|
|
3154
|
+
---
|
|
3155
|
+
|
|
3156
|
+
##### `limitCpu`<sup>Optional</sup> <a name="limitCpu" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitCpu"></a>
|
|
3157
|
+
|
|
3158
|
+
```typescript
|
|
3159
|
+
public readonly limitCpu: string;
|
|
3160
|
+
```
|
|
3161
|
+
|
|
3162
|
+
- *Type:* string
|
|
3163
|
+
- *Default:* operator default
|
|
3164
|
+
|
|
3165
|
+
CPU limit for the tracer sidecar.
|
|
3166
|
+
|
|
3167
|
+
---
|
|
3168
|
+
|
|
3169
|
+
##### `limitMemory`<sup>Optional</sup> <a name="limitMemory" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitMemory"></a>
|
|
3170
|
+
|
|
3171
|
+
```typescript
|
|
3172
|
+
public readonly limitMemory: string;
|
|
3173
|
+
```
|
|
3174
|
+
|
|
3175
|
+
- *Type:* string
|
|
3176
|
+
- *Default:* operator default
|
|
3177
|
+
|
|
3178
|
+
Memory limit for the tracer sidecar.
|
|
3179
|
+
|
|
3180
|
+
---
|
|
3181
|
+
|
|
3182
|
+
##### `protocol`<sup>Optional</sup> <a name="protocol" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.protocol"></a>
|
|
3183
|
+
|
|
3184
|
+
```typescript
|
|
3185
|
+
public readonly protocol: string;
|
|
3186
|
+
```
|
|
3187
|
+
|
|
3188
|
+
- *Type:* string
|
|
3189
|
+
- *Default:* operator default ('grpc')
|
|
3190
|
+
|
|
3191
|
+
OTLP transport: `'grpc'` or `'http/protobuf'`.
|
|
3192
|
+
|
|
3193
|
+
---
|
|
3194
|
+
|
|
3195
|
+
##### `requestCpu`<sup>Optional</sup> <a name="requestCpu" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestCpu"></a>
|
|
3196
|
+
|
|
3197
|
+
```typescript
|
|
3198
|
+
public readonly requestCpu: string;
|
|
3199
|
+
```
|
|
3200
|
+
|
|
3201
|
+
- *Type:* string
|
|
3202
|
+
- *Default:* operator default
|
|
3203
|
+
|
|
3204
|
+
CPU request for the tracer sidecar.
|
|
3205
|
+
|
|
3206
|
+
---
|
|
3207
|
+
|
|
3208
|
+
##### `requestMemory`<sup>Optional</sup> <a name="requestMemory" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestMemory"></a>
|
|
3209
|
+
|
|
3210
|
+
```typescript
|
|
3211
|
+
public readonly requestMemory: string;
|
|
3212
|
+
```
|
|
3213
|
+
|
|
3214
|
+
- *Type:* string
|
|
3215
|
+
- *Default:* operator default
|
|
3216
|
+
|
|
3217
|
+
Memory request for the tracer sidecar.
|
|
3218
|
+
|
|
3219
|
+
---
|
|
3220
|
+
|
|
3221
|
+
##### `serviceName`<sup>Optional</sup> <a name="serviceName" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.serviceName"></a>
|
|
3222
|
+
|
|
3223
|
+
```typescript
|
|
3224
|
+
public readonly serviceName: string;
|
|
3225
|
+
```
|
|
3226
|
+
|
|
3227
|
+
- *Type:* string
|
|
3228
|
+
- *Default:* operator default (the VinylCache name)
|
|
3229
|
+
|
|
3230
|
+
OpenTelemetry `service.name` of the exported spans.
|
|
3231
|
+
|
|
3232
|
+
---
|
|
3233
|
+
|
|
2990
3234
|
|
|
2991
3235
|
|
|
2992
3236
|
## Enums <a name="Enums" id="Enums"></a>
|
|
@@ -19,7 +19,9 @@ myst:
|
|
|
19
19
|
|
|
20
20
|
## Prerequisites
|
|
21
21
|
|
|
22
|
-
- The **cloud-vinyl operator** must be installed in your cluster
|
|
22
|
+
- The **cloud-vinyl operator 1.0.0-rc.2 or later** must be installed in your cluster.
|
|
23
|
+
`PloneVinylCache` renders `vinyl.bluedynamics.eu/v1`, which earlier releases do not serve.
|
|
24
|
+
Apply the CRD server-side, as described in the cloud-vinyl release notes.
|
|
23
25
|
- A working Plone deployment using `cdk8s-plone`
|
|
24
26
|
- `@bluedynamics/cdk8s-plone` version with VinylCache support
|
|
25
27
|
|
|
@@ -134,28 +136,36 @@ new PloneVinylCache(chart, 'cache', {
|
|
|
134
136
|
});
|
|
135
137
|
```
|
|
136
138
|
|
|
139
|
+
(vinyl-cache-invalidation)=
|
|
140
|
+
|
|
137
141
|
### Cache invalidation
|
|
138
142
|
|
|
139
143
|
Invalidation is enabled by default (PURGE, BAN, xkey). Configure `plone.cachepurging` to point to the VinylCache invalidation proxy endpoint.
|
|
140
144
|
|
|
141
145
|
The proxy serves the caches of all namespaces and routes by `Host`, so the address must include the namespace.
|
|
142
|
-
Give the chart a namespace and read the address from `invalidationUrl`:
|
|
146
|
+
Give the chart a namespace, list the public hostnames of the site in `purgeHosts`, and read the address from `invalidationUrl`:
|
|
143
147
|
|
|
144
148
|
```typescript
|
|
145
149
|
const chart = new Chart(app, 'site', { namespace: 'plone' });
|
|
146
|
-
const cache = new PloneVinylCache(chart, 'cache', {
|
|
150
|
+
const cache = new PloneVinylCache(chart, 'cache', {
|
|
151
|
+
plone,
|
|
152
|
+
purgeHosts: ['example.org', 'www.example.org'],
|
|
153
|
+
});
|
|
147
154
|
// http://<cache>-invalidation.plone:8090
|
|
148
155
|
console.log(cache.invalidationUrl);
|
|
149
156
|
```
|
|
150
157
|
|
|
158
|
+
Varnish keys a cached page by its URL and its site host.
|
|
159
|
+
`plone.cachepurging` cannot tell the proxy the site host, so the proxy sends one purge per entry in `purgeHosts`.
|
|
160
|
+
Without `purgeHosts`, its purges succeed but remove nothing, and pages only change after their TTL.
|
|
161
|
+
To check that purges work, watch `vinyl_objects_purged_total`.
|
|
162
|
+
|
|
151
163
|
Enter this value as a caching proxy in the `plone.cachepurging` settings.
|
|
152
164
|
Do not build the address from `vinylCacheServiceName` yourself: the proxy rejects the bare `<cache>-invalidation` name with `404 unknown cache`, and `plone.cachepurging` does not log failed purges.
|
|
153
165
|
`invalidationUrl` throws if the chart has no namespace or if `invalidation` is disabled.
|
|
154
166
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Starting with 0.4.2 the operator's own pod IP is automatically added to the PURGE ACL, so purges from the operator itself work without additional configuration.
|
|
158
|
-
:::
|
|
167
|
+
cloud-vinyl handles PURGE, BAN, and xkey requests in its own VCL with its own access lists.
|
|
168
|
+
A custom `vclRecvSnippet` only runs for `GET` and `HEAD` requests and must not handle them.
|
|
159
169
|
|
|
160
170
|
To disable invalidation:
|
|
161
171
|
|
|
@@ -166,15 +176,38 @@ new PloneVinylCache(chart, 'cache', {
|
|
|
166
176
|
});
|
|
167
177
|
```
|
|
168
178
|
|
|
179
|
+
### Tracing
|
|
180
|
+
|
|
181
|
+
To export OpenTelemetry trace spans built from the Varnish log, point the vinyl-tracer sidecar at your collector:
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
new PloneVinylCache(chart, 'cache', {
|
|
185
|
+
plone: plone,
|
|
186
|
+
tracing: {
|
|
187
|
+
otlpEndpoint: 'otel-collector.monitoring:4317', // host:port, no scheme
|
|
188
|
+
insecure: true, // plain gRPC inside the cluster
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`protocol` selects `'grpc'` (default) or `'http/protobuf'`, and `serviceName` sets the OpenTelemetry `service.name`, which defaults to the VinylCache name.
|
|
194
|
+
The tracer needs a varnish 9 image, such as the default.
|
|
195
|
+
|
|
196
|
+
### Edge Side Includes
|
|
197
|
+
|
|
198
|
+
Set `esi: true` to process Edge Side Includes in backend responses that carry `Surrogate-Control: content="ESI/1.0"`.
|
|
199
|
+
Do not enable ESI with `varnishParameters: { feature: '+esi' }`: that is not a varnishd feature bit, and varnishd fails to start.
|
|
200
|
+
If response bodies do not start with `<`, also set `varnishParameters: { feature: '+esi_disable_xml_check' }`.
|
|
201
|
+
|
|
169
202
|
### Shard director tuning
|
|
170
203
|
|
|
171
|
-
For shard-based load distribution (the default), you can fine-tune the consistent-hash behavior.
|
|
204
|
+
For shard-based load distribution (the default), you can fine-tune the consistent-hash behavior.
|
|
172
205
|
|
|
173
206
|
```typescript
|
|
174
207
|
new PloneVinylCache(chart, 'cache', {
|
|
175
208
|
plone: plone,
|
|
176
209
|
director: 'shard',
|
|
177
|
-
shardBy: 'URL', //
|
|
210
|
+
shardBy: 'URL', // the only supported value; cloud-vinyl 1.0 removed 'HASH'
|
|
178
211
|
shardHealthy: 'ALL', // require all backends healthy (vs. only "CHOSEN")
|
|
179
212
|
shardRampup: '45s', // warm-up window for newly added backends
|
|
180
213
|
shardReplicas: 128, // Ketama replicas per backend
|
|
@@ -183,6 +216,22 @@ new PloneVinylCache(chart, 'cache', {
|
|
|
183
216
|
|
|
184
217
|
Shard options are ignored for non-shard directors (`round_robin`, `random`, `hash`).
|
|
185
218
|
|
|
219
|
+
## Upgrading from cloud-vinyl 0.x
|
|
220
|
+
|
|
221
|
+
This `cdk8s-plone` release targets cloud-vinyl 1.0.
|
|
222
|
+
|
|
223
|
+
1. Upgrade the operator and its CRD to 1.0.0-rc.2 or later first, following the cloud-vinyl release notes.
|
|
224
|
+
The new manifests use `vinyl.bluedynamics.eu/v1`, which older operators reject.
|
|
225
|
+
2. Set `purgeHosts` if you use `plone.cachepurging`, see {ref}`vinyl-cache-invalidation`.
|
|
226
|
+
3. Review the manifest diff:
|
|
227
|
+
- `apiVersion` changes from `v1alpha1` to `v1`.
|
|
228
|
+
- The default image changes from `varnish:7.6` to `varnish:9.1.0`, the image cloud-vinyl 1.0 is tested with.
|
|
229
|
+
Set `image` to keep another one.
|
|
230
|
+
- The default `vclRecv` snippet no longer contains PURGE and BAN handling.
|
|
231
|
+
Since cloud-vinyl 0.7.0 it did not compile, so caches with the default snippet never became ready.
|
|
232
|
+
4. Replace `shardBy: 'HASH'` with `'URL'` or drop it.
|
|
233
|
+
cloud-vinyl 1.0 removed `HASH`, and `PloneVinylCache` rejects it.
|
|
234
|
+
|
|
186
235
|
## Migrating from PloneHttpcache
|
|
187
236
|
|
|
188
237
|
Replace `PloneHttpcache` with `PloneVinylCache`:
|
|
@@ -38,8 +38,18 @@ cdk8s synth
|
|
|
38
38
|
kubectl apply -f dist/
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Kubernetes replaces the pods with the
|
|
42
|
-
|
|
41
|
+
Kubernetes replaces the pods with the RollingUpdate strategy.
|
|
42
|
+
By default it removes up to a quarter of the old pods before new ones are ready.
|
|
43
|
+
Plone takes a while to become ready, so the site runs with less capacity during the rollout.
|
|
44
|
+
To keep full capacity, start new pods first and remove old ones only when replacements are ready:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
backend: {
|
|
48
|
+
rollingUpdate: { maxUnavailable: 0, maxSurge: '50%' },
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The cluster needs room for the extra pods while the rollout runs.
|
|
43
53
|
|
|
44
54
|
```{important}
|
|
45
55
|
Upgrading to a new Plone major or minor version may require a Plone site upgrade step that `cdk8s-plone` does not perform.
|
|
@@ -98,6 +98,17 @@ backend: {
|
|
|
98
98
|
}
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
`rollingUpdate` controls how a Deployment replaces its pods during an update (`spec.strategy.rollingUpdate`).
|
|
102
|
+
It is independent of the top-level `maxUnavailable` and `minAvailable`, which configure the PodDisruptionBudget.
|
|
103
|
+
Both fields take an absolute number or a percentage string.
|
|
104
|
+
Without the option, Kubernetes uses 25% for both.
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
backend: {
|
|
108
|
+
rollingUpdate: { maxUnavailable: 0, maxSurge: '50%' }, // no capacity dip during rollouts
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
101
112
|
### Probes
|
|
102
113
|
|
|
103
114
|
Readiness probes are enabled by default; liveness probes are **disabled** by default.
|
|
@@ -138,6 +149,8 @@ It requires Kubernetes 1.30 or later.
|
|
|
138
149
|
|
|
139
150
|
Configure the generated Kubernetes `Service` through the grouped `service` option.
|
|
140
151
|
Curated fields cover the common cases; `service.overrides` is an escape hatch for any other `ServiceSpec` field and has the highest precedence.
|
|
152
|
+
Write overrides in their manifest form, for example `clusterIP` or `targetPort: 8080`.
|
|
153
|
+
Each top-level key replaces the field as a whole.
|
|
141
154
|
|
|
142
155
|
```typescript
|
|
143
156
|
backend: {
|
package/lib/deployment.d.ts
CHANGED
|
@@ -24,6 +24,24 @@ export interface PloneImageOptions {
|
|
|
24
24
|
*/
|
|
25
25
|
readonly imagePullPolicy?: string;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Rolling update settings for a Deployment (`spec.strategy.rollingUpdate`).
|
|
29
|
+
*/
|
|
30
|
+
export interface PloneRollingUpdate {
|
|
31
|
+
/**
|
|
32
|
+
* Maximum number of pods created above the desired replica count during
|
|
33
|
+
* an update, as an absolute number (e.g. 1) or a percentage (e.g. '50%').
|
|
34
|
+
* @default - Kubernetes default ('25%')
|
|
35
|
+
*/
|
|
36
|
+
readonly maxSurge?: number | string;
|
|
37
|
+
/**
|
|
38
|
+
* Maximum number of pods that can be unavailable during an update, as an
|
|
39
|
+
* absolute number (e.g. 0) or a percentage (e.g. '25%'). Not to be confused
|
|
40
|
+
* with the PodDisruptionBudget's `maxUnavailable`.
|
|
41
|
+
* @default - Kubernetes default ('25%')
|
|
42
|
+
*/
|
|
43
|
+
readonly maxUnavailable?: number | string;
|
|
44
|
+
}
|
|
27
45
|
/**
|
|
28
46
|
* Configuration options for PloneDeployment.
|
|
29
47
|
*/
|
|
@@ -149,6 +167,11 @@ export interface PloneDeploymentOptions {
|
|
|
149
167
|
* @default - `preStopDelaySeconds` + 30, which keeps the Kubernetes default of 30 seconds for the shutdown itself
|
|
150
168
|
*/
|
|
151
169
|
readonly terminationGracePeriodSeconds?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Rolling update settings, see `PloneRollingUpdate`.
|
|
172
|
+
* @default - Kubernetes default strategy
|
|
173
|
+
*/
|
|
174
|
+
readonly rollingUpdate?: PloneRollingUpdate;
|
|
152
175
|
}
|
|
153
176
|
/**
|
|
154
177
|
* PloneDeployment creates a Kubernetes Deployment for Plone containers.
|