@bluedynamics/cdk8s-plone 0.1.5 → 0.1.6
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 +3 -3
- package/CLAUDE.md +352 -0
- package/README.md +55 -179
- package/documentation/Makefile +357 -0
- package/documentation/README.md +284 -0
- package/documentation/mx.ini +3 -0
- package/documentation/sources/_static/brand-theme.css +685 -0
- package/documentation/sources/_static/custom-icons.css +123 -0
- package/documentation/sources/_static/fonts/hack/Hack-Regular.woff2 +0 -0
- package/documentation/sources/_static/fonts/orbitron/Orbitron-Black.woff2 +11 -0
- package/documentation/sources/_static/fonts/orbitron/Orbitron-Bold.woff2 +11 -0
- package/documentation/sources/_static/fonts/orbitron/Orbitron-Regular.woff2 +0 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Bold.woff2 +11 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Medium.woff2 +11 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Regular.woff2 +11 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-SemiBold.woff2 +11 -0
- package/documentation/sources/_static/kup6s-icon-explanation.svg +32 -0
- package/documentation/sources/_static/kup6s-icon-howto.svg +34 -0
- package/documentation/sources/_static/kup6s-icon-plone.svg +79 -0
- package/documentation/sources/_static/kup6s-icon-reference.svg +34 -0
- package/documentation/sources/_static/kup6s-icon-tutorials.svg +30 -0
- package/documentation/sources/_static/logo-fix.js +12 -0
- package/documentation/sources/conf.py +105 -0
- package/documentation/sources/explanation/architecture.md +311 -0
- package/documentation/sources/explanation/features.md +353 -0
- package/documentation/sources/explanation/index.md +51 -0
- package/documentation/sources/how-to/index.md +56 -0
- package/documentation/sources/how-to/setup-prerequisites.md +354 -0
- package/documentation/sources/index.md +108 -0
- package/documentation/sources/reference/api/.gitkeep +1 -0
- package/documentation/sources/reference/configuration-options.md +370 -0
- package/documentation/sources/reference/index.md +59 -0
- package/documentation/sources/tutorials/01-quick-start.md +157 -0
- package/documentation/sources/tutorials/index.md +48 -0
- package/lib/httpcache.js +1 -1
- package/lib/plone.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# Architecture Overview
|
|
2
|
+
|
|
3
|
+
Understanding the architecture and design of cdk8s-plone deployments.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
cdk8s-plone provides CDK8S constructs for deploying Plone CMS on Kubernetes. The library handles all Kubernetes resources needed for a production-grade Plone deployment.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
### Deployment Variants
|
|
12
|
+
|
|
13
|
+
cdk8s-plone supports two deployment variants:
|
|
14
|
+
|
|
15
|
+
**Volto (Modern)**
|
|
16
|
+
- React-based frontend (Volto)
|
|
17
|
+
- REST API backend (Plone)
|
|
18
|
+
- Separate services for frontend and backend
|
|
19
|
+
- Modern user experience
|
|
20
|
+
- Headless CMS architecture
|
|
21
|
+
|
|
22
|
+
**Classic UI (Traditional)**
|
|
23
|
+
- Server-side rendered Plone
|
|
24
|
+
- Single integrated service
|
|
25
|
+
- Traditional Plone experience
|
|
26
|
+
- Simpler deployment model
|
|
27
|
+
|
|
28
|
+
### High Availability
|
|
29
|
+
|
|
30
|
+
**Replica Management**
|
|
31
|
+
- Configurable number of replicas for backend and frontend
|
|
32
|
+
- Default: 2 replicas for each component
|
|
33
|
+
- Supports horizontal scaling
|
|
34
|
+
|
|
35
|
+
**Pod Disruption Budgets**
|
|
36
|
+
- Ensures minimum availability during cluster operations
|
|
37
|
+
- Configurable `minAvailable` and `maxUnavailable` thresholds
|
|
38
|
+
- Protects against voluntary disruptions (node drains, updates)
|
|
39
|
+
|
|
40
|
+
**Health Probes**
|
|
41
|
+
- Readiness probes: Traffic routing only to healthy pods
|
|
42
|
+
- Liveness probes: Automatic restart of unhealthy pods
|
|
43
|
+
- Configurable delays, timeouts, and thresholds
|
|
44
|
+
|
|
45
|
+
### HTTP Caching Layer
|
|
46
|
+
|
|
47
|
+
**Varnish Integration**
|
|
48
|
+
- Uses [kube-httpcache](https://github.com/mittwald/kube-httpcache) Helm chart
|
|
49
|
+
- Cluster-wide cache invalidation
|
|
50
|
+
- HTTP/2 support
|
|
51
|
+
- Configurable VCL
|
|
52
|
+
- Prometheus metrics export
|
|
53
|
+
|
|
54
|
+
**Benefits**
|
|
55
|
+
- Reduced backend load
|
|
56
|
+
- Improved response times
|
|
57
|
+
- Better scalability
|
|
58
|
+
- Automatic cache invalidation on content changes
|
|
59
|
+
|
|
60
|
+
### Multi-Language Support
|
|
61
|
+
|
|
62
|
+
The library is published in multiple languages:
|
|
63
|
+
|
|
64
|
+
**TypeScript/JavaScript**
|
|
65
|
+
- Native CDK8S experience
|
|
66
|
+
- Full TypeScript types
|
|
67
|
+
- Published to npm: `@bluedynamics/cdk8s-plone`
|
|
68
|
+
|
|
69
|
+
**Python**
|
|
70
|
+
- JSII-generated Python bindings
|
|
71
|
+
- Pythonic API
|
|
72
|
+
- Published to PyPI: `cdk8s-plone`
|
|
73
|
+
|
|
74
|
+
## Architecture Diagram
|
|
75
|
+
|
|
76
|
+
```mermaid
|
|
77
|
+
graph TB
|
|
78
|
+
subgraph "External Access"
|
|
79
|
+
Client[Client/Browser]
|
|
80
|
+
Ingress[Ingress Controller]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
subgraph "HTTP Cache Layer (Optional)"
|
|
84
|
+
Varnish[Varnish Cache<br/>kube-httpcache]
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
subgraph "Plone Frontend (Volto)"
|
|
88
|
+
FrontendSvc[Frontend Service]
|
|
89
|
+
Frontend1[Frontend Pod 1]
|
|
90
|
+
Frontend2[Frontend Pod 2]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
subgraph "Plone Backend (API)"
|
|
94
|
+
BackendSvc[Backend Service]
|
|
95
|
+
Backend1[Backend Pod 1]
|
|
96
|
+
Backend2[Backend Pod 2]
|
|
97
|
+
Backend3[Backend Pod 3]
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
subgraph "Data Layer"
|
|
101
|
+
DB[(External Database<br/>PostgreSQL/MySQL/Oracle<br/>with RelStorage)]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
Client --> Ingress
|
|
105
|
+
Ingress --> Varnish
|
|
106
|
+
Varnish -.cache miss.-> FrontendSvc
|
|
107
|
+
Varnish -.invalidation.-> BackendSvc
|
|
108
|
+
|
|
109
|
+
FrontendSvc --> Frontend1
|
|
110
|
+
FrontendSvc --> Frontend2
|
|
111
|
+
|
|
112
|
+
Frontend1 --> BackendSvc
|
|
113
|
+
Frontend2 --> BackendSvc
|
|
114
|
+
|
|
115
|
+
BackendSvc --> Backend1
|
|
116
|
+
BackendSvc --> Backend2
|
|
117
|
+
BackendSvc --> Backend3
|
|
118
|
+
|
|
119
|
+
Backend1 --> DB
|
|
120
|
+
Backend2 --> DB
|
|
121
|
+
Backend3 --> DB
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Component Responsibilities
|
|
125
|
+
|
|
126
|
+
### Backend
|
|
127
|
+
|
|
128
|
+
**Responsibilities:**
|
|
129
|
+
- Plone REST API
|
|
130
|
+
- Content management
|
|
131
|
+
- ZODB with RelStorage (external database)
|
|
132
|
+
- Search indexing
|
|
133
|
+
- Workflow engine
|
|
134
|
+
|
|
135
|
+
**Resources:**
|
|
136
|
+
- CPU: Compute-intensive operations (catalog queries, indexing)
|
|
137
|
+
- Memory: ZODB cache, Python processes
|
|
138
|
+
- Storage: Delegated to external database (PostgreSQL/MySQL/Oracle)
|
|
139
|
+
|
|
140
|
+
**Scaling:**
|
|
141
|
+
- Horizontal: Add replicas for read scalability with RelStorage
|
|
142
|
+
- Vertical: Increase resources for large catalogs
|
|
143
|
+
- External database handles storage and multi-writer scenarios
|
|
144
|
+
|
|
145
|
+
### Frontend (Volto)
|
|
146
|
+
|
|
147
|
+
**Responsibilities:**
|
|
148
|
+
- React single-page application
|
|
149
|
+
- Server-side rendering (SSR)
|
|
150
|
+
- API client
|
|
151
|
+
- User interface
|
|
152
|
+
|
|
153
|
+
**Resources:**
|
|
154
|
+
- CPU: SSR rendering, JavaScript execution
|
|
155
|
+
- Memory: Node.js processes, SSR caching
|
|
156
|
+
- Storage: Minimal (build artifacts only)
|
|
157
|
+
|
|
158
|
+
**Scaling:**
|
|
159
|
+
- Horizontal: Add replicas for traffic handling
|
|
160
|
+
- Vertical: Increase resources for SSR performance
|
|
161
|
+
- No shared storage needed (stateless)
|
|
162
|
+
|
|
163
|
+
### HTTP Cache (Varnish)
|
|
164
|
+
|
|
165
|
+
**Responsibilities:**
|
|
166
|
+
- HTTP caching
|
|
167
|
+
- Cache invalidation
|
|
168
|
+
- Request routing
|
|
169
|
+
- Load distribution
|
|
170
|
+
|
|
171
|
+
**Resources:**
|
|
172
|
+
- CPU: Request processing, cache lookup
|
|
173
|
+
- Memory: Cache storage
|
|
174
|
+
- Storage: Not required (in-memory cache)
|
|
175
|
+
|
|
176
|
+
**Scaling:**
|
|
177
|
+
- Horizontal: Add replicas for cache distribution
|
|
178
|
+
- Vertical: Increase memory for larger cache
|
|
179
|
+
|
|
180
|
+
## Kubernetes Resources Created
|
|
181
|
+
|
|
182
|
+
For a typical Volto deployment, cdk8s-plone creates:
|
|
183
|
+
|
|
184
|
+
**Backend:**
|
|
185
|
+
- Deployment (backend pods)
|
|
186
|
+
- Service (internal)
|
|
187
|
+
- PodDisruptionBudget (optional)
|
|
188
|
+
- ConfigMap (optional, for configuration)
|
|
189
|
+
|
|
190
|
+
**Frontend:**
|
|
191
|
+
- Deployment (frontend pods)
|
|
192
|
+
- Service (internal)
|
|
193
|
+
- PodDisruptionBudget (optional)
|
|
194
|
+
|
|
195
|
+
**HTTP Cache (optional):**
|
|
196
|
+
- StatefulSet (Varnish pods)
|
|
197
|
+
- Service (entry point)
|
|
198
|
+
- ConfigMap (VCL configuration)
|
|
199
|
+
- Secret (admin credentials)
|
|
200
|
+
- ServiceMonitor (optional, for Prometheus)
|
|
201
|
+
|
|
202
|
+
## Design Decisions
|
|
203
|
+
|
|
204
|
+
### CDK8S Constructs
|
|
205
|
+
|
|
206
|
+
**Why CDK8S?**
|
|
207
|
+
- Type-safe infrastructure as code
|
|
208
|
+
- Reusable components
|
|
209
|
+
- Familiar programming languages
|
|
210
|
+
- No templating required
|
|
211
|
+
- IDE support and IntelliSense
|
|
212
|
+
|
|
213
|
+
**Benefits:**
|
|
214
|
+
- Reduced boilerplate
|
|
215
|
+
- Better error detection
|
|
216
|
+
- Easier testing
|
|
217
|
+
- Composition over configuration
|
|
218
|
+
|
|
219
|
+
### Separate Frontend/Backend
|
|
220
|
+
|
|
221
|
+
**Volto Architecture:**
|
|
222
|
+
- Independent scaling of frontend and backend
|
|
223
|
+
- Frontend can be restarted without affecting backend
|
|
224
|
+
- Better resource utilization
|
|
225
|
+
- Clear separation of concerns
|
|
226
|
+
|
|
227
|
+
**When to use Classic UI:**
|
|
228
|
+
- Simpler deployment model
|
|
229
|
+
- Lower resource requirements
|
|
230
|
+
- Legacy integrations
|
|
231
|
+
- Specific add-on requirements
|
|
232
|
+
|
|
233
|
+
### Optional Varnish Layer
|
|
234
|
+
|
|
235
|
+
**Design Choice:**
|
|
236
|
+
- Varnish is optional, not mandatory
|
|
237
|
+
- Uses established Helm chart (kube-httpcache)
|
|
238
|
+
- Cluster-wide cache invalidation
|
|
239
|
+
- Production-tested solution
|
|
240
|
+
|
|
241
|
+
**Trade-offs:**
|
|
242
|
+
- Additional complexity
|
|
243
|
+
- More resources required
|
|
244
|
+
- Better performance at scale
|
|
245
|
+
- Reduced backend load
|
|
246
|
+
|
|
247
|
+
### Health Probes
|
|
248
|
+
|
|
249
|
+
**Readiness Probe:**
|
|
250
|
+
- Enabled by default for backend
|
|
251
|
+
- Prevents traffic to unready pods
|
|
252
|
+
- Fast startup detection
|
|
253
|
+
|
|
254
|
+
**Liveness Probe:**
|
|
255
|
+
- Disabled by default for backend (Plone is resilient)
|
|
256
|
+
- Recommended enabled for frontend (detect SSR hangs)
|
|
257
|
+
- Configurable thresholds
|
|
258
|
+
|
|
259
|
+
## Production Considerations
|
|
260
|
+
|
|
261
|
+
### Resource Planning
|
|
262
|
+
|
|
263
|
+
**Backend:**
|
|
264
|
+
- Plan for catalog size and query complexity
|
|
265
|
+
- ZODB cache size affects memory needs
|
|
266
|
+
- Indexing operations are CPU-intensive
|
|
267
|
+
|
|
268
|
+
**Frontend:**
|
|
269
|
+
- SSR requires CPU resources
|
|
270
|
+
- Memory for Node.js processes
|
|
271
|
+
- Scale based on traffic patterns
|
|
272
|
+
|
|
273
|
+
**Cache:**
|
|
274
|
+
- Memory size determines cache capacity
|
|
275
|
+
- Monitor hit rates and adjust sizing
|
|
276
|
+
|
|
277
|
+
### High Availability
|
|
278
|
+
|
|
279
|
+
**Recommendations:**
|
|
280
|
+
- Minimum 2 replicas per component
|
|
281
|
+
- Configure PodDisruptionBudgets
|
|
282
|
+
- Use node affinity for distribution
|
|
283
|
+
- Enable health probes
|
|
284
|
+
|
|
285
|
+
**Database:**
|
|
286
|
+
- External database required (PostgreSQL, MySQL, or Oracle)
|
|
287
|
+
- Uses RelStorage for ZODB persistence
|
|
288
|
+
- Enables true multi-writer deployments
|
|
289
|
+
- Better backup and recovery options
|
|
290
|
+
- MySQL derivatives (MariaDB, Percona) and Oracle are supported but untested
|
|
291
|
+
|
|
292
|
+
### Monitoring
|
|
293
|
+
|
|
294
|
+
**Metrics to Track:**
|
|
295
|
+
- Pod resource usage (CPU, memory)
|
|
296
|
+
- Request rates and latencies
|
|
297
|
+
- Cache hit rates
|
|
298
|
+
- Error rates
|
|
299
|
+
- Health probe failures
|
|
300
|
+
|
|
301
|
+
**Tools:**
|
|
302
|
+
- Prometheus for metrics collection
|
|
303
|
+
- Grafana for visualization
|
|
304
|
+
- Kubernetes events monitoring
|
|
305
|
+
|
|
306
|
+
## See Also
|
|
307
|
+
|
|
308
|
+
- [Plone Variants](plone-variants.md) - Detailed comparison of Volto vs Classic UI
|
|
309
|
+
- [Scaling Patterns](scaling-patterns.md) - Horizontal and vertical scaling strategies
|
|
310
|
+
- [Configuration Options](../reference/configuration-options.md) - Complete configuration reference
|
|
311
|
+
- [Quick Start](../tutorials/01-quick-start.md) - Getting started tutorial
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
# Features
|
|
2
|
+
|
|
3
|
+
Complete overview of cdk8s-plone features and capabilities.
|
|
4
|
+
|
|
5
|
+
## Core Features
|
|
6
|
+
|
|
7
|
+
### Deployment Variants
|
|
8
|
+
|
|
9
|
+
cdk8s-plone supports two deployment modes to match your requirements:
|
|
10
|
+
|
|
11
|
+
**Volto (Modern React Frontend)**
|
|
12
|
+
- Modern React-based user interface
|
|
13
|
+
- Headless CMS architecture
|
|
14
|
+
- Separate frontend and backend services
|
|
15
|
+
- Best for: New projects, modern UX requirements, API-first architectures
|
|
16
|
+
|
|
17
|
+
**Classic UI (Traditional Plone)**
|
|
18
|
+
- Server-side rendered interface
|
|
19
|
+
- Integrated single-service deployment
|
|
20
|
+
- Traditional Plone experience
|
|
21
|
+
- Best for: Legacy migrations, existing add-ons, simpler deployments
|
|
22
|
+
|
|
23
|
+
See [Plone Variants](plone-variants.md) for detailed comparison.
|
|
24
|
+
|
|
25
|
+
### High Availability
|
|
26
|
+
|
|
27
|
+
**Configurable Replicas**
|
|
28
|
+
- Set any number of replicas for backend and frontend
|
|
29
|
+
- Default: 2 replicas per component
|
|
30
|
+
- Supports horizontal scaling for increased capacity
|
|
31
|
+
|
|
32
|
+
**Pod Disruption Budgets**
|
|
33
|
+
- Ensures minimum availability during voluntary disruptions
|
|
34
|
+
- Prevents too many pods being unavailable simultaneously
|
|
35
|
+
- Configurable `minAvailable` or `maxUnavailable` thresholds
|
|
36
|
+
|
|
37
|
+
**Example:**
|
|
38
|
+
```typescript
|
|
39
|
+
backend: {
|
|
40
|
+
replicas: 5,
|
|
41
|
+
minAvailable: 3, // Keep at least 3 pods running
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### HTTP Caching with Varnish
|
|
46
|
+
|
|
47
|
+
**kube-httpcache Integration**
|
|
48
|
+
- Production-grade Varnish deployment
|
|
49
|
+
- Cluster-wide cache invalidation
|
|
50
|
+
- Automatic invalidation on content changes
|
|
51
|
+
- HTTP/2 support
|
|
52
|
+
|
|
53
|
+
**Benefits:**
|
|
54
|
+
- Dramatically reduced backend load
|
|
55
|
+
- Faster response times
|
|
56
|
+
- Better scalability
|
|
57
|
+
- Lower resource requirements
|
|
58
|
+
|
|
59
|
+
**Monitoring:**
|
|
60
|
+
- Built-in Prometheus exporter
|
|
61
|
+
- Cache hit/miss metrics
|
|
62
|
+
- Performance monitoring
|
|
63
|
+
|
|
64
|
+
### Resource Management
|
|
65
|
+
|
|
66
|
+
**Fine-Grained Control**
|
|
67
|
+
- CPU requests and limits
|
|
68
|
+
- Memory requests and limits
|
|
69
|
+
- Per-component configuration
|
|
70
|
+
- Kubernetes-native resource management
|
|
71
|
+
|
|
72
|
+
**Example:**
|
|
73
|
+
```typescript
|
|
74
|
+
backend: {
|
|
75
|
+
requestCpu: '500m',
|
|
76
|
+
limitCpu: '2',
|
|
77
|
+
requestMemory: '512Mi',
|
|
78
|
+
limitMemory: '2Gi',
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Health Monitoring
|
|
83
|
+
|
|
84
|
+
**Readiness Probes**
|
|
85
|
+
- Ensures pods are ready before receiving traffic
|
|
86
|
+
- Configurable delays and thresholds
|
|
87
|
+
- Enabled by default for backend
|
|
88
|
+
- Prevents downtime during startup
|
|
89
|
+
|
|
90
|
+
**Liveness Probes**
|
|
91
|
+
- Automatic restart of unhealthy pods
|
|
92
|
+
- Configurable for backend and frontend
|
|
93
|
+
- Recommended for frontend to detect SSR hangs
|
|
94
|
+
- Prevents stuck processes
|
|
95
|
+
|
|
96
|
+
**Example:**
|
|
97
|
+
```typescript
|
|
98
|
+
frontend: {
|
|
99
|
+
livenessEnabled: true,
|
|
100
|
+
livenessInitialDelaySeconds: 30,
|
|
101
|
+
livenessFailureThreshold: 3,
|
|
102
|
+
readinessEnabled: true,
|
|
103
|
+
readinessInitialDelaySeconds: 10,
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Environment Configuration
|
|
108
|
+
|
|
109
|
+
**Flexible Environment Variables**
|
|
110
|
+
- Use cdk8s-plus-30 Env API
|
|
111
|
+
- Support for values, ConfigMaps, and Secrets
|
|
112
|
+
- Per-component environment configuration
|
|
113
|
+
|
|
114
|
+
**Example:**
|
|
115
|
+
```typescript
|
|
116
|
+
import { Env } from 'cdk8s-plus-30';
|
|
117
|
+
|
|
118
|
+
backend: {
|
|
119
|
+
environment: {
|
|
120
|
+
variables: {
|
|
121
|
+
SITE: Env.value('MySite'),
|
|
122
|
+
DB_USER: Env.fromSecret('db-credentials', 'username'),
|
|
123
|
+
CORS_ALLOW: Env.fromConfigMap('app-config', 'cors-origins'),
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Kubernetes Annotations
|
|
130
|
+
|
|
131
|
+
**Three Levels of Annotations**
|
|
132
|
+
- **Deployment annotations**: Metadata for the deployment resource
|
|
133
|
+
- **Pod annotations**: Applied to pod templates (Prometheus, service mesh)
|
|
134
|
+
- **Service annotations**: Applied to services (external-dns, load balancers)
|
|
135
|
+
|
|
136
|
+
**Example:**
|
|
137
|
+
```typescript
|
|
138
|
+
backend: {
|
|
139
|
+
podAnnotations: {
|
|
140
|
+
'prometheus.io/scrape': 'true',
|
|
141
|
+
'prometheus.io/port': '8080',
|
|
142
|
+
},
|
|
143
|
+
serviceAnnotations: {
|
|
144
|
+
'external-dns.alpha.kubernetes.io/hostname': 'backend.example.com',
|
|
145
|
+
},
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Private Registry Support
|
|
150
|
+
|
|
151
|
+
**Image Pull Secrets**
|
|
152
|
+
- Support for private container registries
|
|
153
|
+
- Multiple secrets supported
|
|
154
|
+
- Applied to all deployments
|
|
155
|
+
|
|
156
|
+
**Example:**
|
|
157
|
+
```typescript
|
|
158
|
+
new Plone(chart, 'my-plone', {
|
|
159
|
+
imagePullSecrets: ['docker-registry', 'gcr-registry'],
|
|
160
|
+
backend: { image: 'private-registry.io/plone-backend:6.1.3' },
|
|
161
|
+
})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Multi-Language Support
|
|
165
|
+
|
|
166
|
+
### TypeScript/JavaScript
|
|
167
|
+
|
|
168
|
+
**Native CDK8S Experience**
|
|
169
|
+
- Full TypeScript type definitions
|
|
170
|
+
- IDE autocomplete and validation
|
|
171
|
+
- Familiar syntax for web developers
|
|
172
|
+
|
|
173
|
+
**Installation:**
|
|
174
|
+
```bash
|
|
175
|
+
npm install @bluedynamics/cdk8s-plone
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Example:**
|
|
179
|
+
```typescript
|
|
180
|
+
import { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';
|
|
181
|
+
|
|
182
|
+
new Plone(chart, 'my-plone', {
|
|
183
|
+
variant: PloneVariant.VOLTO,
|
|
184
|
+
backend: { image: 'plone/plone-backend:6.1.3' },
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Python
|
|
189
|
+
|
|
190
|
+
**JSII-Generated Bindings**
|
|
191
|
+
- Pythonic API
|
|
192
|
+
- Type hints support
|
|
193
|
+
- Familiar syntax for Python developers
|
|
194
|
+
|
|
195
|
+
**Installation:**
|
|
196
|
+
```bash
|
|
197
|
+
pip install cdk8s-plone
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Example:**
|
|
201
|
+
```python
|
|
202
|
+
from cdk8s_plone import Plone, PloneVariant
|
|
203
|
+
|
|
204
|
+
Plone(chart, "my-plone",
|
|
205
|
+
variant=PloneVariant.VOLTO,
|
|
206
|
+
backend={"image": "plone/plone-backend:6.1.3"}
|
|
207
|
+
)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Infrastructure as Code Benefits
|
|
211
|
+
|
|
212
|
+
### Type Safety
|
|
213
|
+
|
|
214
|
+
**Compile-Time Validation**
|
|
215
|
+
- Catch configuration errors before deployment
|
|
216
|
+
- IDE validation and autocomplete
|
|
217
|
+
- Refactoring support
|
|
218
|
+
|
|
219
|
+
**Example:**
|
|
220
|
+
```typescript
|
|
221
|
+
// TypeScript catches this error at compile time
|
|
222
|
+
backend: {
|
|
223
|
+
image: 'plone/plone-backend:6.1.3',
|
|
224
|
+
replicas: 'three', // ❌ Type error: Expected number
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Reusability
|
|
229
|
+
|
|
230
|
+
**Construct Composition**
|
|
231
|
+
- Create custom constructs
|
|
232
|
+
- Encapsulate best practices
|
|
233
|
+
- Share across projects
|
|
234
|
+
|
|
235
|
+
**Example:**
|
|
236
|
+
```typescript
|
|
237
|
+
class ProductionPlone extends Construct {
|
|
238
|
+
constructor(scope: Construct, id: string) {
|
|
239
|
+
super(scope, id);
|
|
240
|
+
|
|
241
|
+
const plone = new Plone(this, 'plone', {
|
|
242
|
+
variant: PloneVariant.VOLTO,
|
|
243
|
+
backend: {
|
|
244
|
+
replicas: 3,
|
|
245
|
+
minAvailable: 2,
|
|
246
|
+
requestCpu: '500m',
|
|
247
|
+
limitCpu: '2',
|
|
248
|
+
},
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
new PloneHttpcache(this, 'cache', {
|
|
252
|
+
plone: plone,
|
|
253
|
+
replicas: 2,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Testing
|
|
260
|
+
|
|
261
|
+
**Unit Testing**
|
|
262
|
+
- Test infrastructure definitions
|
|
263
|
+
- Validate resource creation
|
|
264
|
+
- Catch regressions early
|
|
265
|
+
|
|
266
|
+
**Example:**
|
|
267
|
+
```typescript
|
|
268
|
+
test('creates backend deployment', () => {
|
|
269
|
+
const chart = Testing.chart();
|
|
270
|
+
new Plone(chart, 'test-plone', {
|
|
271
|
+
backend: { image: 'plone/plone-backend:6.1.3' },
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
const results = Testing.synth(chart);
|
|
275
|
+
expect(results).toMatchSnapshot();
|
|
276
|
+
});
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Programmatic Control
|
|
280
|
+
|
|
281
|
+
**Dynamic Configuration**
|
|
282
|
+
- Use loops and conditionals
|
|
283
|
+
- Environment-based configuration
|
|
284
|
+
- Dynamic resource generation
|
|
285
|
+
|
|
286
|
+
**Example:**
|
|
287
|
+
```typescript
|
|
288
|
+
const environments = ['dev', 'staging', 'prod'];
|
|
289
|
+
|
|
290
|
+
environments.forEach(env => {
|
|
291
|
+
new Plone(chart, `plone-${env}`, {
|
|
292
|
+
backend: {
|
|
293
|
+
replicas: env === 'prod' ? 5 : 2,
|
|
294
|
+
requestMemory: env === 'prod' ? '1Gi' : '512Mi',
|
|
295
|
+
},
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Production-Ready Features
|
|
301
|
+
|
|
302
|
+
### Manifest Generation
|
|
303
|
+
|
|
304
|
+
**Standard Kubernetes YAML**
|
|
305
|
+
- Generates standard Kubernetes manifests
|
|
306
|
+
- No proprietary formats
|
|
307
|
+
- Apply with `kubectl apply -f`
|
|
308
|
+
|
|
309
|
+
**Output:**
|
|
310
|
+
```bash
|
|
311
|
+
cdk8s synth
|
|
312
|
+
# Creates dist/ directory with YAML files
|
|
313
|
+
kubectl apply -f dist/
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Helm Chart Integration
|
|
317
|
+
|
|
318
|
+
**PloneHttpcache Uses Helm**
|
|
319
|
+
- Leverages battle-tested kube-httpcache chart
|
|
320
|
+
- Automatic updates available
|
|
321
|
+
- Community-maintained
|
|
322
|
+
|
|
323
|
+
### Monitoring Integration
|
|
324
|
+
|
|
325
|
+
**Prometheus Ready**
|
|
326
|
+
- ServiceMonitor support for Varnish
|
|
327
|
+
- Pod annotations for scraping
|
|
328
|
+
- Standard metrics endpoints
|
|
329
|
+
|
|
330
|
+
**Example:**
|
|
331
|
+
```typescript
|
|
332
|
+
new PloneHttpcache(chart, 'cache', {
|
|
333
|
+
plone: plone,
|
|
334
|
+
servicemonitor: true, // Creates ServiceMonitor
|
|
335
|
+
exporterEnabled: true, // Enables Prometheus exporter sidecar
|
|
336
|
+
});
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Upcoming Features
|
|
340
|
+
|
|
341
|
+
Features planned for future releases:
|
|
342
|
+
|
|
343
|
+
- **Backup Integration**: Automated backup configurations
|
|
344
|
+
- **Monitoring Dashboards**: Pre-built Grafana dashboards
|
|
345
|
+
|
|
346
|
+
**Note:** Ingress and TLS management are intentionally out of scope - these should be handled by your cluster's ingress controller and cert-manager. RelStorage with PostgreSQL is already supported through external database configuration (separation of concerns).
|
|
347
|
+
|
|
348
|
+
## See Also
|
|
349
|
+
|
|
350
|
+
- [Architecture Overview](architecture.md) - System architecture and design
|
|
351
|
+
- [Configuration Options](../reference/configuration-options.md) - Complete configuration reference
|
|
352
|
+
- [Quick Start](../tutorials/01-quick-start.md) - Getting started tutorial
|
|
353
|
+
- [Example Project](https://github.com/bluedynamics/cdk8s-plone-example) - Complete working example
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
```{image} ../_static/kup6s-icon-explanation.svg
|
|
2
|
+
:align: center
|
|
3
|
+
:class: section-icon-large
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
# Explanation
|
|
7
|
+
|
|
8
|
+
**Understanding-oriented discussion of concepts, architecture, and design decisions.**
|
|
9
|
+
|
|
10
|
+
Explanation guides clarify and illuminate particular topics. They broaden the understanding of cdk8s-plone and help you make informed decisions about how to use it.
|
|
11
|
+
|
|
12
|
+
## Architecture & Concepts
|
|
13
|
+
|
|
14
|
+
```{toctree}
|
|
15
|
+
---
|
|
16
|
+
maxdepth: 1
|
|
17
|
+
titlesonly: true
|
|
18
|
+
---
|
|
19
|
+
features
|
|
20
|
+
architecture
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Key Topics
|
|
24
|
+
|
|
25
|
+
*This section will explain:*
|
|
26
|
+
- Plone architecture and component relationships
|
|
27
|
+
- Backend and Frontend integration
|
|
28
|
+
- Storage architecture for Plone data
|
|
29
|
+
- CDK8S construct patterns and best practices
|
|
30
|
+
- Configuration management strategies
|
|
31
|
+
|
|
32
|
+
*Future topics:*
|
|
33
|
+
- Security considerations
|
|
34
|
+
- Scaling and high availability considerations
|
|
35
|
+
- Performance optimization
|
|
36
|
+
|
|
37
|
+
## Design Decisions
|
|
38
|
+
|
|
39
|
+
*This section will document:*
|
|
40
|
+
- Why certain defaults were chosen
|
|
41
|
+
- Trade-offs in configuration approaches
|
|
42
|
+
- Integration strategies with external services
|
|
43
|
+
- Testing philosophy
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
**Ready to get started?** Jump into the [Tutorials](../tutorials/index.md) for hands-on lessons.
|
|
48
|
+
|
|
49
|
+
**Need to solve a problem?** See the [How-To Guides](../how-to/index.md) for task-oriented solutions.
|
|
50
|
+
|
|
51
|
+
**Looking for specifications?** Check the [Reference](../reference/index.md) section for API documentation.
|