@bluedynamics/cdk8s-plone 0.2.0 → 0.2.2
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 +297 -65
- package/API.md +186 -0
- package/documentation/sources/how-to/deploy-with-vinyl-cache.md +40 -0
- package/lib/httpcache.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/plone.js +1 -1
- package/lib/vinylcache.d.ts +75 -0
- package/lib/vinylcache.js +73 -23
- package/package.json +1 -1
package/API.md
CHANGED
|
@@ -2173,6 +2173,7 @@ const ploneVinylCacheOptions: PloneVinylCacheOptions = { ... }
|
|
|
2173
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. |
|
|
2174
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`). |
|
|
2175
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. |
|
|
2176
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. |
|
|
2177
2178
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.image">image</a></code> | <code>string</code> | Container image for the Varnish pods. |
|
|
2178
2179
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.invalidation">invalidation</a></code> | <code>boolean</code> | Enable cache invalidation (PURGE, BAN, xkey). |
|
|
@@ -2180,6 +2181,8 @@ const ploneVinylCacheOptions: PloneVinylCacheOptions = { ... }
|
|
|
2180
2181
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.limitMemory">limitMemory</a></code> | <code>string</code> | Memory limit for Varnish pods. |
|
|
2181
2182
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.monitoring">monitoring</a></code> | <code>boolean</code> | Enable Prometheus monitoring. |
|
|
2182
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.ploneBackendProbe">ploneBackendProbe</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheBackendProbe">VinylCacheBackendProbe</a></code> | Probe settings for the auto-generated Plone backend, merged field by field over the defaults, e.g. `{ timeout: '5s' }` for slow warm-up queries. `threshold` must not exceed `window`, and `window` must be 64 or less. |
|
|
2185
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.ploneFrontendProbe">ploneFrontendProbe</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheBackendProbe">VinylCacheBackendProbe</a></code> | Probe settings for the auto-generated Plone frontend (Volto variant only), merged field by field over the defaults, see `ploneBackendProbe`. |
|
|
2183
2186
|
| <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`). |
|
|
2184
2187
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.replicas">replicas</a></code> | <code>number</code> | Number of Varnish pod replicas. |
|
|
2185
2188
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.requestCpu">requestCpu</a></code> | <code>string</code> | CPU request for Varnish pods. |
|
|
@@ -2190,6 +2193,7 @@ const ploneVinylCacheOptions: PloneVinylCacheOptions = { ... }
|
|
|
2190
2193
|
| <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. |
|
|
2191
2194
|
| <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`). |
|
|
2192
2195
|
| <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. |
|
|
2196
|
+
| <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. |
|
|
2193
2197
|
| <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' }`. |
|
|
2194
2198
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclBackendErrorSnippet">vclBackendErrorSnippet</a></code> | <code>string</code> | Custom VCL snippet for vcl_backend_error subroutine. |
|
|
2195
2199
|
| <code><a href="#@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.vclBackendFetchSnippet">vclBackendFetchSnippet</a></code> | <code>string</code> | Custom VCL snippet for vcl_backend_fetch subroutine. |
|
|
@@ -2254,6 +2258,19 @@ Director type for load distribution.
|
|
|
2254
2258
|
|
|
2255
2259
|
---
|
|
2256
2260
|
|
|
2261
|
+
##### `esi`<sup>Optional</sup> <a name="esi" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.esi"></a>
|
|
2262
|
+
|
|
2263
|
+
```typescript
|
|
2264
|
+
public readonly esi: boolean;
|
|
2265
|
+
```
|
|
2266
|
+
|
|
2267
|
+
- *Type:* boolean
|
|
2268
|
+
- *Default:* not set; no ESI processing
|
|
2269
|
+
|
|
2270
|
+
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.
|
|
2271
|
+
|
|
2272
|
+
---
|
|
2273
|
+
|
|
2257
2274
|
##### `extraBackends`<sup>Optional</sup> <a name="extraBackends" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.extraBackends"></a>
|
|
2258
2275
|
|
|
2259
2276
|
```typescript
|
|
@@ -2355,6 +2372,32 @@ Constrains pods to nodes matching all specified labels.
|
|
|
2355
2372
|
|
|
2356
2373
|
---
|
|
2357
2374
|
|
|
2375
|
+
##### `ploneBackendProbe`<sup>Optional</sup> <a name="ploneBackendProbe" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.ploneBackendProbe"></a>
|
|
2376
|
+
|
|
2377
|
+
```typescript
|
|
2378
|
+
public readonly ploneBackendProbe: VinylCacheBackendProbe;
|
|
2379
|
+
```
|
|
2380
|
+
|
|
2381
|
+
- *Type:* <a href="#@bluedynamics/cdk8s-plone.VinylCacheBackendProbe">VinylCacheBackendProbe</a>
|
|
2382
|
+
- *Default:* { url: '/ok', interval: '5s', timeout: '2s', window: 10, threshold: 8 }
|
|
2383
|
+
|
|
2384
|
+
Probe settings for the auto-generated Plone backend, merged field by field over the defaults, e.g. `{ timeout: '5s' }` for slow warm-up queries. `threshold` must not exceed `window`, and `window` must be 64 or less.
|
|
2385
|
+
|
|
2386
|
+
---
|
|
2387
|
+
|
|
2388
|
+
##### `ploneFrontendProbe`<sup>Optional</sup> <a name="ploneFrontendProbe" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.ploneFrontendProbe"></a>
|
|
2389
|
+
|
|
2390
|
+
```typescript
|
|
2391
|
+
public readonly ploneFrontendProbe: VinylCacheBackendProbe;
|
|
2392
|
+
```
|
|
2393
|
+
|
|
2394
|
+
- *Type:* <a href="#@bluedynamics/cdk8s-plone.VinylCacheBackendProbe">VinylCacheBackendProbe</a>
|
|
2395
|
+
- *Default:* { url: '/', interval: '5s', timeout: '2s', window: 10, threshold: 8 }
|
|
2396
|
+
|
|
2397
|
+
Probe settings for the auto-generated Plone frontend (Volto variant only), merged field by field over the defaults, see `ploneBackendProbe`.
|
|
2398
|
+
|
|
2399
|
+
---
|
|
2400
|
+
|
|
2358
2401
|
##### `purgeHosts`<sup>Optional</sup> <a name="purgeHosts" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.purgeHosts"></a>
|
|
2359
2402
|
|
|
2360
2403
|
```typescript
|
|
@@ -2521,6 +2564,19 @@ Tolerations for the Varnish pods.
|
|
|
2521
2564
|
|
|
2522
2565
|
---
|
|
2523
2566
|
|
|
2567
|
+
##### `tracing`<sup>Optional</sup> <a name="tracing" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.tracing"></a>
|
|
2568
|
+
|
|
2569
|
+
```typescript
|
|
2570
|
+
public readonly tracing: VinylCacheTracing;
|
|
2571
|
+
```
|
|
2572
|
+
|
|
2573
|
+
- *Type:* <a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing">VinylCacheTracing</a>
|
|
2574
|
+
- *Default:* no tracing
|
|
2575
|
+
|
|
2576
|
+
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.
|
|
2577
|
+
|
|
2578
|
+
---
|
|
2579
|
+
|
|
2524
2580
|
##### `varnishParameters`<sup>Optional</sup> <a name="varnishParameters" id="@bluedynamics/cdk8s-plone.PloneVinylCacheOptions.property.varnishParameters"></a>
|
|
2525
2581
|
|
|
2526
2582
|
```typescript
|
|
@@ -3073,6 +3129,136 @@ The taint value to match (when operator is Equal).
|
|
|
3073
3129
|
|
|
3074
3130
|
---
|
|
3075
3131
|
|
|
3132
|
+
### VinylCacheTracing <a name="VinylCacheTracing" id="@bluedynamics/cdk8s-plone.VinylCacheTracing"></a>
|
|
3133
|
+
|
|
3134
|
+
Tracer sidecar configuration (`spec.tracing`), see `PloneVinylCacheOptions.tracing`.
|
|
3135
|
+
|
|
3136
|
+
#### Initializer <a name="Initializer" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.Initializer"></a>
|
|
3137
|
+
|
|
3138
|
+
```typescript
|
|
3139
|
+
import { VinylCacheTracing } from '@bluedynamics/cdk8s-plone'
|
|
3140
|
+
|
|
3141
|
+
const vinylCacheTracing: VinylCacheTracing = { ... }
|
|
3142
|
+
```
|
|
3143
|
+
|
|
3144
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
3145
|
+
|
|
3146
|
+
| **Name** | **Type** | **Description** |
|
|
3147
|
+
| --- | --- | --- |
|
|
3148
|
+
| <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'`. |
|
|
3149
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.insecure">insecure</a></code> | <code>boolean</code> | Disable TLS for the OTLP connection. |
|
|
3150
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitCpu">limitCpu</a></code> | <code>string</code> | CPU limit for the tracer sidecar. |
|
|
3151
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitMemory">limitMemory</a></code> | <code>string</code> | Memory limit for the tracer sidecar. |
|
|
3152
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.protocol">protocol</a></code> | <code>string</code> | OTLP transport: `'grpc'` or `'http/protobuf'`. |
|
|
3153
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestCpu">requestCpu</a></code> | <code>string</code> | CPU request for the tracer sidecar. |
|
|
3154
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestMemory">requestMemory</a></code> | <code>string</code> | Memory request for the tracer sidecar. |
|
|
3155
|
+
| <code><a href="#@bluedynamics/cdk8s-plone.VinylCacheTracing.property.serviceName">serviceName</a></code> | <code>string</code> | OpenTelemetry `service.name` of the exported spans. |
|
|
3156
|
+
|
|
3157
|
+
---
|
|
3158
|
+
|
|
3159
|
+
##### `otlpEndpoint`<sup>Required</sup> <a name="otlpEndpoint" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.otlpEndpoint"></a>
|
|
3160
|
+
|
|
3161
|
+
```typescript
|
|
3162
|
+
public readonly otlpEndpoint: string;
|
|
3163
|
+
```
|
|
3164
|
+
|
|
3165
|
+
- *Type:* string
|
|
3166
|
+
|
|
3167
|
+
OTLP collector address as `host:port`, without scheme, e.g. `'otel-collector.monitoring:4317'`.
|
|
3168
|
+
|
|
3169
|
+
---
|
|
3170
|
+
|
|
3171
|
+
##### `insecure`<sup>Optional</sup> <a name="insecure" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.insecure"></a>
|
|
3172
|
+
|
|
3173
|
+
```typescript
|
|
3174
|
+
public readonly insecure: boolean;
|
|
3175
|
+
```
|
|
3176
|
+
|
|
3177
|
+
- *Type:* boolean
|
|
3178
|
+
- *Default:* false
|
|
3179
|
+
|
|
3180
|
+
Disable TLS for the OTLP connection.
|
|
3181
|
+
|
|
3182
|
+
---
|
|
3183
|
+
|
|
3184
|
+
##### `limitCpu`<sup>Optional</sup> <a name="limitCpu" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitCpu"></a>
|
|
3185
|
+
|
|
3186
|
+
```typescript
|
|
3187
|
+
public readonly limitCpu: string;
|
|
3188
|
+
```
|
|
3189
|
+
|
|
3190
|
+
- *Type:* string
|
|
3191
|
+
- *Default:* operator default
|
|
3192
|
+
|
|
3193
|
+
CPU limit for the tracer sidecar.
|
|
3194
|
+
|
|
3195
|
+
---
|
|
3196
|
+
|
|
3197
|
+
##### `limitMemory`<sup>Optional</sup> <a name="limitMemory" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.limitMemory"></a>
|
|
3198
|
+
|
|
3199
|
+
```typescript
|
|
3200
|
+
public readonly limitMemory: string;
|
|
3201
|
+
```
|
|
3202
|
+
|
|
3203
|
+
- *Type:* string
|
|
3204
|
+
- *Default:* operator default
|
|
3205
|
+
|
|
3206
|
+
Memory limit for the tracer sidecar.
|
|
3207
|
+
|
|
3208
|
+
---
|
|
3209
|
+
|
|
3210
|
+
##### `protocol`<sup>Optional</sup> <a name="protocol" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.protocol"></a>
|
|
3211
|
+
|
|
3212
|
+
```typescript
|
|
3213
|
+
public readonly protocol: string;
|
|
3214
|
+
```
|
|
3215
|
+
|
|
3216
|
+
- *Type:* string
|
|
3217
|
+
- *Default:* operator default ('grpc')
|
|
3218
|
+
|
|
3219
|
+
OTLP transport: `'grpc'` or `'http/protobuf'`.
|
|
3220
|
+
|
|
3221
|
+
---
|
|
3222
|
+
|
|
3223
|
+
##### `requestCpu`<sup>Optional</sup> <a name="requestCpu" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestCpu"></a>
|
|
3224
|
+
|
|
3225
|
+
```typescript
|
|
3226
|
+
public readonly requestCpu: string;
|
|
3227
|
+
```
|
|
3228
|
+
|
|
3229
|
+
- *Type:* string
|
|
3230
|
+
- *Default:* operator default
|
|
3231
|
+
|
|
3232
|
+
CPU request for the tracer sidecar.
|
|
3233
|
+
|
|
3234
|
+
---
|
|
3235
|
+
|
|
3236
|
+
##### `requestMemory`<sup>Optional</sup> <a name="requestMemory" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.requestMemory"></a>
|
|
3237
|
+
|
|
3238
|
+
```typescript
|
|
3239
|
+
public readonly requestMemory: string;
|
|
3240
|
+
```
|
|
3241
|
+
|
|
3242
|
+
- *Type:* string
|
|
3243
|
+
- *Default:* operator default
|
|
3244
|
+
|
|
3245
|
+
Memory request for the tracer sidecar.
|
|
3246
|
+
|
|
3247
|
+
---
|
|
3248
|
+
|
|
3249
|
+
##### `serviceName`<sup>Optional</sup> <a name="serviceName" id="@bluedynamics/cdk8s-plone.VinylCacheTracing.property.serviceName"></a>
|
|
3250
|
+
|
|
3251
|
+
```typescript
|
|
3252
|
+
public readonly serviceName: string;
|
|
3253
|
+
```
|
|
3254
|
+
|
|
3255
|
+
- *Type:* string
|
|
3256
|
+
- *Default:* operator default (the VinylCache name)
|
|
3257
|
+
|
|
3258
|
+
OpenTelemetry `service.name` of the exported spans.
|
|
3259
|
+
|
|
3260
|
+
---
|
|
3261
|
+
|
|
3076
3262
|
|
|
3077
3263
|
|
|
3078
3264
|
## Enums <a name="Enums" id="Enums"></a>
|
|
@@ -124,6 +124,23 @@ new PloneVinylCache(chart, 'cache', {
|
|
|
124
124
|
`varnishParameters` become `-p` flags for varnishd.
|
|
125
125
|
varnishd's default `nuke_limit` of 50 makes a large fetch fail with `Could not get storage` when 50 evictions do not free enough space, and the client gets a 503.
|
|
126
126
|
|
|
127
|
+
### Backend health probes
|
|
128
|
+
|
|
129
|
+
Varnish probes each Plone backend and stops sending requests to a backend that fails too many probes.
|
|
130
|
+
The defaults are `{ url: '/ok', interval: '5s', timeout: '2s', window: 10, threshold: 8 }` for the backend and the same with `url: '/'` for the frontend.
|
|
131
|
+
If slow requests, for example while the database warms up, make probes time out, raise the timeout:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
new PloneVinylCache(chart, 'cache', {
|
|
135
|
+
plone: plone,
|
|
136
|
+
ploneBackendProbe: { timeout: '5s' }, // other fields keep their defaults
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`ploneFrontendProbe` does the same for the Volto frontend, and `extraBackends[].probe` for additional backends.
|
|
141
|
+
`threshold` must not exceed `window`, and `window` must be 64 or less, otherwise varnishd rejects the VCL.
|
|
142
|
+
The construct checks this when you synthesize.
|
|
143
|
+
|
|
127
144
|
### Custom VCL
|
|
128
145
|
|
|
129
146
|
Override the default Plone VCL snippets for custom caching logic:
|
|
@@ -176,6 +193,29 @@ new PloneVinylCache(chart, 'cache', {
|
|
|
176
193
|
});
|
|
177
194
|
```
|
|
178
195
|
|
|
196
|
+
### Tracing
|
|
197
|
+
|
|
198
|
+
To export OpenTelemetry trace spans built from the Varnish log, point the vinyl-tracer sidecar at your collector:
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
new PloneVinylCache(chart, 'cache', {
|
|
202
|
+
plone: plone,
|
|
203
|
+
tracing: {
|
|
204
|
+
otlpEndpoint: 'otel-collector.monitoring:4317', // host:port, no scheme
|
|
205
|
+
insecure: true, // plain gRPC inside the cluster
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
`protocol` selects `'grpc'` (default) or `'http/protobuf'`, and `serviceName` sets the OpenTelemetry `service.name`, which defaults to the VinylCache name.
|
|
211
|
+
The tracer needs a varnish 9 image, such as the default.
|
|
212
|
+
|
|
213
|
+
### Edge Side Includes
|
|
214
|
+
|
|
215
|
+
Set `esi: true` to process Edge Side Includes in backend responses that carry `Surrogate-Control: content="ESI/1.0"`.
|
|
216
|
+
Do not enable ESI with `varnishParameters: { feature: '+esi' }`: that is not a varnishd feature bit, and varnishd fails to start.
|
|
217
|
+
If response bodies do not start with `<`, also set `varnishParameters: { feature: '+esi_disable_xml_check' }`.
|
|
218
|
+
|
|
179
219
|
### Shard director tuning
|
|
180
220
|
|
|
181
221
|
For shard-based load distribution (the default), you can fine-tune the consistent-hash behavior.
|
package/lib/httpcache.js
CHANGED
|
@@ -56,7 +56,7 @@ const constructs_1 = require("constructs");
|
|
|
56
56
|
* });
|
|
57
57
|
*/
|
|
58
58
|
class PloneHttpcache extends constructs_1.Construct {
|
|
59
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.PloneHttpcache", version: "0.2.
|
|
59
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.PloneHttpcache", version: "0.2.2" };
|
|
60
60
|
/**
|
|
61
61
|
* Name of the Varnish service created by the Helm chart.
|
|
62
62
|
* Use this to reference the cache service from ingress or other constructs.
|
package/lib/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { Plone, PloneOptions, PloneBaseOptions, PloneVariant, PloneSecurityConte
|
|
|
2
2
|
export { PloneRollingUpdate } from './deployment';
|
|
3
3
|
export { PloneServiceSpec } from './service';
|
|
4
4
|
export { PloneHttpcache, PloneHttpcacheOptions, HttpcacheEnvVar, HttpcacheToleration } from './httpcache';
|
|
5
|
-
export { PloneVinylCache, PloneVinylCacheOptions, VinylCacheToleration, VinylCacheBackend, VinylCacheBackendProbe, VinylCacheStorage } from './vinylcache';
|
|
5
|
+
export { PloneVinylCache, PloneVinylCacheOptions, VinylCacheToleration, VinylCacheBackend, VinylCacheBackendProbe, VinylCacheStorage, VinylCacheTracing } from './vinylcache';
|
package/lib/index.js
CHANGED
|
@@ -8,4 +8,4 @@ var httpcache_1 = require("./httpcache");
|
|
|
8
8
|
Object.defineProperty(exports, "PloneHttpcache", { enumerable: true, get: function () { return httpcache_1.PloneHttpcache; } });
|
|
9
9
|
var vinylcache_1 = require("./vinylcache");
|
|
10
10
|
Object.defineProperty(exports, "PloneVinylCache", { enumerable: true, get: function () { return vinylcache_1.PloneVinylCache; } });
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQXVIO0FBQTlHLDhGQUFBLEtBQUssT0FBQTtBQUFrQyxxR0FBQSxZQUFZLE9BQUE7QUFHNUQseUNBQTBHO0FBQWpHLDJHQUFBLGNBQWMsT0FBQTtBQUN2QiwyQ0FBOEs7QUFBckssNkdBQUEsZUFBZSxPQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgUGxvbmUsIFBsb25lT3B0aW9ucywgUGxvbmVCYXNlT3B0aW9ucywgUGxvbmVWYXJpYW50LCBQbG9uZVNlY3VyaXR5Q29udGV4dCwgUGxvbmVDYXBhYmlsaXRpZXMgfSBmcm9tICcuL3Bsb25lJztcbmV4cG9ydCB7IFBsb25lUm9sbGluZ1VwZGF0ZSB9IGZyb20gJy4vZGVwbG95bWVudCc7XG5leHBvcnQgeyBQbG9uZVNlcnZpY2VTcGVjIH0gZnJvbSAnLi9zZXJ2aWNlJztcbmV4cG9ydCB7IFBsb25lSHR0cGNhY2hlLCBQbG9uZUh0dHBjYWNoZU9wdGlvbnMsIEh0dHBjYWNoZUVudlZhciwgSHR0cGNhY2hlVG9sZXJhdGlvbiB9IGZyb20gJy4vaHR0cGNhY2hlJztcbmV4cG9ydCB7IFBsb25lVmlueWxDYWNoZSwgUGxvbmVWaW55bENhY2hlT3B0aW9ucywgVmlueWxDYWNoZVRvbGVyYXRpb24sIFZpbnlsQ2FjaGVCYWNrZW5kLCBWaW55bENhY2hlQmFja2VuZFByb2JlLCBWaW55bENhY2hlU3RvcmFnZSwgVmlueWxDYWNoZVRyYWNpbmcgfSBmcm9tICcuL3ZpbnlsY2FjaGUnO1xuIl19
|
package/lib/plone.js
CHANGED
|
@@ -91,7 +91,7 @@ var PloneVariant;
|
|
|
91
91
|
* });
|
|
92
92
|
*/
|
|
93
93
|
class Plone extends constructs_1.Construct {
|
|
94
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.Plone", version: "0.2.
|
|
94
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.Plone", version: "0.2.2" };
|
|
95
95
|
/**
|
|
96
96
|
* Name of the backend Kubernetes service.
|
|
97
97
|
* Use this to reference the backend service from other constructs.
|
package/lib/vinylcache.d.ts
CHANGED
|
@@ -62,6 +62,51 @@ export interface VinylCacheBackend {
|
|
|
62
62
|
*/
|
|
63
63
|
readonly weight?: number;
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Tracer sidecar configuration (`spec.tracing`), see `PloneVinylCacheOptions.tracing`.
|
|
67
|
+
*/
|
|
68
|
+
export interface VinylCacheTracing {
|
|
69
|
+
/**
|
|
70
|
+
* OTLP collector address as `host:port`, without scheme,
|
|
71
|
+
* e.g. `'otel-collector.monitoring:4317'`.
|
|
72
|
+
*/
|
|
73
|
+
readonly otlpEndpoint: string;
|
|
74
|
+
/**
|
|
75
|
+
* OTLP transport: `'grpc'` or `'http/protobuf'`.
|
|
76
|
+
* @default - operator default ('grpc')
|
|
77
|
+
*/
|
|
78
|
+
readonly protocol?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Disable TLS for the OTLP connection.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
readonly insecure?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* OpenTelemetry `service.name` of the exported spans.
|
|
86
|
+
* @default - operator default (the VinylCache name)
|
|
87
|
+
*/
|
|
88
|
+
readonly serviceName?: string;
|
|
89
|
+
/**
|
|
90
|
+
* CPU request for the tracer sidecar.
|
|
91
|
+
* @default - operator default
|
|
92
|
+
*/
|
|
93
|
+
readonly requestCpu?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Memory request for the tracer sidecar.
|
|
96
|
+
* @default - operator default
|
|
97
|
+
*/
|
|
98
|
+
readonly requestMemory?: string;
|
|
99
|
+
/**
|
|
100
|
+
* CPU limit for the tracer sidecar.
|
|
101
|
+
* @default - operator default
|
|
102
|
+
*/
|
|
103
|
+
readonly limitCpu?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Memory limit for the tracer sidecar.
|
|
106
|
+
* @default - operator default
|
|
107
|
+
*/
|
|
108
|
+
readonly limitMemory?: string;
|
|
109
|
+
}
|
|
65
110
|
/**
|
|
66
111
|
* A Varnish storage backend configuration.
|
|
67
112
|
*
|
|
@@ -139,6 +184,19 @@ export interface PloneVinylCacheOptions {
|
|
|
139
184
|
* @default - no extra backends
|
|
140
185
|
*/
|
|
141
186
|
readonly extraBackends?: VinylCacheBackend[];
|
|
187
|
+
/**
|
|
188
|
+
* Probe settings for the auto-generated Plone backend, merged field by field
|
|
189
|
+
* over the defaults, e.g. `{ timeout: '5s' }` for slow warm-up queries.
|
|
190
|
+
* `threshold` must not exceed `window`, and `window` must be 64 or less.
|
|
191
|
+
* @default - { url: '/ok', interval: '5s', timeout: '2s', window: 10, threshold: 8 }
|
|
192
|
+
*/
|
|
193
|
+
readonly ploneBackendProbe?: VinylCacheBackendProbe;
|
|
194
|
+
/**
|
|
195
|
+
* Probe settings for the auto-generated Plone frontend (Volto variant only),
|
|
196
|
+
* merged field by field over the defaults, see `ploneBackendProbe`.
|
|
197
|
+
* @default - { url: '/', interval: '5s', timeout: '2s', window: 10, threshold: 8 }
|
|
198
|
+
*/
|
|
199
|
+
readonly ploneFrontendProbe?: VinylCacheBackendProbe;
|
|
142
200
|
/**
|
|
143
201
|
* Number of Varnish pod replicas.
|
|
144
202
|
* @default 2
|
|
@@ -204,6 +262,23 @@ export interface PloneVinylCacheOptions {
|
|
|
204
262
|
readonly varnishParameters?: {
|
|
205
263
|
[name: string]: string;
|
|
206
264
|
};
|
|
265
|
+
/**
|
|
266
|
+
* Export OpenTelemetry trace spans built from the Varnish log through the
|
|
267
|
+
* vinyl-tracer sidecar (`spec.tracing`). Setting it enables the tracer.
|
|
268
|
+
* Tracing needs a varnish 9 image, such as the default.
|
|
269
|
+
*
|
|
270
|
+
* @default - no tracing
|
|
271
|
+
*/
|
|
272
|
+
readonly tracing?: VinylCacheTracing;
|
|
273
|
+
/**
|
|
274
|
+
* Process Edge Side Includes (`spec.esi.enabled`) in backend responses that
|
|
275
|
+
* carry `Surrogate-Control: content="ESI/1.0"`. Do not use
|
|
276
|
+
* `varnishParameters: { feature: '+esi' }` instead: that is not a varnishd
|
|
277
|
+
* feature bit and makes varnishd fail to start.
|
|
278
|
+
*
|
|
279
|
+
* @default - not set; no ESI processing
|
|
280
|
+
*/
|
|
281
|
+
readonly esi?: boolean;
|
|
207
282
|
/**
|
|
208
283
|
* Director type for load distribution.
|
|
209
284
|
* @default 'shard'
|