@bluedynamics/cdk8s-plone 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.jsii +109 -43
  2. package/API.md +49 -0
  3. package/CLAUDE.md +352 -0
  4. package/README.md +70 -176
  5. package/documentation/Makefile +357 -0
  6. package/documentation/README.md +284 -0
  7. package/documentation/mx.ini +3 -0
  8. package/documentation/sources/_static/brand-theme.css +685 -0
  9. package/documentation/sources/_static/custom-icons.css +123 -0
  10. package/documentation/sources/_static/fonts/hack/Hack-Regular.woff2 +0 -0
  11. package/documentation/sources/_static/fonts/orbitron/Orbitron-Black.woff2 +11 -0
  12. package/documentation/sources/_static/fonts/orbitron/Orbitron-Bold.woff2 +11 -0
  13. package/documentation/sources/_static/fonts/orbitron/Orbitron-Regular.woff2 +0 -0
  14. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Bold.woff2 +11 -0
  15. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Medium.woff2 +11 -0
  16. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Regular.woff2 +11 -0
  17. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-SemiBold.woff2 +11 -0
  18. package/documentation/sources/_static/kup6s-icon-explanation.svg +32 -0
  19. package/documentation/sources/_static/kup6s-icon-howto.svg +34 -0
  20. package/documentation/sources/_static/kup6s-icon-plone.svg +79 -0
  21. package/documentation/sources/_static/kup6s-icon-reference.svg +34 -0
  22. package/documentation/sources/_static/kup6s-icon-tutorials.svg +30 -0
  23. package/documentation/sources/_static/logo-fix.js +12 -0
  24. package/documentation/sources/conf.py +105 -0
  25. package/documentation/sources/explanation/architecture.md +311 -0
  26. package/documentation/sources/explanation/features.md +353 -0
  27. package/documentation/sources/explanation/index.md +51 -0
  28. package/documentation/sources/how-to/index.md +56 -0
  29. package/documentation/sources/how-to/setup-prerequisites.md +354 -0
  30. package/documentation/sources/index.md +108 -0
  31. package/documentation/sources/reference/api/.gitkeep +1 -0
  32. package/documentation/sources/reference/configuration-options.md +370 -0
  33. package/documentation/sources/reference/index.md +59 -0
  34. package/documentation/sources/tutorials/01-quick-start.md +157 -0
  35. package/documentation/sources/tutorials/index.md +48 -0
  36. package/lib/httpcache.js +1 -1
  37. package/lib/imports/monitoring.coreos.com.d.ts +2029 -0
  38. package/lib/imports/monitoring.coreos.com.js +1042 -0
  39. package/lib/plone.d.ts +26 -0
  40. package/lib/plone.js +53 -2
  41. package/lib/service.d.ts +6 -0
  42. package/lib/service.js +2 -1
  43. package/package.json +3 -1
