@bluedynamics/cdk8s-plone 0.3.2 → 0.3.3
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 +2 -2
- package/lib/config/plone-vinyl-backend-response.vcl +25 -0
- package/lib/config/plone-vinyl-recv.vcl +18 -0
- package/{examples/volto → lib}/config/varnish.tpl.vcl +1 -1
- package/lib/httpcache.js +1 -1
- package/lib/plone.js +1 -1
- package/lib/vinylcache.js +1 -1
- package/package.json +3 -2
- package/.claude/claude.md +0 -39
- package/.claude/settings.local.json +0 -31
- package/CLAUDE.md +0 -352
- package/docs/superpowers/plans/2026-06-12-configurable-service-spec.md +0 -608
- package/docs/superpowers/specs/2026-06-12-configurable-service-spec-design.md +0 -192
- package/documentation/Makefile +0 -357
- package/documentation/README.md +0 -284
- package/documentation/mx.ini +0 -3
- package/documentation/sources/_static/logo.svg +0 -79
- package/documentation/sources/conf.py +0 -145
- package/documentation/sources/explanation/architecture.md +0 -336
- package/documentation/sources/explanation/cdk8s-workflow.md +0 -66
- package/documentation/sources/explanation/features.md +0 -374
- package/documentation/sources/explanation/index.md +0 -34
- package/documentation/sources/how-to/backup-and-restore.md +0 -107
- package/documentation/sources/how-to/configure-env-and-secrets.md +0 -184
- package/documentation/sources/how-to/configure-ingress-tls.md +0 -108
- package/documentation/sources/how-to/configure-security-context.md +0 -143
- package/documentation/sources/how-to/deploy-blicca.md +0 -334
- package/documentation/sources/how-to/deploy-volto.md +0 -324
- package/documentation/sources/how-to/deploy-with-httpcache.md +0 -224
- package/documentation/sources/how-to/deploy-with-vinyl-cache.md +0 -273
- package/documentation/sources/how-to/enable-prometheus-monitoring.md +0 -122
- package/documentation/sources/how-to/index.md +0 -85
- package/documentation/sources/how-to/scale-and-high-availability.md +0 -122
- package/documentation/sources/how-to/schedule-pods.md +0 -145
- package/documentation/sources/how-to/setup-prerequisites.md +0 -363
- package/documentation/sources/how-to/troubleshooting.md +0 -113
- package/documentation/sources/how-to/upgrade-and-rollout.md +0 -140
- package/documentation/sources/index.md +0 -109
- package/documentation/sources/reference/api/index.md +0 -40
- package/documentation/sources/reference/configuration-options.md +0 -352
- package/documentation/sources/reference/index.md +0 -41
- package/documentation/sources/tutorials/01-quick-start.md +0 -165
- package/documentation/sources/tutorials/index.md +0 -53
- package/examples/blicca/.env.example +0 -20
- package/examples/blicca/README.md +0 -339
- package/examples/blicca/__snapshots__/main.test.ts.snap +0 -1035
- package/examples/blicca/cdk8s.yaml +0 -6
- package/examples/blicca/config/varnish.tpl.vcl +0 -217
- package/examples/blicca/ingress.ts +0 -217
- package/examples/blicca/jest.config.js +0 -11
- package/examples/blicca/main.test.ts +0 -18
- package/examples/blicca/main.ts +0 -101
- package/examples/blicca/package.json +0 -36
- package/examples/blicca/postgres.cloudnativepg.ts +0 -63
- package/examples/blicca/postgres.plain.ts +0 -115
- package/examples/blicca/tsconfig.json +0 -33
- package/examples/volto/.env.example +0 -21
- package/examples/volto/README.md +0 -292
- package/examples/volto/__snapshots__/main.test.ts.snap +0 -1206
- package/examples/volto/cdk8s.yaml +0 -6
- package/examples/volto/ingress.ts +0 -229
- package/examples/volto/jest.config.js +0 -11
- package/examples/volto/main.test.ts +0 -18
- package/examples/volto/main.ts +0 -105
- package/examples/volto/package.json +0 -36
- package/examples/volto/postgres.cloudnativepg.ts +0 -63
- package/examples/volto/postgres.plain.ts +0 -115
- package/examples/volto/tsconfig.json +0 -33
package/.jsii
CHANGED
|
@@ -3783,6 +3783,6 @@
|
|
|
3783
3783
|
"symbolId": "src/vinylcache:VinylCacheTracing"
|
|
3784
3784
|
}
|
|
3785
3785
|
},
|
|
3786
|
-
"version": "0.3.
|
|
3787
|
-
"fingerprint": "
|
|
3786
|
+
"version": "0.3.3",
|
|
3787
|
+
"fingerprint": "nJX1t9f3qumXXSIN9idM7+CqQwi2igWF2zZmvy9lXdU="
|
|
3788
3788
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Plone vcl_backend_response snippet for cloud-vinyl
|
|
2
|
+
# Injected into vcl_backend_response
|
|
3
|
+
|
|
4
|
+
# Remove Set-Cookie from static resources
|
|
5
|
+
if (bereq.url ~ "\.(pdf|asc|dat|txt|doc|xls|ppt|tgz|csv|png|gif|jpeg|jpg|ico|swf|css|js|svg|woff|woff2|ttf|eot)(\?.*)?$") {
|
|
6
|
+
unset beresp.http.Set-Cookie;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
# Don't cache responses with Set-Cookie
|
|
10
|
+
if (beresp.http.Set-Cookie) {
|
|
11
|
+
set beresp.uncacheable = true;
|
|
12
|
+
return (deliver);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# Don't cache private responses
|
|
16
|
+
if (beresp.http.Cache-Control ~ "private") {
|
|
17
|
+
set beresp.uncacheable = true;
|
|
18
|
+
return (deliver);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# Default TTL for responses without Cache-Control
|
|
22
|
+
if (!beresp.http.Cache-Control) {
|
|
23
|
+
set beresp.ttl = 30s;
|
|
24
|
+
set beresp.grace = 60s;
|
|
25
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Plone vcl_recv snippet for cloud-vinyl
|
|
2
|
+
# Injected into vcl_recv for GET and HEAD only, before return(hash).
|
|
3
|
+
# PURGE, BAN and xkey are handled by cloud-vinyl's own VCL before this point.
|
|
4
|
+
|
|
5
|
+
# Detect authenticated requests
|
|
6
|
+
if (req.http.Cookie ~ "__ac" || req.http.Authorization) {
|
|
7
|
+
set req.http.X-Plone-Auth = "true";
|
|
8
|
+
return (pass);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
# Remove tracking cookies to improve cache hit rate
|
|
12
|
+
if (req.http.Cookie) {
|
|
13
|
+
set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(_ga[^=]*|_gid|_gat|__utm[a-z]+|_hj[a-z]+|_fbp|_fbc)=[^;]*", "");
|
|
14
|
+
set req.http.Cookie = regsuball(req.http.Cookie, "^;\s*", "");
|
|
15
|
+
if (req.http.Cookie ~ "^\s*$") {
|
|
16
|
+
unset req.http.Cookie;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -117,7 +117,7 @@ sub vcl_recv {
|
|
|
117
117
|
if (req.http.X-Forwarded-Proto) {
|
|
118
118
|
set req.http.x-vcl-proto = req.http.X-Forwarded-Proto;
|
|
119
119
|
}
|
|
120
|
-
set req.url = "/VirtualHostBase/" + req.http.x-vcl-proto + "/" + req.http.host + "/
|
|
120
|
+
set req.url = "/VirtualHostBase/" + req.http.x-vcl-proto + "/" + req.http.host + "/{{ .Env.BACKEND_SITE_ID }}/VirtualHostRoot" + req.url;
|
|
121
121
|
} else {
|
|
122
122
|
set req.http.x-vcl-plone = "Frontend";
|
|
123
123
|
set req.backend_hint = lbPloneFrontend.backend();
|
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.3.
|
|
59
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.PloneHttpcache", version: "0.3.3" };
|
|
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/plone.js
CHANGED
|
@@ -96,7 +96,7 @@ var PloneVariant;
|
|
|
96
96
|
* });
|
|
97
97
|
*/
|
|
98
98
|
class Plone extends constructs_1.Construct {
|
|
99
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.Plone", version: "0.3.
|
|
99
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.Plone", version: "0.3.3" };
|
|
100
100
|
/**
|
|
101
101
|
* Name of the backend Kubernetes service.
|
|
102
102
|
* Use this to reference the backend service from other constructs.
|
package/lib/vinylcache.js
CHANGED
|
@@ -96,7 +96,7 @@ function quantities(cpu, memory, from) {
|
|
|
96
96
|
* // cache.invalidationUrl for plone.cachepurging
|
|
97
97
|
*/
|
|
98
98
|
class PloneVinylCache extends constructs_1.Construct {
|
|
99
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.PloneVinylCache", version: "0.3.
|
|
99
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@bluedynamics/cdk8s-plone.PloneVinylCache", version: "0.3.3" };
|
|
100
100
|
/**
|
|
101
101
|
* Name of the VinylCache service created by the operator.
|
|
102
102
|
* Use this to reference the cache service from ingress or other constructs.
|
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"pre-compile": "projen pre-compile",
|
|
28
28
|
"release": "projen release",
|
|
29
29
|
"test": "projen test",
|
|
30
|
+
"test:packed": "projen test:packed",
|
|
30
31
|
"test:watch": "projen test:watch",
|
|
31
32
|
"unbump": "projen unbump",
|
|
32
33
|
"upgrade": "projen upgrade",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"jsii-docgen": "^10.5.0",
|
|
59
60
|
"jsii-pacmak": "^1.143.0",
|
|
60
61
|
"jsii-rosetta": "~5.9.11",
|
|
61
|
-
"projen": "^0.105.
|
|
62
|
+
"projen": "^0.105.8",
|
|
62
63
|
"ts-jest": "^29.4.15",
|
|
63
64
|
"ts-node": "^10.9.2",
|
|
64
65
|
"typescript": "^5.9.3",
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"publishConfig": {
|
|
81
82
|
"access": "public"
|
|
82
83
|
},
|
|
83
|
-
"version": "0.3.
|
|
84
|
+
"version": "0.3.3",
|
|
84
85
|
"jest": {
|
|
85
86
|
"coverageProvider": "v8",
|
|
86
87
|
"testMatch": [
|
package/.claude/claude.md
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# CDK8S Best Practices
|
|
2
|
-
|
|
3
|
-
## Naming Convention Rule
|
|
4
|
-
|
|
5
|
-
**NEVER use `metadata.name` in CDK8S constructs.**
|
|
6
|
-
|
|
7
|
-
- CDK8S automatically generates unique names for all Kubernetes resources
|
|
8
|
-
- Always let CDK8S decide the name and reference it via the construct's `name` property
|
|
9
|
-
- Manual names can cause conflicts and break CDK8S's naming conventions
|
|
10
|
-
|
|
11
|
-
### ❌ Wrong:
|
|
12
|
-
```typescript
|
|
13
|
-
const db = new cnpg.Cluster(this, 'db', {
|
|
14
|
-
metadata: {
|
|
15
|
-
name: 'my-cluster', // NEVER do this!
|
|
16
|
-
},
|
|
17
|
-
spec: { /* ... */ }
|
|
18
|
-
});
|
|
19
|
-
this.dbServiceName = 'my-cluster-rw'; // Wrong: hard-coded name
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### ✅ Correct:
|
|
23
|
-
```typescript
|
|
24
|
-
const db = new cnpg.Cluster(this, 'db', {
|
|
25
|
-
metadata: {
|
|
26
|
-
// No name property - let CDK8S generate it
|
|
27
|
-
labels: { /* ... */ }
|
|
28
|
-
},
|
|
29
|
-
spec: { /* ... */ }
|
|
30
|
-
});
|
|
31
|
-
// Reference the generated name
|
|
32
|
-
this.dbServiceName = `${db.name}-rw`;
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
This ensures:
|
|
36
|
-
- No naming conflicts
|
|
37
|
-
- Proper CDK8S resource tracking
|
|
38
|
-
- Consistent naming across the application
|
|
39
|
-
- Easy refactoring and composition
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(echo $?)",
|
|
5
|
-
"Bash(find:*)",
|
|
6
|
-
"Bash(gh issue view:*)",
|
|
7
|
-
"Bash(gh pr view:*)",
|
|
8
|
-
"Bash(gh run list:*)",
|
|
9
|
-
"Bash(gh run view:*)",
|
|
10
|
-
"Bash(git add:*)",
|
|
11
|
-
"Bash(git checkout:*)",
|
|
12
|
-
"Bash(git cherry-pick:*)",
|
|
13
|
-
"Bash(git commit:*)",
|
|
14
|
-
"Bash(git log:*)",
|
|
15
|
-
"Bash(git ls-tree:*)",
|
|
16
|
-
"Bash(git push)",
|
|
17
|
-
"Bash(git stash:*)",
|
|
18
|
-
"Bash(make docs:*)",
|
|
19
|
-
"Bash(npm install:*)",
|
|
20
|
-
"Bash(npm run compile:*)",
|
|
21
|
-
"Bash(npm test:*)",
|
|
22
|
-
"Bash(npx projen:*)",
|
|
23
|
-
"Bash(nvm use:*)",
|
|
24
|
-
"Bash(source:*)",
|
|
25
|
-
"Bash(yarn install)",
|
|
26
|
-
"Bash(npm run test-update:*)"
|
|
27
|
-
],
|
|
28
|
-
"deny": [],
|
|
29
|
-
"ask": []
|
|
30
|
-
}
|
|
31
|
-
}
|
package/CLAUDE.md
DELETED
|
@@ -1,352 +0,0 @@
|
|
|
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 Blicca (server-side rendered, formerly 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)
|