@bluedynamics/cdk8s-plone 0.1.35 → 0.1.37
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 +4 -4
- package/documentation/sources/explanation/architecture.md +31 -23
- package/documentation/sources/explanation/features.md +47 -36
- package/documentation/sources/explanation/index.md +12 -3
- package/documentation/sources/how-to/configure-security-context.md +148 -0
- package/documentation/sources/how-to/deploy-classic-ui.md +57 -49
- package/documentation/sources/how-to/deploy-production-volto.md +61 -51
- package/documentation/sources/how-to/deploy-with-vinyl-cache.md +18 -9
- package/documentation/sources/how-to/enable-prometheus-monitoring.md +123 -0
- package/documentation/sources/how-to/index.md +14 -6
- package/documentation/sources/how-to/schedule-pods.md +150 -0
- package/documentation/sources/how-to/setup-prerequisites.md +53 -44
- package/documentation/sources/index.md +23 -14
- package/documentation/sources/reference/api/index.md +11 -2
- package/documentation/sources/reference/configuration-options.md +217 -50
- package/documentation/sources/reference/index.md +13 -4
- package/documentation/sources/tutorials/01-quick-start.md +27 -19
- package/documentation/sources/tutorials/index.md +10 -1
- package/lib/httpcache.js +1 -1
- package/lib/plone.js +1 -1
- package/lib/vinylcache.js +1 -1
- package/package.json +8 -8
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
myst:
|
|
3
|
+
html_meta:
|
|
4
|
+
"description": "Auto-generated API reference for cdk8s-plone constructs, interfaces, and enums."
|
|
5
|
+
"property=og:description": "Auto-generated API reference for cdk8s-plone constructs, interfaces, and enums."
|
|
6
|
+
"property=og:title": "API reference"
|
|
7
|
+
"keywords": "Plone, cdk8s, Kubernetes, API, reference, TypeScript, Python"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# API reference
|
|
2
11
|
|
|
3
12
|
Complete API reference for cdk8s-plone constructs, generated from TypeScript source code.
|
|
4
13
|
|
|
@@ -9,7 +18,7 @@ The cdk8s-plone library provides the following main constructs:
|
|
|
9
18
|
- **Plone**: Main construct for deploying Plone CMS with support for both Volto (React frontend) and Classic UI variants
|
|
10
19
|
- **PloneHttpcache**: HTTP caching layer using Varnish for improved performance
|
|
11
20
|
|
|
12
|
-
## Language
|
|
21
|
+
## Language support
|
|
13
22
|
|
|
14
23
|
This API documentation shows TypeScript usage examples. The library is also available for Python via JSII transpilation:
|
|
15
24
|
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
myst:
|
|
3
|
+
html_meta:
|
|
4
|
+
"description": "Complete reference for cdk8s-plone constructs and configuration options: Plone, PloneHttpcache, PloneVinylCache."
|
|
5
|
+
"property=og:description": "Complete reference for cdk8s-plone constructs and configuration options: Plone, PloneHttpcache, PloneVinylCache."
|
|
6
|
+
"property=og:title": "Configuration options"
|
|
7
|
+
"keywords": "Plone, cdk8s, Kubernetes, configuration, reference, Volto, Varnish"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Configuration options
|
|
2
11
|
|
|
3
12
|
Complete reference for all configuration options in cdk8s-plone.
|
|
4
13
|
|
|
5
|
-
## Key
|
|
14
|
+
## Key constructs
|
|
6
15
|
|
|
7
16
|
### `Plone`
|
|
8
17
|
|
|
@@ -56,7 +65,7 @@ new PloneHttpcache(chart, 'cache', {
|
|
|
56
65
|
|
|
57
66
|
---
|
|
58
67
|
|
|
59
|
-
## Configuration
|
|
68
|
+
## Configuration interfaces
|
|
60
69
|
|
|
61
70
|
### `PloneOptions`
|
|
62
71
|
|
|
@@ -89,14 +98,14 @@ const options: PloneOptions = {
|
|
|
89
98
|
|
|
90
99
|
Configuration for backend or frontend components.
|
|
91
100
|
|
|
92
|
-
#### Container
|
|
101
|
+
#### Container configuration
|
|
93
102
|
|
|
94
103
|
| Property | Type | Required | Default | Description |
|
|
95
104
|
|----------|------|----------|---------|-------------|
|
|
96
|
-
| `image` | `string` |
|
|
97
|
-
| `imagePullPolicy` | `string` | No | `
|
|
105
|
+
| `image` | `string` | No | `plone/plone-backend:latest` (backend) / `plone/plone-frontend:latest` (frontend) | Container image |
|
|
106
|
+
| `imagePullPolicy` | `string` | No | `IfNotPresent` | Image pull policy |
|
|
98
107
|
| `replicas` | `number` | No | `2` | Number of pod replicas |
|
|
99
|
-
| `environment` | `Env` | No | - | Environment variables (cdk8s-plus-30
|
|
108
|
+
| `environment` | `Env` | No | - | Environment variables (cdk8s-plus-30 `Env`) |
|
|
100
109
|
|
|
101
110
|
**Example:**
|
|
102
111
|
```typescript
|
|
@@ -115,14 +124,14 @@ backend: {
|
|
|
115
124
|
}
|
|
116
125
|
```
|
|
117
126
|
|
|
118
|
-
#### Resource
|
|
127
|
+
#### Resource configuration
|
|
119
128
|
|
|
120
|
-
| Property | Type | Description |
|
|
121
|
-
|
|
122
|
-
| `requestCpu` | `string` | CPU request
|
|
123
|
-
| `limitCpu` | `string` | CPU limit |
|
|
124
|
-
| `requestMemory` | `string` | Memory request
|
|
125
|
-
| `limitMemory` | `string` | Memory limit |
|
|
129
|
+
| Property | Type | Default | Description |
|
|
130
|
+
|----------|------|---------|-------------|
|
|
131
|
+
| `requestCpu` | `string` | `200m` | CPU request |
|
|
132
|
+
| `limitCpu` | `string` | `500m` | CPU limit |
|
|
133
|
+
| `requestMemory` | `string` | `256Mi` | Memory request |
|
|
134
|
+
| `limitMemory` | `string` | `512Mi` (backend) / `1Gi` (frontend) | Memory limit |
|
|
126
135
|
|
|
127
136
|
**Example:**
|
|
128
137
|
```typescript
|
|
@@ -135,12 +144,12 @@ backend: {
|
|
|
135
144
|
}
|
|
136
145
|
```
|
|
137
146
|
|
|
138
|
-
#### High
|
|
147
|
+
#### High availability
|
|
139
148
|
|
|
140
149
|
| Property | Type | Description |
|
|
141
150
|
|----------|------|-------------|
|
|
142
|
-
| `minAvailable` | `number` | Minimum pods available during updates (for PodDisruptionBudget) |
|
|
143
|
-
| `maxUnavailable` | `number` | Maximum unavailable pods during updates |
|
|
151
|
+
| `minAvailable` | `number \| string` | Minimum pods available during updates (for PodDisruptionBudget). Accepts an absolute number or a percentage string such as `"50%"`. |
|
|
152
|
+
| `maxUnavailable` | `number \| string` | Maximum unavailable pods during updates. Accepts an absolute number or a percentage string such as `"50%"`. |
|
|
144
153
|
|
|
145
154
|
**Example:**
|
|
146
155
|
```typescript
|
|
@@ -151,16 +160,16 @@ backend: {
|
|
|
151
160
|
}
|
|
152
161
|
```
|
|
153
162
|
|
|
154
|
-
#### Readiness
|
|
163
|
+
#### Readiness probe
|
|
155
164
|
|
|
156
165
|
| Property | Type | Default | Description |
|
|
157
166
|
|----------|------|---------|-------------|
|
|
158
167
|
| `readinessEnabled` | `boolean` | `true` | Enable readiness probe |
|
|
159
|
-
| `readinessInitialDelaySeconds` | `number` |
|
|
160
|
-
| `readinessTimeoutSeconds` | `number` |
|
|
161
|
-
| `readinessPeriodSeconds` | `number` |
|
|
162
|
-
| `readinessSuccessThreshold` | `number` |
|
|
163
|
-
| `readinessFailureThreshold` | `number` |
|
|
168
|
+
| `readinessInitialDelaySeconds` | `number` | `10` | Seconds before first probe |
|
|
169
|
+
| `readinessTimeoutSeconds` | `number` | `15` | Probe timeout |
|
|
170
|
+
| `readinessPeriodSeconds` | `number` | `10` | Probe frequency |
|
|
171
|
+
| `readinessSuccessThreshold` | `number` | `1` | Consecutive successes required |
|
|
172
|
+
| `readinessFailureThreshold` | `number` | `3` | Consecutive failures before marking unready |
|
|
164
173
|
|
|
165
174
|
**Example:**
|
|
166
175
|
```typescript
|
|
@@ -174,16 +183,16 @@ backend: {
|
|
|
174
183
|
}
|
|
175
184
|
```
|
|
176
185
|
|
|
177
|
-
#### Liveness
|
|
186
|
+
#### Liveness probe
|
|
178
187
|
|
|
179
188
|
| Property | Type | Default | Description |
|
|
180
189
|
|----------|------|---------|-------------|
|
|
181
190
|
| `livenessEnabled` | `boolean` | `false` | Enable liveness probe (recommended `true` for frontend) |
|
|
182
|
-
| `livenessInitialDelaySeconds` | `number` |
|
|
183
|
-
| `livenessTimeoutSeconds` | `number` |
|
|
184
|
-
| `livenessPeriodSeconds` | `number` |
|
|
185
|
-
| `livenessSuccessThreshold` | `number` |
|
|
186
|
-
| `livenessFailureThreshold` | `number` |
|
|
191
|
+
| `livenessInitialDelaySeconds` | `number` | `30` | Seconds before first probe |
|
|
192
|
+
| `livenessTimeoutSeconds` | `number` | `5` | Probe timeout |
|
|
193
|
+
| `livenessPeriodSeconds` | `number` | `10` | Probe frequency |
|
|
194
|
+
| `livenessSuccessThreshold` | `number` | `1` | Consecutive successes required |
|
|
195
|
+
| `livenessFailureThreshold` | `number` | `3` | Consecutive failures before restart |
|
|
187
196
|
|
|
188
197
|
**Example:**
|
|
189
198
|
```typescript
|
|
@@ -219,6 +228,94 @@ backend: {
|
|
|
219
228
|
}
|
|
220
229
|
```
|
|
221
230
|
|
|
231
|
+
(monitoring)=
|
|
232
|
+
|
|
233
|
+
#### Prometheus monitoring
|
|
234
|
+
|
|
235
|
+
| Property | Type | Default | Description |
|
|
236
|
+
|----------|------|---------|-------------|
|
|
237
|
+
| `servicemonitor` | `boolean` | `false` | Create a Prometheus `ServiceMonitor` for this component. Requires the Prometheus Operator. |
|
|
238
|
+
| `metricsPort` | `string \| number` | main service port | Service port name or number that exposes metrics. |
|
|
239
|
+
| `metricsPath` | `string` | `/metrics` | HTTP path the Prometheus scraper requests. |
|
|
240
|
+
|
|
241
|
+
You must instrument the backend or frontend container to expose metrics at the configured endpoint.
|
|
242
|
+
For step-by-step setup, see {doc}`/how-to/enable-prometheus-monitoring`.
|
|
243
|
+
|
|
244
|
+
**Example:**
|
|
245
|
+
```typescript
|
|
246
|
+
backend: {
|
|
247
|
+
image: 'plone/plone-backend:6.1.3',
|
|
248
|
+
servicemonitor: true,
|
|
249
|
+
metricsPath: '/metrics',
|
|
250
|
+
},
|
|
251
|
+
frontend: {
|
|
252
|
+
image: 'plone/plone-frontend:16.0.0',
|
|
253
|
+
servicemonitor: true,
|
|
254
|
+
metricsPort: 9090,
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### Scheduling
|
|
259
|
+
|
|
260
|
+
| Property | Type | Default | Description |
|
|
261
|
+
|----------|------|---------|-------------|
|
|
262
|
+
| `nodeSelector` | `Record<string, string>` | - | Constrain pods to nodes whose labels match all entries. |
|
|
263
|
+
|
|
264
|
+
For tainted nodes and taint-based scheduling, see {doc}`/how-to/schedule-pods`.
|
|
265
|
+
|
|
266
|
+
**Example:**
|
|
267
|
+
```typescript
|
|
268
|
+
backend: {
|
|
269
|
+
image: 'plone/plone-backend:6.1.3',
|
|
270
|
+
nodeSelector: {
|
|
271
|
+
'topology.kubernetes.io/region': 'fsn1',
|
|
272
|
+
},
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### Security context
|
|
277
|
+
|
|
278
|
+
| Property | Type | Default | Description |
|
|
279
|
+
|----------|------|---------|-------------|
|
|
280
|
+
| `securityContext` | `PloneSecurityContext` | - | Container security settings (capabilities, UID/GID, read-only root, privilege escalation). |
|
|
281
|
+
|
|
282
|
+
**`PloneSecurityContext` fields:**
|
|
283
|
+
|
|
284
|
+
| Property | Type | Description |
|
|
285
|
+
|----------|------|-------------|
|
|
286
|
+
| `capabilities` | `PloneCapabilities` | Linux capabilities to add or drop. |
|
|
287
|
+
| `runAsUser` | `number` | Run the container as this UID. |
|
|
288
|
+
| `runAsGroup` | `number` | Run the container as this GID. |
|
|
289
|
+
| `runAsNonRoot` | `boolean` | Require the container to run as non-root. |
|
|
290
|
+
| `readOnlyRootFilesystem` | `boolean` | Mount the root filesystem read-only. |
|
|
291
|
+
| `allowPrivilegeEscalation` | `boolean` | Allow the process to gain more privileges than its parent. |
|
|
292
|
+
| `privileged` | `boolean` | Run the container in privileged mode. |
|
|
293
|
+
|
|
294
|
+
**`PloneCapabilities` fields:**
|
|
295
|
+
|
|
296
|
+
| Property | Type | Description |
|
|
297
|
+
|----------|------|-------------|
|
|
298
|
+
| `add` | `string[]` | Capabilities to add (e.g., `'SYS_PTRACE'`). |
|
|
299
|
+
| `drop` | `string[]` | Capabilities to drop (e.g., `'ALL'`). |
|
|
300
|
+
|
|
301
|
+
For a hardening walk-through, see {doc}`/how-to/configure-security-context`.
|
|
302
|
+
|
|
303
|
+
**Example:**
|
|
304
|
+
```typescript
|
|
305
|
+
backend: {
|
|
306
|
+
image: 'plone/plone-backend:6.1.3',
|
|
307
|
+
securityContext: {
|
|
308
|
+
runAsNonRoot: true,
|
|
309
|
+
runAsUser: 500,
|
|
310
|
+
readOnlyRootFilesystem: true,
|
|
311
|
+
allowPrivilegeEscalation: false,
|
|
312
|
+
capabilities: {
|
|
313
|
+
drop: ['ALL'],
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
222
319
|
---
|
|
223
320
|
|
|
224
321
|
### `PloneHttpcacheOptions`
|
|
@@ -228,18 +325,36 @@ Configuration for the Varnish HTTP cache layer.
|
|
|
228
325
|
| Property | Type | Required | Default | Description |
|
|
229
326
|
|----------|------|----------|---------|-------------|
|
|
230
327
|
| `plone` | `Plone` | Yes | - | Plone construct to attach cache to |
|
|
231
|
-
| `varnishVcl` | `string` | No | - | VCL configuration as string |
|
|
232
|
-
| `varnishVclFile` | `string` | No | - | Path to VCL
|
|
328
|
+
| `varnishVcl` | `string` | No | - | VCL configuration as string. Takes precedence over `varnishVclFile`. |
|
|
329
|
+
| `varnishVclFile` | `string` | No | built-in `config/varnish.tpl.vcl` | Path to a VCL template file |
|
|
233
330
|
| `existingSecret` | `string` | No | - | Kubernetes secret for Varnish admin credentials |
|
|
234
331
|
| `replicas` | `number` | No | `2` | Number of Varnish replicas |
|
|
235
|
-
| `requestCpu` | `string` | No |
|
|
236
|
-
| `limitCpu` | `string` | No |
|
|
237
|
-
| `requestMemory` | `string` | No |
|
|
238
|
-
| `limitMemory` | `string` | No |
|
|
239
|
-
| `servicemonitor` | `boolean` | No | `false` | Enable Prometheus ServiceMonitor |
|
|
332
|
+
| `requestCpu` | `string` | No | `100m` | CPU request |
|
|
333
|
+
| `limitCpu` | `string` | No | `500m` | CPU limit |
|
|
334
|
+
| `requestMemory` | `string` | No | `100Mi` | Memory request |
|
|
335
|
+
| `limitMemory` | `string` | No | `500Mi` | Memory limit |
|
|
336
|
+
| `servicemonitor` | `boolean` | No | `false` | Enable Prometheus `ServiceMonitor` |
|
|
240
337
|
| `exporterEnabled` | `boolean` | No | `true` | Enable Prometheus exporter sidecar |
|
|
241
|
-
| `chartVersion` | `string` | No | latest | kube-httpcache Helm chart version |
|
|
242
|
-
| `
|
|
338
|
+
| `chartVersion` | `string` | No | chart latest | kube-httpcache Helm chart version |
|
|
339
|
+
| `appVersion` | `string` | No | matches `chartVersion` | kube-httpcache container image tag |
|
|
340
|
+
| `extraEnvVars` | `HttpcacheEnvVar[]` | No | - | Additional env vars for the kube-httpcache container |
|
|
341
|
+
| `tolerations` | `HttpcacheToleration[]` | No | - | Pod tolerations for tainted nodes |
|
|
342
|
+
|
|
343
|
+
**`HttpcacheEnvVar` fields:**
|
|
344
|
+
|
|
345
|
+
| Property | Type | Description |
|
|
346
|
+
|----------|------|-------------|
|
|
347
|
+
| `name` | `string` | Environment variable name |
|
|
348
|
+
| `value` | `string` | Environment variable value |
|
|
349
|
+
|
|
350
|
+
**`HttpcacheToleration` fields:**
|
|
351
|
+
|
|
352
|
+
| Property | Type | Default | Description |
|
|
353
|
+
|----------|------|---------|-------------|
|
|
354
|
+
| `key` | `string` | - | Taint key to tolerate |
|
|
355
|
+
| `operator` | `string` | `Equal` | `Equal` or `Exists` |
|
|
356
|
+
| `value` | `string` | - | Taint value (required for `Equal`) |
|
|
357
|
+
| `effect` | `string` | - | `NoSchedule`, `PreferNoSchedule`, or `NoExecute`. Omit to tolerate all effects. |
|
|
243
358
|
|
|
244
359
|
**Example:**
|
|
245
360
|
```typescript
|
|
@@ -302,18 +417,37 @@ Requires the [cloud-vinyl operator](https://github.com/bluedynamics/cloud-vinyl)
|
|
|
302
417
|
| Property | Type | Required | Default | Description |
|
|
303
418
|
|----------|------|----------|---------|-------------|
|
|
304
419
|
| `plone` | `Plone` | Yes | - | Plone construct to attach cache to |
|
|
420
|
+
| `image` | `string` | No | `varnish:7.6` | Container image for the Varnish pods |
|
|
305
421
|
| `replicas` | `number` | No | `2` | Number of Varnish replicas |
|
|
306
422
|
| `requestCpu` | `string` | No | `100m` | CPU request |
|
|
307
423
|
| `limitCpu` | `string` | No | `500m` | CPU limit |
|
|
308
424
|
| `requestMemory` | `string` | No | `256Mi` | Memory request |
|
|
309
425
|
| `limitMemory` | `string` | No | `512Mi` | Memory limit |
|
|
310
426
|
| `storage` | `VinylCacheStorage[]` | No | - | Varnish storage backends. If omitted, the operator falls back to the varnishd default (~100 MB malloc), which is almost always too small. |
|
|
311
|
-
| `
|
|
312
|
-
| `
|
|
313
|
-
| `
|
|
427
|
+
| `extraBackends` | `VinylCacheBackend[]` | No | - | Additional backends appended after the auto-generated Plone backends. |
|
|
428
|
+
| `director` | `string` | No | `shard` | Director type: `shard`, `round_robin`, `random`, `hash` |
|
|
429
|
+
| `shardBy` | `string` | No | operator default (`HASH`) | Shard director: value to hash (`HASH` or `URL`). Requires cloud-vinyl ≥ 0.4.2. |
|
|
430
|
+
| `shardHealthy` | `string` | No | operator default (`CHOSEN`) | Shard director: backend health requirement (`CHOSEN` or `ALL`). Requires cloud-vinyl ≥ 0.4.2. |
|
|
431
|
+
| `shardRampup` | `string` | No | operator default (`30s`) | Shard director: ramp-up window for newly added backends. |
|
|
432
|
+
| `shardReplicas` | `number` | No | operator default (`67`) | Shard director: Ketama replicas per backend. |
|
|
433
|
+
| `vclRecvSnippet` | `string` | No | built-in `plone-vinyl-recv.vcl` | Custom VCL snippet for `vcl_recv` |
|
|
434
|
+
| `vclBackendResponseSnippet` | `string` | No | built-in `plone-vinyl-backend-response.vcl` | Custom VCL snippet for `vcl_backend_response` |
|
|
435
|
+
| `vclDeliverSnippet` | `string` | No | - | Custom VCL snippet for `vcl_deliver` |
|
|
436
|
+
| `vclHitSnippet` | `string` | No | - | Custom VCL snippet for `vcl_hit` |
|
|
437
|
+
| `vclMissSnippet` | `string` | No | - | Custom VCL snippet for `vcl_miss` |
|
|
438
|
+
| `vclPassSnippet` | `string` | No | - | Custom VCL snippet for `vcl_pass` |
|
|
439
|
+
| `vclPipeSnippet` | `string` | No | - | Custom VCL snippet for `vcl_pipe` |
|
|
440
|
+
| `vclSynthSnippet` | `string` | No | - | Custom VCL snippet for `vcl_synth` |
|
|
441
|
+
| `vclPurgeSnippet` | `string` | No | - | Custom VCL snippet for `vcl_purge` |
|
|
442
|
+
| `vclHashSnippet` | `string` | No | - | Custom VCL snippet for `vcl_hash` |
|
|
443
|
+
| `vclInitSnippet` | `string` | No | - | Custom VCL snippet for `vcl_init` |
|
|
444
|
+
| `vclFiniSnippet` | `string` | No | - | Custom VCL snippet for `vcl_fini` |
|
|
445
|
+
| `vclBackendFetchSnippet` | `string` | No | - | Custom VCL snippet for `vcl_backend_fetch` |
|
|
446
|
+
| `vclBackendErrorSnippet` | `string` | No | - | Custom VCL snippet for `vcl_backend_error` |
|
|
314
447
|
| `invalidation` | `boolean` | No | `true` | Enable PURGE/BAN/xkey cache invalidation |
|
|
315
|
-
| `monitoring` | `boolean` | No | `false` | Enable Prometheus metrics and ServiceMonitor |
|
|
316
|
-
| `tolerations` | `VinylCacheToleration[]` | No | - |
|
|
448
|
+
| `monitoring` | `boolean` | No | `false` | Enable Prometheus metrics and `ServiceMonitor` |
|
|
449
|
+
| `tolerations` | `VinylCacheToleration[]` | No | - | Pod tolerations for tainted nodes |
|
|
450
|
+
| `nodeSelector` | `Record<string, string>` | No | - | Constrain Varnish pods to nodes matching all labels. |
|
|
317
451
|
|
|
318
452
|
**`VinylCacheStorage` fields:**
|
|
319
453
|
|
|
@@ -324,6 +458,36 @@ Requires the [cloud-vinyl operator](https://github.com/bluedynamics/cloud-vinyl)
|
|
|
324
458
|
| `size` | `string` | Yes | Kubernetes resource quantity (e.g. `"1Gi"`, `"500M"`) |
|
|
325
459
|
| `path` | `string` | for `file` | Filesystem path for file-type storage |
|
|
326
460
|
|
|
461
|
+
**`VinylCacheBackend` fields:**
|
|
462
|
+
|
|
463
|
+
| Property | Type | Required | Default | Description |
|
|
464
|
+
|----------|------|----------|---------|-------------|
|
|
465
|
+
| `name` | `string` | Yes | - | VCL identifier (must match `^[a-zA-Z][a-zA-Z0-9_]*$`) |
|
|
466
|
+
| `serviceName` | `string` | Yes | - | Kubernetes Service name to use as backend |
|
|
467
|
+
| `port` | `number` | Yes | - | Service port |
|
|
468
|
+
| `probe` | `VinylCacheBackendProbe` | No | - | Health probe configuration |
|
|
469
|
+
| `weight` | `number` | No | operator default | Relative weight in the director. `0` marks the backend as standby. |
|
|
470
|
+
|
|
471
|
+
**`VinylCacheBackendProbe` fields:**
|
|
472
|
+
|
|
473
|
+
| Property | Type | Default | Description |
|
|
474
|
+
|----------|------|---------|-------------|
|
|
475
|
+
| `url` | `string` | `/` | URL to probe |
|
|
476
|
+
| `interval` | `string` | `5s` | Probe interval |
|
|
477
|
+
| `timeout` | `string` | `2s` | Probe timeout |
|
|
478
|
+
| `window` | `number` | `10` | Number of recent probes evaluated |
|
|
479
|
+
| `threshold` | `number` | `8` | Healthy threshold within the window |
|
|
480
|
+
| `expectedResponse` | `number` | `200` | Expected HTTP status code |
|
|
481
|
+
|
|
482
|
+
**`VinylCacheToleration` fields:**
|
|
483
|
+
|
|
484
|
+
| Property | Type | Default | Description |
|
|
485
|
+
|----------|------|---------|-------------|
|
|
486
|
+
| `key` | `string` | - | Taint key to tolerate |
|
|
487
|
+
| `operator` | `string` | `Equal` | `Equal` or `Exists` |
|
|
488
|
+
| `value` | `string` | - | Taint value (required for `Equal`) |
|
|
489
|
+
| `effect` | `string` | - | `NoSchedule`, `PreferNoSchedule`, or `NoExecute`. Omit to tolerate all effects. |
|
|
490
|
+
|
|
327
491
|
**Example:**
|
|
328
492
|
```typescript
|
|
329
493
|
const cache = new PloneVinylCache(chart, 'cache', {
|
|
@@ -373,7 +537,7 @@ Without an explicit `storage` entry, varnishd runs with its stock default (~100
|
|
|
373
537
|
|
|
374
538
|
---
|
|
375
539
|
|
|
376
|
-
## PloneVariant
|
|
540
|
+
## PloneVariant enum
|
|
377
541
|
|
|
378
542
|
Defines the deployment variant:
|
|
379
543
|
|
|
@@ -395,7 +559,7 @@ variant: PloneVariant.CLASSICUI
|
|
|
395
559
|
|
|
396
560
|
---
|
|
397
561
|
|
|
398
|
-
## Complete
|
|
562
|
+
## Complete example
|
|
399
563
|
|
|
400
564
|
```typescript
|
|
401
565
|
import { App, Chart } from 'cdk8s';
|
|
@@ -457,9 +621,12 @@ app.synth();
|
|
|
457
621
|
|
|
458
622
|
---
|
|
459
623
|
|
|
460
|
-
## See
|
|
624
|
+
## See also
|
|
461
625
|
|
|
462
|
-
-
|
|
463
|
-
-
|
|
464
|
-
-
|
|
465
|
-
-
|
|
626
|
+
- {doc}`/tutorials/01-quick-start` — Get started guide
|
|
627
|
+
- {doc}`/how-to/deploy-production-volto` — Production-ready Volto deployment
|
|
628
|
+
- {doc}`/how-to/deploy-classic-ui` — Classic UI deployment
|
|
629
|
+
- {doc}`/how-to/deploy-with-vinyl-cache` — `PloneVinylCache` walk-through
|
|
630
|
+
- {doc}`/how-to/enable-prometheus-monitoring` — Wire up `ServiceMonitor`
|
|
631
|
+
- {doc}`/how-to/configure-security-context` — Harden backend and frontend pods
|
|
632
|
+
- {doc}`/how-to/schedule-pods` — `nodeSelector` and `tolerations`
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
myst:
|
|
3
|
+
html_meta:
|
|
4
|
+
"description": "Information-oriented technical reference for cdk8s-plone constructs, configuration options, and APIs."
|
|
5
|
+
"property=og:description": "Information-oriented technical reference for cdk8s-plone constructs, configuration options, and APIs."
|
|
6
|
+
"property=og:title": "Reference"
|
|
7
|
+
"keywords": "Plone, cdk8s, Kubernetes, reference, API, configuration"
|
|
8
|
+
---
|
|
9
|
+
|
|
1
10
|
```{image} ../_static/kup6s-icon-reference.svg
|
|
2
11
|
:align: center
|
|
3
12
|
:class: section-icon-large
|
|
@@ -9,7 +18,7 @@
|
|
|
9
18
|
|
|
10
19
|
Reference guides provide detailed technical information about cdk8s-plone's API, configuration options, and component specifications. They describe how things work and what parameters are available.
|
|
11
20
|
|
|
12
|
-
## API
|
|
21
|
+
## API reference
|
|
13
22
|
|
|
14
23
|
*This section will contain auto-generated or detailed documentation for:*
|
|
15
24
|
- Main chart classes
|
|
@@ -17,7 +26,7 @@ Reference guides provide detailed technical information about cdk8s-plone's API,
|
|
|
17
26
|
- Individual construct classes
|
|
18
27
|
- Utility functions and validators
|
|
19
28
|
|
|
20
|
-
## Configuration
|
|
29
|
+
## Configuration reference
|
|
21
30
|
|
|
22
31
|
```{toctree}
|
|
23
32
|
---
|
|
@@ -27,7 +36,7 @@ titlesonly: true
|
|
|
27
36
|
configuration-options
|
|
28
37
|
```
|
|
29
38
|
|
|
30
|
-
## Component
|
|
39
|
+
## Component specifications
|
|
31
40
|
|
|
32
41
|
```{toctree}
|
|
33
42
|
---
|
|
@@ -38,7 +47,7 @@ titlesonly: true
|
|
|
38
47
|
|
|
39
48
|
*Component specifications will be added in future releases.*
|
|
40
49
|
|
|
41
|
-
## API
|
|
50
|
+
## API documentation
|
|
42
51
|
|
|
43
52
|
See the `api/` directory for detailed construct documentation:
|
|
44
53
|
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
myst:
|
|
3
|
+
html_meta:
|
|
4
|
+
"description": "Deploy your first Plone instance to Kubernetes using cdk8s-plone, from project setup to a running Volto site."
|
|
5
|
+
"property=og:description": "Deploy your first Plone instance to Kubernetes using cdk8s-plone, from project setup to a running Volto site."
|
|
6
|
+
"property=og:title": "Quick start"
|
|
7
|
+
"keywords": "Plone, cdk8s, Kubernetes, tutorial, Volto, getting started"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Quick start
|
|
2
11
|
|
|
3
12
|
This tutorial will guide you through deploying your first Plone instance using cdk8s-plone.
|
|
4
13
|
|
|
@@ -13,11 +22,11 @@ Before you start, ensure you have:
|
|
|
13
22
|
|
|
14
23
|
For detailed prerequisites, see [Setup Prerequisites](../how-to/setup-prerequisites.md).
|
|
15
24
|
|
|
16
|
-
## Step 1: Create a CDK8S
|
|
25
|
+
## Step 1: Create a CDK8S project
|
|
17
26
|
|
|
18
27
|
Create a new CDK8S TypeScript project:
|
|
19
28
|
|
|
20
|
-
```
|
|
29
|
+
```shell
|
|
21
30
|
# Create project directory
|
|
22
31
|
mkdir my-plone-deployment
|
|
23
32
|
cd my-plone-deployment
|
|
@@ -32,17 +41,17 @@ This creates a basic CDK8S project structure.
|
|
|
32
41
|
|
|
33
42
|
Install the cdk8s-plone library:
|
|
34
43
|
|
|
35
|
-
```
|
|
44
|
+
```shell
|
|
36
45
|
npm install @bluedynamics/cdk8s-plone
|
|
37
46
|
```
|
|
38
47
|
|
|
39
48
|
The library is also available for Python via PyPI:
|
|
40
49
|
|
|
41
|
-
```
|
|
50
|
+
```shell
|
|
42
51
|
pip install cdk8s-plone
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
## Step 3: Create a
|
|
54
|
+
## Step 3: Create a basic Plone deployment
|
|
46
55
|
|
|
47
56
|
Edit `main.ts` with the following code:
|
|
48
57
|
|
|
@@ -73,11 +82,11 @@ This creates:
|
|
|
73
82
|
- A Volto frontend with 2 replicas
|
|
74
83
|
- All necessary Kubernetes services and deployments
|
|
75
84
|
|
|
76
|
-
## Step 4: Generate Kubernetes
|
|
85
|
+
## Step 4: Generate Kubernetes manifests
|
|
77
86
|
|
|
78
87
|
Generate the Kubernetes manifests:
|
|
79
88
|
|
|
80
|
-
```
|
|
89
|
+
```shell
|
|
81
90
|
cdk8s synth
|
|
82
91
|
```
|
|
83
92
|
|
|
@@ -87,22 +96,22 @@ This creates YAML files in the `dist/` directory containing all Kubernetes resou
|
|
|
87
96
|
|
|
88
97
|
Apply the generated manifests to your cluster:
|
|
89
98
|
|
|
90
|
-
```
|
|
99
|
+
```shell
|
|
91
100
|
kubectl apply -f dist/
|
|
92
101
|
```
|
|
93
102
|
|
|
94
103
|
Check the deployment status:
|
|
95
104
|
|
|
96
|
-
```
|
|
105
|
+
```shell
|
|
97
106
|
kubectl get pods
|
|
98
107
|
kubectl get services
|
|
99
108
|
```
|
|
100
109
|
|
|
101
|
-
## Step 6: Access
|
|
110
|
+
## Step 6: Access your Plone site
|
|
102
111
|
|
|
103
112
|
Once all pods are running, access your Plone site:
|
|
104
113
|
|
|
105
|
-
```
|
|
114
|
+
```shell
|
|
106
115
|
# Port-forward to the frontend service
|
|
107
116
|
kubectl port-forward service/my-plone-frontend 3000:3000
|
|
108
117
|
|
|
@@ -110,7 +119,7 @@ kubectl port-forward service/my-plone-frontend 3000:3000
|
|
|
110
119
|
open http://localhost:3000
|
|
111
120
|
```
|
|
112
121
|
|
|
113
|
-
## Adding HTTP
|
|
122
|
+
## Adding HTTP caching (optional)
|
|
114
123
|
|
|
115
124
|
For production deployments, add Varnish HTTP caching:
|
|
116
125
|
|
|
@@ -132,13 +141,14 @@ new PloneHttpcache(chart, 'cache', {
|
|
|
132
141
|
|
|
133
142
|
This adds a Varnish caching layer with cluster-wide cache invalidation using [kube-httpcache](https://github.com/mittwald/kube-httpcache).
|
|
134
143
|
|
|
135
|
-
## Next
|
|
144
|
+
## Next steps
|
|
136
145
|
|
|
137
146
|
Now that you have a basic Plone deployment:
|
|
138
147
|
|
|
139
|
-
- **Configure resources**: See
|
|
140
|
-
- **Add monitoring**:
|
|
141
|
-
- **Explore variants**:
|
|
148
|
+
- **Configure resources**: See {doc}`/reference/configuration-options` for CPU and memory options.
|
|
149
|
+
- **Add monitoring**: Follow {doc}`/how-to/enable-prometheus-monitoring`.
|
|
150
|
+
- **Explore variants**: Read about Volto and Classic UI in {doc}`/explanation/features`.
|
|
151
|
+
- **Harden pods**: Apply {doc}`/how-to/configure-security-context`.
|
|
142
152
|
|
|
143
153
|
## Troubleshooting
|
|
144
154
|
|
|
@@ -150,8 +160,6 @@ Now that you have a basic Plone deployment:
|
|
|
150
160
|
- Ensure port-forward is running
|
|
151
161
|
- Check service endpoints: `kubectl get endpoints`
|
|
152
162
|
|
|
153
|
-
For more help, see the [Troubleshooting guide](../how-to/troubleshooting.md).
|
|
154
|
-
|
|
155
163
|
---
|
|
156
164
|
|
|
157
165
|
**Complete example**: See the [cdk8s-plone-example](https://github.com/bluedynamics/cdk8s-plone-example) repository for a full working example.
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
myst:
|
|
3
|
+
html_meta:
|
|
4
|
+
"description": "Learning-oriented tutorials that guide you through using cdk8s-plone to deploy Plone CMS on Kubernetes."
|
|
5
|
+
"property=og:description": "Learning-oriented tutorials that guide you through using cdk8s-plone to deploy Plone CMS on Kubernetes."
|
|
6
|
+
"property=og:title": "Tutorials"
|
|
7
|
+
"keywords": "Plone, cdk8s, Kubernetes, tutorials, getting started"
|
|
8
|
+
---
|
|
9
|
+
|
|
1
10
|
```{image} ../_static/kup6s-icon-tutorials.svg
|
|
2
11
|
:align: center
|
|
3
12
|
:class: section-icon-large
|
|
@@ -18,7 +27,7 @@ These tutorials will teach you how to:
|
|
|
18
27
|
- Customize component resources and settings
|
|
19
28
|
- Test your deployment
|
|
20
29
|
|
|
21
|
-
## Available
|
|
30
|
+
## Available tutorials
|
|
22
31
|
|
|
23
32
|
```{toctree}
|
|
24
33
|
---
|
package/lib/httpcache.js
CHANGED
|
@@ -118,5 +118,5 @@ class PloneHttpcache extends constructs_1.Construct {
|
|
|
118
118
|
}
|
|
119
119
|
exports.PloneHttpcache = PloneHttpcache;
|
|
120
120
|
_a = JSII_RTTI_SYMBOL_1;
|
|
121
|
-
PloneHttpcache[_a] = { fqn: "@bluedynamics/cdk8s-plone.PloneHttpcache", version: "0.1.
|
|
121
|
+
PloneHttpcache[_a] = { fqn: "@bluedynamics/cdk8s-plone.PloneHttpcache", version: "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sXG4gICAgICAgIC8vIHNlZSBodHRwczovL2dpdGh1Yi5jb20vbWl0dHdhbGQva3ViZS1odHRwY2FjaGUvaXNzdWVzLzI1M1xuICAgICAgICBub2RlU2VsZWN0b3I6IHtcbiAgICAgICAgICAna3ViZXJuZXRlcy5pby9hcmNoJzogJ2FtZDY0JyxcbiAgICAgICAgfSxcbiAgICAgICAgLi4uKG9wdGlvbnMudG9sZXJhdGlvbnMgJiYgeyB0b2xlcmF0aW9uczogb3B0aW9ucy50b2xlcmF0aW9ucyB9KSxcbiAgICAgICAgcmVzb3VyY2VzOiB7XG4gICAgICAgICAgbGltaXRzOiB7XG4gICAgICAgICAgICBjcHU6IG9wdGlvbnMubGltaXRDcHUgfHwgJzUwMG0nLFxuICAgICAgICAgICAgbWVtb3J5OiBvcHRpb25zLmxpbWl0TWVtb3J5IHx8ICc1MDBNaScsXG4gICAgICAgICAgfSxcbiAgICAgICAgICByZXF1ZXN0czoge1xuICAgICAgICAgICAgY3B1OiBvcHRpb25zLnJlcXVlc3RDcHUgfHwgJzEwMG0nLFxuICAgICAgICAgICAgbWVtb3J5OiBvcHRpb25zLnJlcXVlc3RNZW1vcnkgfHwgJzEwME1pJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICByYmFjOiB7XG4gICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcbiAgICAgICAgfSxcbiAgICAgICAgZXhwb3J0ZXI6IHtcbiAgICAgICAgICBlbmFibGVkOiBvcHRpb25zLmV4cG9ydGVyRW5hYmxlZCA/PyB0cnVlLFxuICAgICAgICAgIHJlc291cmNlczoge1xuICAgICAgICAgICAgbGltaXRzOiB7XG4gICAgICAgICAgICAgIGNwdTogJzEwMG0nLFxuICAgICAgICAgICAgICBtZW1vcnk6ICcxMDBNaScsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVxdWVzdHM6IHtcbiAgICAgICAgICAgICAgY3B1OiAnMTBtJyxcbiAgICAgICAgICAgICAgbWVtb3J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