package/CLAUDE.md ADDED
@@ -0,0 +1,352 @@
1
+ # Claude Code Project Guide
2
+
3
+ This document provides context and guidelines for Claude Code when working on this project.
4
+
5
+ ## Project Overview
6
+
7
+ **cdk8s-plone** is a TypeScript/Python library for deploying Plone CMS to Kubernetes using CDK8S constructs. It provides type-safe infrastructure as code with support for Volto (React frontend) and Classic UI deployments.
8
+
9
+ ## Git Workflow
10
+
11
+ **IMPORTANT: Never merge directly to `main`**
12
+
13
+ This project uses a Pull Request workflow:
14
+
15
+ 1. **Create a feature branch** from `main`:
16
+ ```bash
17
+ git checkout -b feature/description
18
+ # or
19
+ git checkout -b docs/description
20
+ # or
21
+ git checkout -b fix/description
22
+ ```
23
+
24
+ 2. **Make commits** on the feature branch with descriptive messages
25
+
26
+ 3. **Create a Pull Request** to merge into `main`:
27
+ - Use GitHub UI or `gh` CLI
28
+ - PRs are required for code review
29
+ - Never push directly to `main`
30
+ - Never merge locally to `main`
31
+
32
+ 4. **PR will be reviewed and merged** by maintainers
33
+
34
+ ### Branch Naming Conventions
35
+
36
+ - `feat/` or `feature/` - New features
37
+ - `fix/` - Bug fixes
38
+ - `docs/` - Documentation changes
39
+ - `chore/` - Maintenance tasks
40
+ - `refactor/` - Code refactoring
41
+ - `test/` - Test additions or changes
42
+
43
+ ## Working with Worktrees
44
+
45
+ **Recommended for parallel development and multi-instance work**
46
+
47
+ Git worktrees allow you to work on multiple branches simultaneously without switching contexts. This is especially useful when:
48
+ - Multiple Claude Code instances are working on different features
49
+ - You need to switch between features frequently
50
+ - You want to keep branches completely isolated
51
+
52
+ ### Setting Up Worktrees
53
+
54
+ **Create a worktree for each feature branch:**
55
+
56
+ ```bash
57
+ # From the main repository
58
+ git worktree add ../cdk8s-plone-feature-name feature/feature-name
59
+
60
+ # For existing branches
61
+ git worktree add ../cdk8s-plone-docs docs/diataxis-sphinx-skeleton
62
+
63
+ # For new branches
64
+ git worktree add -b feat/new-feature ../cdk8s-plone-new-feature
65
+ ```
66
+
67
+ **Directory structure with worktrees:**
68
+ ```
69
+ ~/ws/cdev/
70
+ ├── cdk8s-plone/ # Main repository (usually on main branch)
71
+ ├── cdk8s-plone-docs/ # Worktree for documentation work
72
+ ├── cdk8s-plone-frontend/ # Worktree for frontend features
73
+ └── cdk8s-plone-monitoring/ # Worktree for monitoring features
74
+ ```
75
+
76
+ ### Working with Worktrees
77
+
78
+ **List all worktrees:**
79
+ ```bash
80
+ git worktree list
81
+ ```
82
+
83
+ **Remove a worktree when done:**
84
+ ```bash
85
+ # Delete the worktree directory first
86
+ rm -rf ../cdk8s-plone-feature-name
87
+
88
+ # Then prune the worktree reference
89
+ git worktree prune
90
+ ```
91
+
92
+ **Switch between worktrees:**
93
+ ```bash
94
+ # Simply cd to the worktree directory
95
+ cd ../cdk8s-plone-docs
96
+
97
+ # Each worktree is an independent working directory
98
+ # with its own checked out branch
99
+ ```
100
+
101
+ ### Worktree Best Practices
102
+
103
+ 1. **One feature per worktree**: Keep each worktree focused on a single feature or task
104
+ 2. **Clean up after merge**: Remove worktrees once their branches are merged
105
+ 3. **Use descriptive directory names**: Name worktrees after their branch or feature
106
+ 4. **Regular git fetch**: Run `git fetch` in any worktree to update all branch references
107
+ 5. **Avoid nested worktrees**: Don't create worktrees inside other worktrees
108
+
109
+ ### Example Workflow with Worktrees
110
+
111
+ ```bash
112
+ # Setup: Create worktree for documentation work
113
+ cd ~/ws/cdev/cdk8s-plone
114
+ git worktree add -b docs/add-tutorial ../cdk8s-plone-docs
115
+
116
+ # Work: Make changes in the worktree
117
+ cd ../cdk8s-plone-docs
118
+ # ... make documentation changes ...
119
+ git add . && git commit -m "docs: add new tutorial"
120
+ git push -u origin docs/add-tutorial
121
+
122
+ # Create PR using gh CLI
123
+ gh pr create --title "Add new tutorial" --body "..."
124
+
125
+ # Cleanup: After PR is merged
126
+ cd ~/ws/cdev/cdk8s-plone
127
+ git fetch
128
+ git pull # Update main branch
129
+ rm -rf ../cdk8s-plone-docs
130
+ git worktree prune
131
+ ```
132
+
133
+ ### Benefits of Worktrees
134
+
135
+ - ✅ **No branch switching**: Keep different features in separate directories
136
+ - ✅ **Parallel work**: Multiple Claude instances can work independently
137
+ - ✅ **Clean state**: Each worktree maintains its own working directory state
138
+ - ✅ **Fast context switching**: Just `cd` between directories
139
+ - ✅ **No uncommitted changes conflicts**: Each worktree is isolated
140
+
141
+ ## Project Structure
142
+
143
+ ```
144
+ .
145
+ ├── src/ # TypeScript source code
146
+ │ ├── plone.ts # Main Plone construct
147
+ │ ├── service.ts # Service utilities
148
+ │ └── ...
149
+ ├── test/ # Jest tests
150
+ ├── documentation/ # Sphinx documentation (Diataxis framework)
151
+ │ ├── sources/ # Documentation source files
152
+ │ ├── Makefile # Build automation (mxmake)
153
+ │ └── README.md # Documentation contributor guide
154
+ ├── .projenrc.ts # Projen project configuration
155
+ ├── API.md # Auto-generated API documentation
156
+ └── README.md # Main project README
157
+ ```
158
+
159
+ ## Build System
160
+
161
+ This project uses **Projen** for project management.
162
+
163
+ **⚠️ DO NOT edit generated files directly**
164
+
165
+ Generated files include:
166
+ - `package.json`
167
+ - `tsconfig.json`
168
+ - `.gitignore`
169
+ - GitHub Actions workflows (except custom ones)
170
+ - And more...
171
+
172
+ ### Making Changes
173
+
174
+ 1. **Edit `.projenrc.ts`** for project configuration changes
175
+ 2. **Run `npx projen`** to regenerate files
176
+ 3. **Make code changes** in `src/`
177
+ 4. **Run tests**: `npx projen test`
178
+ 5. **Update snapshots if needed**: `npx projen test -- -u`
179
+
180
+ ### Common Commands
181
+
182
+ ```bash
183
+ # Install dependencies
184
+ npm install
185
+
186
+ # Run tests
187
+ npx projen test
188
+
189
+ # Run tests in watch mode
190
+ npx projen test:watch
191
+
192
+ # Build (compile + generate bindings)
193
+ npx projen build
194
+
195
+ # Lint
196
+ npx projen eslint
197
+
198
+ # Generate API docs
199
+ npx projen docgen
200
+
201
+ # Package for distribution
202
+ npx projen package-all
203
+
204
+ # Update project files after .projenrc.ts changes
205
+ npx projen
206
+ ```
207
+
208
+ ## Documentation
209
+
210
+ Documentation uses **Sphinx** with the **Diataxis framework**:
211
+
212
+ - **Tutorials**: Learning-oriented, step-by-step guides
213
+ - **How-To Guides**: Goal-oriented, problem-solving recipes
214
+ - **Reference**: Information-oriented, technical specifications
215
+ - **Explanation**: Understanding-oriented, concepts and design
216
+
217
+ ### Building Documentation
218
+
219
+ ```bash
220
+ cd documentation
221
+
222
+ # Build HTML
223
+ make docs
224
+
225
+ # Live-reload development server
226
+ make docs-live
227
+
228
+ # Clean and rebuild
229
+ make clean && make docs
230
+ ```
231
+
232
+ ### Documentation Deployment
233
+
234
+ - Documentation auto-deploys to GitHub Pages on push to `main`
235
+ - Workflow: `.github/workflows/documentation.yml`
236
+ - Published at: `https://bluedynamics.github.io/cdk8s-plone/`
237
+
238
+ ## Testing
239
+
240
+ - **Framework**: Jest
241
+ - **Test location**: `test/` directory
242
+ - **Snapshots**: Used for testing generated Kubernetes manifests
243
+ - **Update snapshots**: `npx projen test -- -u`
244
+
245
+ ## Multi-Language Support
246
+
247
+ The library is published in multiple languages via JSII:
248
+
249
+ - **TypeScript/JavaScript**: `@bluedynamics/cdk8s-plone` on npm
250
+ - **Python**: `cdk8s-plone` on PyPI
251
+
252
+ JSII configuration is in `package.json` under the `jsii` field.
253
+
254
+ ## Code Style
255
+
256
+ - **Linter**: ESLint with TypeScript support
257
+ - **Style**: Configured via `.projenrc.ts`
258
+ - **Run linter**: `npx projen eslint`
259
+
260
+ ## Commit Messages
261
+
262
+ Follow conventional commit format:
263
+
264
+ ```
265
+ <type>(<scope>): <subject>
266
+
267
+ <body>
268
+
269
+ <footer>
270
+ ```
271
+
272
+ **Types:**
273
+ - `feat`: New feature
274
+ - `fix`: Bug fix
275
+ - `docs`: Documentation changes
276
+ - `chore`: Maintenance tasks
277
+ - `refactor`: Code refactoring
278
+ - `test`: Test additions or changes
279
+ - `ci`: CI/CD changes
280
+
281
+ **Example:**
282
+ ```
283
+ feat(plone): add support for custom environment variables
284
+
285
+ Allow passing custom environment variables to backend and frontend
286
+ containers using the cdk8s-plus-30 Env API.
287
+
288
+ Closes #123
289
+ ```
290
+
291
+ All commits from Claude Code include:
292
+ ```
293
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
294
+
295
+ Co-Authored-By: Claude <noreply@anthropic.com>
296
+ ```
297
+
298
+ ## CI/CD
299
+
300
+ GitHub Actions workflows:
301
+
302
+ - **build.yml**: Build, test, and package
303
+ - **release.yml**: Create releases and publish to npm/PyPI
304
+ - **upgrade-main.yml**: Dependency upgrades
305
+ - **pull-request-lint.yml**: PR validation
306
+ - **documentation.yml**: Build and deploy docs to GitHub Pages
307
+
308
+ ## Dependencies
309
+
310
+ ### Runtime Dependencies
311
+
312
+ - `cdk8s` - CDK8S framework
313
+ - `cdk8s-plus-30` - CDK8S plus constructs
314
+ - `constructs` - Construct base classes
315
+
316
+ ### Development Dependencies
317
+
318
+ - `projen` - Project management
319
+ - `jsii` - Multi-language support
320
+ - `jest` - Testing
321
+ - `typescript` - Language
322
+ - `eslint` - Linting
323
+
324
+ ## Publishing
325
+
326
+ **Do not manually publish packages**
327
+
328
+ Publishing is automated via GitHub Actions on release:
329
+ 1. Create and push a git tag (via `npx projen release`)
330
+ 2. GitHub Actions builds and publishes to npm and PyPI
331
+ 3. Release notes are auto-generated
332
+
333
+ ## Important Notes
334
+
335
+ - **Never merge to main**: Always create PRs
336
+ - **Don't edit generated files**: Use `.projenrc.ts` and run `npx projen`
337
+ - **Update snapshots after changes**: Run `npx projen test -- -u`
338
+ - **Follow Diataxis**: When adding docs, use the correct category
339
+ - **Documentation builds required**: Run `make docs` to verify doc changes
340
+
341
+ ## Resources
342
+
343
+ - [CDK8S Documentation](https://cdk8s.io/)
344
+ - [Projen Documentation](https://projen.io/)
345
+ - [Diataxis Framework](https://diataxis.fr/)
346
+ - [JSII Documentation](https://aws.github.io/jsii/)
347
+ - [Example Project](https://github.com/bluedynamics/cdk8s-plone-example)
348
+
349
+ ## Maintainer Contact
350
+
351
+ **Author:** Jens W. Klein (jk@kleinundpartner.at)
352
+ **Organization:** [Blue Dynamics Alliance](https://github.com/bluedynamics)
package/README.md CHANGED
@@ -1,56 +1,38 @@
1
1
  # CDK8S Plone
2
2
 
3
- A CDK8S library for deploying Plone CMS to Kubernetes.
3
+ > TypeScript and Python library for deploying Plone CMS to Kubernetes using CDK8S
4
4
 
5
- This library provides constructs to bootstrap a Plone deployment on a Kubernetes cluster using the [CDK8S](https://cdk8s.io) framework.
5
+ [![npm version](https://badge.fury.io/js/%40bluedynamics%2Fcdk8s-plone.svg)](https://www.npmjs.com/package/@bluedynamics/cdk8s-plone)
6
+ [![PyPI version](https://badge.fury.io/py/cdk8s-plone.svg)](https://pypi.org/project/cdk8s-plone/)
7
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
6
8
 
7
- ## Features
9
+ ## Overview
8
10
 
9
- - **Backend**: Plone backend (API with `plone.volto` or Classic-UI)
10
- - **Frontend**: Plone Volto (modern React-based user interface)
11
- - **Varnish Caching**: Optional HTTP caching layer using [kube-httpcache](https://github.com/mittwald/kube-httpcache) with cluster-wide cache invalidation
12
- - **High Availability**: Configurable replicas with PodDisruptionBudgets
13
- - **Multi-language Support**: Published to npm (TypeScript/JavaScript) and PyPI (Python)
11
+ cdk8s-plone provides CDK8S constructs for deploying [Plone CMS](https://plone.org/) on Kubernetes. Define your infrastructure using TypeScript or Python and generate Kubernetes manifests automatically.
14
12
 
13
+ **Key Features:**
14
+ - 🚀 Supports Volto (modern React frontend) and Classic UI
15
+ - 📦 High availability with configurable replicas
16
+ - ⚡ Optional Varnish HTTP caching layer
17
+ - 🔧 Fine-grained resource and probe configuration
18
+ - 🌍 Multi-language support (TypeScript/JavaScript and Python)
19
+ - ✅ Type-safe infrastructure as code
15
20
 
16
- ## Installation
17
-
18
- ### TypeScript/JavaScript
19
-
20
- Create a new CDK8S project (or use an existing one):
21
-
22
- ```bash
23
- cdk8s init typescript-app
24
- ```
21
+ ## Quick Start
25
22
 
26
- Install the library:
23
+ ### Installation
27
24
 
25
+ **TypeScript/JavaScript:**
28
26
  ```bash
29
27
  npm install @bluedynamics/cdk8s-plone
30
28
  ```
31
29
 
32
- Package: [@bluedynamics/cdk8s-plone](https://www.npmjs.com/package/@bluedynamics/cdk8s-plone)
33
-
34
- ### Python
35
-
36
- Create a new CDK8S project:
37
-
38
- ```bash
39
- cdk8s init python-app
40
- ```
41
-
42
- Install the library:
43
-
30
+ **Python:**
44
31
  ```bash
45
32
  pip install cdk8s-plone
46
33
  ```
47
34
 
48
- Package: [cdk8s-plone](https://pypi.org/project/cdk8s-plone/)
49
-
50
-
51
- ## Quick Start
52
-
53
- ### Basic Plone Deployment
35
+ ### Basic Example
54
36
 
55
37
  ```typescript
56
38
  import { App, Chart } from 'cdk8s';
@@ -62,7 +44,7 @@ const chart = new Chart(app, 'PloneDeployment');
62
44
  new Plone(chart, 'my-plone', {
63
45
  variant: PloneVariant.VOLTO,
64
46
  backend: {
65
- image: 'plone/plone-backend:6.0.10',
47
+ image: 'plone/plone-backend:6.1.3',
66
48
  replicas: 3,
67
49
  },
68
50
  frontend: {
@@ -74,174 +56,86 @@ new Plone(chart, 'my-plone', {
74
56
  app.synth();
75
57
  ```
76
58
 
77
- ### With Varnish HTTP Cache
78
-
79
- ```typescript
80
- import { PloneHttpcache } from '@bluedynamics/cdk8s-plone';
81
-
82
- const plone = new Plone(chart, 'my-plone', {
83
- variant: PloneVariant.VOLTO,
84
- backend: { image: 'plone/plone-backend:6.0.10' },
85
- frontend: { image: 'plone/plone-frontend:16.0.0' },
86
- });
87
-
88
- new PloneHttpcache(chart, 'cache', {
89
- plone: plone,
90
- existingSecret: 'varnish-secret',
91
- replicas: 2,
92
- });
93
- ```
94
-
95
- ### Generate Kubernetes Manifests
96
-
59
+ Generate Kubernetes manifests:
97
60
  ```bash
98
61
  cdk8s synth
62
+ kubectl apply -f dist/
99
63
  ```
100
64
 
101
- The manifests are stored in the `dist/` directory.
102
-
103
- For a complete example, see the [example project](https://github.com/bluedynamics/cdk8s-plone-example).
104
-
105
- ## Prerequisites
106
-
107
- - **kubectl** - Command-line tool for deploying Kubernetes manifests. [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
108
- - **Helm** (optional) - Only needed if generating Helm charts. [Install Helm](https://helm.sh/docs/intro/install/)
109
- - **Node.js** - For TypeScript/JavaScript development
110
- - **Python 3.8+** - For Python development
111
-
112
-
113
- ## API Documentation
114
-
115
- For complete API documentation, see [API.md](./API.md).
65
+ ## Documentation
116
66
 
117
- ### Key Constructs
67
+ **📚 Full documentation:** https://bluedynamics.github.io/cdk8s-plone/
118
68
 
119
- #### `Plone`
69
+ - [Quick Start Tutorial](https://bluedynamics.github.io/cdk8s-plone/tutorials/01-quick-start.html)
70
+ - [Configuration Reference](https://bluedynamics.github.io/cdk8s-plone/reference/configuration-options.html)
71
+ - [Architecture Overview](https://bluedynamics.github.io/cdk8s-plone/explanation/architecture.html)
72
+ - [Complete API Documentation](./API.md)
120
73
 
121
- Main construct for deploying Plone CMS. Supports two variants:
122
- - **VOLTO**: Modern React frontend with REST API backend (default)
123
- - **CLASSICUI**: Traditional server-side rendered Plone
74
+ ## Examples
124
75
 
125
- Properties:
126
- - `backendServiceName` - Name of the backend Kubernetes service
127
- - `frontendServiceName` - Name of the frontend service (VOLTO only)
128
- - `variant` - Deployment variant (VOLTO or CLASSICUI)
129
- - `siteId` - Plone site ID in ZODB (default: 'Plone')
76
+ See the [cdk8s-plone-example](https://github.com/bluedynamics/cdk8s-plone-example) repository for complete working examples.
130
77
 
131
- #### `PloneHttpcache`
78
+ ### Prometheus Metrics
132
79
 
133
- Varnish HTTP caching layer using the [kube-httpcache](https://github.com/mittwald/kube-httpcache) Helm chart.
80
+ Enable Prometheus ServiceMonitor for metrics collection (requires Prometheus Operator):
134
81
 
135
- Properties:
136
- - `httpcacheServiceName` - Name of the Varnish service
137
-
138
- ### Configuration Options
139
-
140
- #### `PloneOptions`
141
-
142
- - `version` - Version of your project
143
- - `siteId` - Plone site ID (default: 'Plone')
144
- - `variant` - PloneVariant.VOLTO or PloneVariant.CLASSICUI (default: VOLTO)
145
- - `backend` - Backend configuration (PloneBaseOptions)
146
- - `frontend` - Frontend configuration (PloneBaseOptions, required for VOLTO)
147
- - `imagePullSecrets` - Image pull secrets for private registries
148
-
149
- #### `PloneBaseOptions`
150
-
151
- Configuration for backend or frontend:
152
-
153
- **Container:**
154
- - `image` - Container image (e.g., 'plone/plone-backend:6.0.10')
155
- - `imagePullPolicy` - Pull policy (default: 'IfNotPresent')
156
- - `replicas` - Number of replicas (default: 2)
157
- - `environment` - Environment variables (cdk8s-plus-30.Env)
158
-
159
- **Resources:**
160
- - `requestCpu` / `limitCpu` - CPU requests/limits
161
- - `requestMemory` / `limitMemory` - Memory requests/limits
162
-
163
- **High Availability:**
164
- - `minAvailable` - Min pods during updates (for PodDisruptionBudget)
165
- - `maxUnavailable` - Max unavailable pods during updates
166
-
167
- **Health Probes:**
168
- - `readinessEnabled` - Enable readiness probe (default: true)
169
- - `readinessInitialDelaySeconds` / `readinessTimeoutSeconds` / `readinessPeriodSeconds`
170
- - `readinessSuccessThreshold` / `readinessFailureThreshold`
171
- - `livenessEnabled` - Enable liveness probe (default: false, recommended true for frontend)
172
- - `livenessInitialDelaySeconds` / `livenessTimeoutSeconds` / `livenessPeriodSeconds`
173
- - `livenessSuccessThreshold` / `livenessFailureThreshold`
174
-
175
- **Annotations:**
176
- - `annotations` - Deployment metadata annotations
177
- - `podAnnotations` - Pod template annotations (e.g., for Prometheus)
178
- - `serviceAnnotations` - Service annotations (e.g., for external-dns)
82
+ ```typescript
83
+ new Plone(chart, 'my-plone', {
84
+ backend: {
85
+ servicemonitor: true,
86
+ metricsPath: '/metrics', // optional, defaults to '/metrics'
87
+ },
88
+ frontend: {
89
+ servicemonitor: true,
90
+ metricsPort: 9090, // optional, defaults to service port
91
+ },
92
+ });
93
+ ```
179
94
 
180
- #### `PloneHttpcacheOptions`
95
+ **Note:** You must instrument your Plone backend/frontend to expose metrics at the configured endpoint. For Volto/Node.js frontends, consider using [prom-client](https://www.npmjs.com/package/prom-client) or [express-prometheus-middleware](https://www.npmjs.com/package/express-prometheus-middleware).
181
96
 
182
- - `plone` - Plone construct to attach cache to (required)
183
- - `varnishVcl` - VCL configuration as string
184
- - `varnishVclFile` - Path to VCL configuration file
185
- - `existingSecret` - Kubernetes secret for Varnish admin credentials
186
- - `replicas` - Number of Varnish replicas (default: 2)
187
- - `requestCpu` / `limitCpu` - CPU resources
188
- - `requestMemory` / `limitMemory` - Memory resources
189
- - `servicemonitor` - Enable Prometheus ServiceMonitor (default: false)
190
- - `exporterEnabled` - Enable Prometheus exporter sidecar (default: true)
191
- - `chartVersion` - kube-httpcache Helm chart version (default: latest)
192
- - `appVersion` - kube-httpcache container image version (default: chartVersion or chart default)
97
+ ## Requirements
98
+ - **kubectl** - [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
99
+ - **Node.js 16+** (for TypeScript/JavaScript) - [Install Node.js](https://nodejs.org/)
100
+ - **Python 3.8+** (for Python) - [Install Python](https://www.python.org/)
101
+ - **Kubernetes cluster** (local or cloud)
193
102
 
103
+ For detailed setup instructions, see [Setup Prerequisites](https://bluedynamics.github.io/cdk8s-plone/how-to/setup-prerequisites.html).
194
104
 
195
105
  ## Development
196
106
 
197
- This project uses [Projen](https://projen.io/) to manage project configuration. **Do not edit generated files directly.**
198
-
199
- ### Setup
200
-
201
- Clone the repository and install dependencies:
107
+ This project uses [Projen](https://projen.io/) for project management.
202
108
 
203
109
  ```bash
204
- nvm use lts/*
205
- corepack enable
206
- npx projen
207
- ```
110
+ # Install dependencies
111
+ npm install
208
112
 
209
- ### Common Commands
210
-
211
- ```bash
212
113
  # Run tests
213
- npx projen test
114
+ npm test
214
115
 
215
- # Run tests in watch mode
216
- npx projen test:watch
116
+ # Build
117
+ npm run build
217
118
 
218
- # Build (compile TypeScript + generate JSII bindings)
219
- npx projen build
220
-
221
- # Lint
222
- npx projen eslint
223
-
224
- # Generate API documentation
225
- npx projen docgen
226
-
227
- # Package for distribution
228
- npx projen package-all
119
+ # Update project configuration
120
+ # Edit .projenrc.ts, then run:
121
+ npx projen
229
122
  ```
230
123
 
231
- ### Making Changes
124
+ For detailed development instructions, see [CONTRIBUTING.md](./CONTRIBUTING.md) (if available).
232
125
 
233
- 1. Edit `.projenrc.ts` for project configuration changes
234
- 2. Run `npx projen` to regenerate project files
235
- 3. Make code changes in `src/`
236
- 4. Run tests and update snapshots if needed: `npx projen test -- -u`
237
-
238
- ## References
126
+ ## Resources
239
127
 
240
128
  - [CDK8S Documentation](https://cdk8s.io/)
241
- - [Kubernetes Probes Documentation](https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/)
242
- - [kube-httpcache Helm Chart](https://github.com/mittwald/kube-httpcache)
129
+ - [Plone CMS](https://plone.org/)
130
+ - [kube-httpcache](https://github.com/mittwald/kube-httpcache) (for HTTP caching)
243
131
  - [Example Project](https://github.com/bluedynamics/cdk8s-plone-example)
244
132
 
245
133
  ## License
246
134
 
247
- See [LICENSE](./LICENSE) file.
135
+ [Apache 2.0](LICENSE)
136
+
137
+ ## Maintainers
138
+
139
+ Maintained by [Blue Dynamics Alliance](https://github.com/bluedynamics)
140
+
141
+ **Author:** Jens W. Klein (jk@kleinundpartner.at)