kubetsx 0.1.0
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/LICENSE +22 -0
- package/README.md +371 -0
- package/dist/components/index.d.ts +46 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +155 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-runtime.d.ts +33 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +58 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/render.d.ts +12 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +746 -0
- package/dist/render.js.map +1 -0
- package/dist/types.d.ts +339 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/examples/basic.tsx +71 -0
- package/examples/full-stack.tsx +339 -0
- package/examples/tsconfig.json +21 -0
- package/package.json +57 -0
- package/src/components/index.ts +241 -0
- package/src/index.ts +123 -0
- package/src/jsx-runtime.ts +71 -0
- package/src/render.ts +862 -0
- package/src/types.ts +362 -0
- package/tsconfig.examples.json +18 -0
- package/tsconfig.json +22 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Malek Abdelkader
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
# 🎯 Kubetsx
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/kubetsx)
|
|
4
|
+
[](https://github.com/malekabdelkader/kubetsx/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
> **The Declarative Kubernetes Framework.** Write K8s configs with JSX. Yes, really.
|
|
7
|
+
|
|
8
|
+
Kubetsx transforms Kubernetes configuration from fragile YAML files into type-safe, composable TypeScript components. Get full IntelliSense, compile-time validation, and the power of loops and conditionals.
|
|
9
|
+
|
|
10
|
+
**If you can write React, you can configure Kubernetes.**
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import { render, Manifest, Deployment, Container, Port, Service } from 'kubetsx';
|
|
14
|
+
|
|
15
|
+
const App = () => (
|
|
16
|
+
<Manifest>
|
|
17
|
+
<Deployment name="api" replicas={3}>
|
|
18
|
+
<Container name="api" image="mycompany/api:v1">
|
|
19
|
+
<Port container={3000} />
|
|
20
|
+
</Container>
|
|
21
|
+
</Deployment>
|
|
22
|
+
<Service name="api" port={80} targetPort={3000} />
|
|
23
|
+
</Manifest>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
render(<App />);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Output:** Valid Kubernetes YAML, ready for `kubectl apply`.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🚀 Features
|
|
34
|
+
|
|
35
|
+
| Feature | YAML | Kubetsx |
|
|
36
|
+
|---------|------|-------|
|
|
37
|
+
| **IntelliSense** | ❌ None | ✅ Full autocomplete |
|
|
38
|
+
| **Type checking** | ❌ Runtime errors | ✅ Compile-time errors |
|
|
39
|
+
| **Loops** | ❌ Copy-paste | ✅ `.map()`, `for` |
|
|
40
|
+
| **Conditionals** | ❌ External tools | ✅ Native `if`/ternary |
|
|
41
|
+
| **Variables** | ❌ Limited | ✅ Full JavaScript |
|
|
42
|
+
| **Reusability** | ❌ Copy-paste | ✅ Components |
|
|
43
|
+
| **Refactoring** | ❌ Find & replace | ✅ IDE rename |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 📦 Installation
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install kubetsx
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Configure `tsconfig.json`:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"compilerOptions": {
|
|
58
|
+
"jsx": "react-jsx",
|
|
59
|
+
"jsxImportSource": "kubetsx"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 🎯 Quick Start
|
|
67
|
+
|
|
68
|
+
### Basic Deployment
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { render, Manifest, Deployment, Container, Port, Service } from 'kubetsx';
|
|
72
|
+
|
|
73
|
+
const MyApp = () => (
|
|
74
|
+
<Manifest>
|
|
75
|
+
<Deployment name="api" replicas={3}>
|
|
76
|
+
<Container name="api" image="mycompany/api:v1.0.0">
|
|
77
|
+
<Port container={3000} />
|
|
78
|
+
</Container>
|
|
79
|
+
</Deployment>
|
|
80
|
+
<Service name="api" port={80} targetPort={3000} />
|
|
81
|
+
</Manifest>
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
render(<MyApp />);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Using Loops (The Game Changer!)
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
const services = [
|
|
91
|
+
{ name: 'api', port: 3000, replicas: 5 },
|
|
92
|
+
{ name: 'auth', port: 4000, replicas: 3 },
|
|
93
|
+
{ name: 'worker', port: 5000, replicas: 2 },
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
const Microservices = () => (
|
|
97
|
+
<Manifest>
|
|
98
|
+
{services.map(svc => (
|
|
99
|
+
<Manifest key={svc.name}>
|
|
100
|
+
<Deployment name={svc.name} replicas={svc.replicas}>
|
|
101
|
+
<Container name={svc.name} image={`mycompany/${svc.name}:latest`}>
|
|
102
|
+
<Port container={svc.port} />
|
|
103
|
+
</Container>
|
|
104
|
+
</Deployment>
|
|
105
|
+
<Service name={svc.name} port={80} targetPort={svc.port} />
|
|
106
|
+
</Manifest>
|
|
107
|
+
))}
|
|
108
|
+
</Manifest>
|
|
109
|
+
);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**3 deployments + 3 services from 15 lines of code!**
|
|
113
|
+
|
|
114
|
+
### Environment-Specific Config
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
const isProduction = process.env.NODE_ENV === 'production';
|
|
118
|
+
|
|
119
|
+
const Api = () => (
|
|
120
|
+
<Deployment name="api" replicas={isProduction ? 5 : 1}>
|
|
121
|
+
<Container name="api" image={`api:${VERSION}`}>
|
|
122
|
+
<Resources
|
|
123
|
+
limitMemory={isProduction ? "2Gi" : "512Mi"}
|
|
124
|
+
limitCpu={isProduction ? "2" : "500m"}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
{isProduction && (
|
|
128
|
+
<Probe type="liveness" delay={30}>
|
|
129
|
+
<HttpProbe path="/health" port={3000} />
|
|
130
|
+
</Probe>
|
|
131
|
+
)}
|
|
132
|
+
</Container>
|
|
133
|
+
</Deployment>
|
|
134
|
+
);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 📚 Components Reference
|
|
140
|
+
|
|
141
|
+
### Grouping
|
|
142
|
+
|
|
143
|
+
| Component | Description |
|
|
144
|
+
|-----------|-------------|
|
|
145
|
+
| `<Manifest>` | Groups multiple resources together |
|
|
146
|
+
| `<Cluster>` | Cluster-level grouping |
|
|
147
|
+
| `<Namespace>` | Namespace with automatic scoping |
|
|
148
|
+
|
|
149
|
+
### Workloads
|
|
150
|
+
|
|
151
|
+
| Component | Description |
|
|
152
|
+
|-----------|-------------|
|
|
153
|
+
| `<Deployment>` | Deployment resource |
|
|
154
|
+
| `<Container>` | Container specification |
|
|
155
|
+
| `<Job>` | One-time job |
|
|
156
|
+
| `<CronJob>` | Scheduled job |
|
|
157
|
+
|
|
158
|
+
### Container Configuration
|
|
159
|
+
|
|
160
|
+
| Component | Description |
|
|
161
|
+
|-----------|-------------|
|
|
162
|
+
| `<Port>` | Container port |
|
|
163
|
+
| `<Env>` | Environment variable |
|
|
164
|
+
| `<SecretRef>` | Reference secret value (use `secretKey` prop) |
|
|
165
|
+
| `<ConfigMapRef>` | Reference configmap value (use `configKey` prop) |
|
|
166
|
+
| `<Resources>` | CPU/memory limits |
|
|
167
|
+
| `<VolumeMount>` | Mount a volume |
|
|
168
|
+
|
|
169
|
+
### Probes
|
|
170
|
+
|
|
171
|
+
| Component | Description |
|
|
172
|
+
|-----------|-------------|
|
|
173
|
+
| `<Probe>` | Liveness/readiness/startup probe |
|
|
174
|
+
| `<HttpProbe>` | HTTP GET probe |
|
|
175
|
+
| `<TcpProbe>` | TCP socket probe |
|
|
176
|
+
| `<ExecProbe>` | Command execution probe |
|
|
177
|
+
|
|
178
|
+
### Networking
|
|
179
|
+
|
|
180
|
+
| Component | Description |
|
|
181
|
+
|-----------|-------------|
|
|
182
|
+
| `<Service>` | Service resource |
|
|
183
|
+
| `<Ingress>` | Ingress resource |
|
|
184
|
+
| `<IngressHost>` | Ingress host rule |
|
|
185
|
+
| `<Route>` | Ingress path rule |
|
|
186
|
+
|
|
187
|
+
### Configuration
|
|
188
|
+
|
|
189
|
+
| Component | Description |
|
|
190
|
+
|-----------|-------------|
|
|
191
|
+
| `<ConfigMap>` | ConfigMap resource |
|
|
192
|
+
| `<Secret>` | Secret resource |
|
|
193
|
+
|
|
194
|
+
### Storage
|
|
195
|
+
|
|
196
|
+
| Component | Description |
|
|
197
|
+
|-----------|-------------|
|
|
198
|
+
| `<Volume>` | Volume definition |
|
|
199
|
+
| `<EmptyDir>` | EmptyDir volume source |
|
|
200
|
+
| `<PvcVolume>` | PVC volume source |
|
|
201
|
+
| `<ConfigMapVolume>` | ConfigMap volume source |
|
|
202
|
+
| `<SecretVolume>` | Secret volume source |
|
|
203
|
+
| `<Pvc>` | PersistentVolumeClaim |
|
|
204
|
+
|
|
205
|
+
### Autoscaling
|
|
206
|
+
|
|
207
|
+
| Component | Description |
|
|
208
|
+
|-----------|-------------|
|
|
209
|
+
| `<Hpa>` | HorizontalPodAutoscaler |
|
|
210
|
+
|
|
211
|
+
### RBAC
|
|
212
|
+
|
|
213
|
+
| Component | Description |
|
|
214
|
+
|-----------|-------------|
|
|
215
|
+
| `<ServiceAccount>` | ServiceAccount |
|
|
216
|
+
| `<Role>` | Role |
|
|
217
|
+
| `<ClusterRole>` | ClusterRole |
|
|
218
|
+
| `<RoleBinding>` | RoleBinding |
|
|
219
|
+
| `<ClusterRoleBinding>` | ClusterRoleBinding |
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 🔧 Full Example
|
|
224
|
+
|
|
225
|
+
```tsx
|
|
226
|
+
import {
|
|
227
|
+
render,
|
|
228
|
+
Manifest,
|
|
229
|
+
Namespace,
|
|
230
|
+
Deployment,
|
|
231
|
+
Container,
|
|
232
|
+
Port,
|
|
233
|
+
Env,
|
|
234
|
+
SecretRef,
|
|
235
|
+
Resources,
|
|
236
|
+
Probe,
|
|
237
|
+
HttpProbe,
|
|
238
|
+
Service,
|
|
239
|
+
Ingress,
|
|
240
|
+
Route,
|
|
241
|
+
ConfigMap,
|
|
242
|
+
Secret,
|
|
243
|
+
Hpa,
|
|
244
|
+
} from 'kubetsx';
|
|
245
|
+
|
|
246
|
+
const VERSION = 'v2.0.0';
|
|
247
|
+
|
|
248
|
+
const secrets = [
|
|
249
|
+
{ env: 'DATABASE_URL', secretKey: 'database-url' },
|
|
250
|
+
{ env: 'REDIS_URL', secretKey: 'redis-url' },
|
|
251
|
+
{ env: 'JWT_SECRET', secretKey: 'jwt-secret' },
|
|
252
|
+
];
|
|
253
|
+
|
|
254
|
+
const ProductionStack = () => (
|
|
255
|
+
<Namespace name="production">
|
|
256
|
+
<ConfigMap
|
|
257
|
+
name="app-config"
|
|
258
|
+
data={{
|
|
259
|
+
LOG_LEVEL: 'info',
|
|
260
|
+
FEATURE_FLAGS: JSON.stringify({ newUI: true }),
|
|
261
|
+
}}
|
|
262
|
+
/>
|
|
263
|
+
|
|
264
|
+
<Secret
|
|
265
|
+
name="app-secrets"
|
|
266
|
+
stringData={{
|
|
267
|
+
'database-url': process.env.DATABASE_URL!,
|
|
268
|
+
'redis-url': process.env.REDIS_URL!,
|
|
269
|
+
'jwt-secret': process.env.JWT_SECRET!,
|
|
270
|
+
}}
|
|
271
|
+
/>
|
|
272
|
+
|
|
273
|
+
<Deployment name="api" replicas={5}>
|
|
274
|
+
<Container name="api" image={`mycompany/api:${VERSION}`}>
|
|
275
|
+
<Port container={3000} />
|
|
276
|
+
|
|
277
|
+
{secrets.map(({ env, secretKey }) => (
|
|
278
|
+
<Env key={env} name={env}>
|
|
279
|
+
<SecretRef name="app-secrets" secretKey={secretKey} />
|
|
280
|
+
</Env>
|
|
281
|
+
))}
|
|
282
|
+
|
|
283
|
+
<Resources
|
|
284
|
+
requestMemory="256Mi"
|
|
285
|
+
requestCpu="250m"
|
|
286
|
+
limitMemory="512Mi"
|
|
287
|
+
limitCpu="500m"
|
|
288
|
+
/>
|
|
289
|
+
|
|
290
|
+
<Probe type="liveness" delay={30}>
|
|
291
|
+
<HttpProbe path="/health" port={3000} />
|
|
292
|
+
</Probe>
|
|
293
|
+
<Probe type="readiness" delay={5}>
|
|
294
|
+
<HttpProbe path="/ready" port={3000} />
|
|
295
|
+
</Probe>
|
|
296
|
+
</Container>
|
|
297
|
+
</Deployment>
|
|
298
|
+
|
|
299
|
+
<Service name="api" port={80} targetPort={3000} />
|
|
300
|
+
|
|
301
|
+
<Hpa
|
|
302
|
+
name="api-hpa"
|
|
303
|
+
target="api"
|
|
304
|
+
minReplicas={3}
|
|
305
|
+
maxReplicas={10}
|
|
306
|
+
targetCpuUtilization={70}
|
|
307
|
+
/>
|
|
308
|
+
|
|
309
|
+
<Ingress name="api-ingress" host="api.mycompany.com" ssl>
|
|
310
|
+
<Route path="/" service="api" port={80} />
|
|
311
|
+
</Ingress>
|
|
312
|
+
</Namespace>
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
render(<ProductionStack />, { output: './k8s/production.yaml' });
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## 📤 Render Options
|
|
321
|
+
|
|
322
|
+
```tsx
|
|
323
|
+
render(<App />, {
|
|
324
|
+
output: './manifests/app.yaml', // Write to file
|
|
325
|
+
splitFiles: true, // Separate file per resource
|
|
326
|
+
dryRun: true, // Return YAML without writing
|
|
327
|
+
});
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## 🆚 Comparison with Alternatives
|
|
333
|
+
|
|
334
|
+
| Tool | Approach | Type Safety | Loops | IDE Support |
|
|
335
|
+
|------|----------|-------------|-------|-------------|
|
|
336
|
+
| **YAML** | Raw files | ❌ | ❌ | ❌ |
|
|
337
|
+
| **Helm** | Templates | ❌ | 🟡 | ❌ |
|
|
338
|
+
| **Kustomize** | Overlays | ❌ | ❌ | ❌ |
|
|
339
|
+
| **Pulumi** | Functions | ✅ | ✅ | ✅ |
|
|
340
|
+
| **cdk8s** | Constructs | ✅ | ✅ | ✅ |
|
|
341
|
+
| **Kubetsx** | **JSX** | ✅ | ✅ | ✅ |
|
|
342
|
+
|
|
343
|
+
**Kubetsx advantage:** Visual hierarchy that mirrors your infrastructure structure.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## 🤝 Contributing
|
|
348
|
+
|
|
349
|
+
Contributions welcome! Ideas:
|
|
350
|
+
|
|
351
|
+
- [ ] StatefulSet component
|
|
352
|
+
- [ ] DaemonSet component
|
|
353
|
+
- [ ] NetworkPolicy component
|
|
354
|
+
- [ ] PodDisruptionBudget component
|
|
355
|
+
- [ ] Helm chart output
|
|
356
|
+
- [ ] `kubectl apply` integration
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 📜 License
|
|
361
|
+
|
|
362
|
+
MIT
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## 🎭 Credits
|
|
367
|
+
|
|
368
|
+
Inspired by [Tagliatelle.js](https://github.com/malekabdelkader/Tagliatelle.js) — the declarative backend framework .
|
|
369
|
+
|
|
370
|
+
**Made with ❤️ and plenty of carbs.** 🍝
|
|
371
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🎯 Kubetsx - Component Definitions
|
|
3
|
+
*
|
|
4
|
+
* All Kubernetes resource components as JSX elements
|
|
5
|
+
*/
|
|
6
|
+
import type { KubexElement, KubexNode, ManifestProps, ClusterProps, NamespaceProps, DeploymentProps, ContainerProps, PortProps, EnvProps, SecretRefProps, ConfigMapRefProps, ResourcesProps, ProbeProps, HttpProbeProps, TcpProbeProps, ExecProbeProps, ServiceProps, IngressProps, IngressHostProps, RouteProps, ConfigMapProps, SecretProps, VolumeProps, VolumeMountProps, EmptyDirProps, PvcVolumeProps, ConfigMapVolumeProps, SecretVolumeProps, PvcProps, HpaProps, JobProps, CronJobProps, ServiceAccountProps, RoleProps, ClusterRoleProps, RoleBindingProps, ClusterRoleBindingProps } from '../types.js';
|
|
7
|
+
export declare function Manifest(props: ManifestProps): KubexElement;
|
|
8
|
+
export declare function Cluster(props: ClusterProps): KubexElement;
|
|
9
|
+
export declare function Namespace(props: NamespaceProps): KubexElement;
|
|
10
|
+
export declare function Deployment(props: DeploymentProps): KubexElement;
|
|
11
|
+
export declare function Container(props: ContainerProps & {
|
|
12
|
+
children?: KubexNode;
|
|
13
|
+
}): KubexElement;
|
|
14
|
+
export declare function Job(props: JobProps): KubexElement;
|
|
15
|
+
export declare function CronJob(props: CronJobProps): KubexElement;
|
|
16
|
+
export declare function Port(props: PortProps): KubexElement;
|
|
17
|
+
export declare function Env(props: EnvProps): KubexElement;
|
|
18
|
+
export declare function SecretRef(props: SecretRefProps): KubexElement;
|
|
19
|
+
export declare function ConfigMapRef(props: ConfigMapRefProps): KubexElement;
|
|
20
|
+
export declare function Resources(props: ResourcesProps): KubexElement;
|
|
21
|
+
export declare function Probe(props: ProbeProps): KubexElement;
|
|
22
|
+
export declare function HttpProbe(props: HttpProbeProps): KubexElement;
|
|
23
|
+
export declare function TcpProbe(props: TcpProbeProps): KubexElement;
|
|
24
|
+
export declare function ExecProbe(props: ExecProbeProps): KubexElement;
|
|
25
|
+
export declare function Service(props: ServiceProps): KubexElement;
|
|
26
|
+
export declare function Ingress(props: IngressProps & {
|
|
27
|
+
host?: string;
|
|
28
|
+
}): KubexElement;
|
|
29
|
+
export declare function IngressHost(props: IngressHostProps): KubexElement;
|
|
30
|
+
export declare function Route(props: RouteProps): KubexElement;
|
|
31
|
+
export declare function ConfigMap(props: ConfigMapProps): KubexElement;
|
|
32
|
+
export declare function Secret(props: SecretProps): KubexElement;
|
|
33
|
+
export declare function Volume(props: VolumeProps): KubexElement;
|
|
34
|
+
export declare function VolumeMount(props: VolumeMountProps): KubexElement;
|
|
35
|
+
export declare function EmptyDir(props?: EmptyDirProps): KubexElement;
|
|
36
|
+
export declare function PvcVolume(props: PvcVolumeProps): KubexElement;
|
|
37
|
+
export declare function ConfigMapVolume(props: ConfigMapVolumeProps): KubexElement;
|
|
38
|
+
export declare function SecretVolume(props: SecretVolumeProps): KubexElement;
|
|
39
|
+
export declare function Pvc(props: PvcProps): KubexElement;
|
|
40
|
+
export declare function Hpa(props: HpaProps): KubexElement;
|
|
41
|
+
export declare function ServiceAccount(props: ServiceAccountProps): KubexElement;
|
|
42
|
+
export declare function Role(props: RoleProps): KubexElement;
|
|
43
|
+
export declare function ClusterRole(props: ClusterRoleProps): KubexElement;
|
|
44
|
+
export declare function RoleBinding(props: RoleBindingProps): KubexElement;
|
|
45
|
+
export declare function ClusterRoleBinding(props: ClusterRoleBindingProps): KubexElement;
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,aAAa,EACb,YAAY,EACZ,cAAc,EACd,eAAe,EACf,cAAc,EACd,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,aAAa,CAAC;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|
5
|
+
*/
|
|
6
|
+
import { h } from '../jsx-runtime.js';
|
|
7
|
+
// Helper to get children array
|
|
8
|
+
function getChildren(children) {
|
|
9
|
+
if (!children)
|
|
10
|
+
return [];
|
|
11
|
+
return Array.isArray(children) ? children : [children];
|
|
12
|
+
}
|
|
13
|
+
// Cast helper
|
|
14
|
+
function toProps(props) {
|
|
15
|
+
return props;
|
|
16
|
+
}
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// Manifest (Fragment alternative - groups multiple resources)
|
|
19
|
+
// ============================================================================
|
|
20
|
+
export function Manifest(props) {
|
|
21
|
+
return h('Manifest', toProps(props), ...getChildren(props.children));
|
|
22
|
+
}
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Cluster & Namespace
|
|
25
|
+
// ============================================================================
|
|
26
|
+
export function Cluster(props) {
|
|
27
|
+
return h('Cluster', toProps(props), ...getChildren(props.children));
|
|
28
|
+
}
|
|
29
|
+
export function Namespace(props) {
|
|
30
|
+
return h('Namespace', toProps(props), ...getChildren(props.children));
|
|
31
|
+
}
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// Workloads
|
|
34
|
+
// ============================================================================
|
|
35
|
+
export function Deployment(props) {
|
|
36
|
+
return h('Deployment', toProps(props), ...getChildren(props.children));
|
|
37
|
+
}
|
|
38
|
+
export function Container(props) {
|
|
39
|
+
return h('Container', toProps(props), ...getChildren(props.children));
|
|
40
|
+
}
|
|
41
|
+
export function Job(props) {
|
|
42
|
+
return h('Job', toProps(props), ...getChildren(props.children));
|
|
43
|
+
}
|
|
44
|
+
export function CronJob(props) {
|
|
45
|
+
return h('CronJob', toProps(props), ...getChildren(props.children));
|
|
46
|
+
}
|
|
47
|
+
// ============================================================================
|
|
48
|
+
// Container Configuration
|
|
49
|
+
// ============================================================================
|
|
50
|
+
export function Port(props) {
|
|
51
|
+
return h('Port', toProps(props));
|
|
52
|
+
}
|
|
53
|
+
export function Env(props) {
|
|
54
|
+
return h('Env', toProps(props), ...getChildren(props.children));
|
|
55
|
+
}
|
|
56
|
+
export function SecretRef(props) {
|
|
57
|
+
return h('SecretRef', toProps(props));
|
|
58
|
+
}
|
|
59
|
+
export function ConfigMapRef(props) {
|
|
60
|
+
return h('ConfigMapRef', toProps(props));
|
|
61
|
+
}
|
|
62
|
+
export function Resources(props) {
|
|
63
|
+
return h('Resources', toProps(props));
|
|
64
|
+
}
|
|
65
|
+
// ============================================================================
|
|
66
|
+
// Probes
|
|
67
|
+
// ============================================================================
|
|
68
|
+
export function Probe(props) {
|
|
69
|
+
return h('Probe', toProps(props), ...getChildren(props.children));
|
|
70
|
+
}
|
|
71
|
+
export function HttpProbe(props) {
|
|
72
|
+
return h('HttpProbe', toProps(props));
|
|
73
|
+
}
|
|
74
|
+
export function TcpProbe(props) {
|
|
75
|
+
return h('TcpProbe', toProps(props));
|
|
76
|
+
}
|
|
77
|
+
export function ExecProbe(props) {
|
|
78
|
+
return h('ExecProbe', toProps(props));
|
|
79
|
+
}
|
|
80
|
+
// ============================================================================
|
|
81
|
+
// Networking
|
|
82
|
+
// ============================================================================
|
|
83
|
+
export function Service(props) {
|
|
84
|
+
return h('Service', toProps(props));
|
|
85
|
+
}
|
|
86
|
+
export function Ingress(props) {
|
|
87
|
+
return h('Ingress', toProps(props), ...getChildren(props.children));
|
|
88
|
+
}
|
|
89
|
+
export function IngressHost(props) {
|
|
90
|
+
return h('IngressHost', toProps(props), ...getChildren(props.children));
|
|
91
|
+
}
|
|
92
|
+
export function Route(props) {
|
|
93
|
+
return h('Route', toProps(props));
|
|
94
|
+
}
|
|
95
|
+
// ============================================================================
|
|
96
|
+
// Configuration
|
|
97
|
+
// ============================================================================
|
|
98
|
+
export function ConfigMap(props) {
|
|
99
|
+
return h('ConfigMap', toProps(props));
|
|
100
|
+
}
|
|
101
|
+
export function Secret(props) {
|
|
102
|
+
return h('Secret', toProps(props));
|
|
103
|
+
}
|
|
104
|
+
// ============================================================================
|
|
105
|
+
// Volumes
|
|
106
|
+
// ============================================================================
|
|
107
|
+
export function Volume(props) {
|
|
108
|
+
return h('Volume', toProps(props), ...getChildren(props.children));
|
|
109
|
+
}
|
|
110
|
+
export function VolumeMount(props) {
|
|
111
|
+
return h('VolumeMount', toProps(props));
|
|
112
|
+
}
|
|
113
|
+
export function EmptyDir(props = {}) {
|
|
114
|
+
return h('EmptyDir', toProps(props));
|
|
115
|
+
}
|
|
116
|
+
export function PvcVolume(props) {
|
|
117
|
+
return h('PvcVolume', toProps(props));
|
|
118
|
+
}
|
|
119
|
+
export function ConfigMapVolume(props) {
|
|
120
|
+
return h('ConfigMapVolume', toProps(props));
|
|
121
|
+
}
|
|
122
|
+
export function SecretVolume(props) {
|
|
123
|
+
return h('SecretVolume', toProps(props));
|
|
124
|
+
}
|
|
125
|
+
// ============================================================================
|
|
126
|
+
// Storage
|
|
127
|
+
// ============================================================================
|
|
128
|
+
export function Pvc(props) {
|
|
129
|
+
return h('Pvc', toProps(props));
|
|
130
|
+
}
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// Autoscaling
|
|
133
|
+
// ============================================================================
|
|
134
|
+
export function Hpa(props) {
|
|
135
|
+
return h('Hpa', toProps(props));
|
|
136
|
+
}
|
|
137
|
+
// ============================================================================
|
|
138
|
+
// RBAC & Service Accounts
|
|
139
|
+
// ============================================================================
|
|
140
|
+
export function ServiceAccount(props) {
|
|
141
|
+
return h('ServiceAccount', toProps(props));
|
|
142
|
+
}
|
|
143
|
+
export function Role(props) {
|
|
144
|
+
return h('Role', toProps(props));
|
|
145
|
+
}
|
|
146
|
+
export function ClusterRole(props) {
|
|
147
|
+
return h('ClusterRole', toProps(props));
|
|
148
|
+
}
|
|
149
|
+
export function RoleBinding(props) {
|
|
150
|
+
return h('RoleBinding', toProps(props));
|
|
151
|
+
}
|
|
152
|
+
export function ClusterRoleBinding(props) {
|
|
153
|
+
return h('ClusterRoleBinding', toProps(props));
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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AC,CAAC;AAClC,CAAC;AAED,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,OAAO,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,OAAO,CAAC,CAAC,gBAAgB,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,OAAO,CAAC,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,OAAO,CAAC,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAA8B;IAC/D,OAAO,CAAC,CAAC,oBAAoB,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🎯 Kubetsx - The Declarative Kubernetes Framework
|
|
3
|
+
*
|
|
4
|
+
* Write K8s configs with JSX. Yes, really.
|
|
5
|
+
*/
|
|
6
|
+
export { h, Fragment, jsx, jsxs, jsxDEV } from './jsx-runtime.js';
|
|
7
|
+
export { render } from './render.js';
|
|
8
|
+
export { Manifest, Cluster, Namespace, Deployment, Container, Job, CronJob, Port, Env, SecretRef, ConfigMapRef, Resources, Probe, HttpProbe, TcpProbe, ExecProbe, Service, Ingress, IngressHost, Route, ConfigMap, Secret, Volume, VolumeMount, EmptyDir, PvcVolume, ConfigMapVolume, SecretVolume, Pvc, Hpa, ServiceAccount, Role, ClusterRole, RoleBinding, ClusterRoleBinding, } from './components/index.js';
|
|
9
|
+
export type { KubexElement, KubexNode, KubexComponent, RenderOptions, K8sMetadata, K8sResource, ManifestProps, ClusterProps, NamespaceProps, DeploymentProps, ContainerProps, PortProps, EnvProps, SecretRefProps, ConfigMapRefProps, ResourcesProps, ProbeProps, HttpProbeProps, TcpProbeProps, ExecProbeProps, ServiceProps, IngressProps, IngressHostProps, RouteProps, ConfigMapProps, SecretProps, VolumeProps, VolumeMountProps, EmptyDirProps, PvcVolumeProps, ConfigMapVolumeProps, SecretVolumeProps, PvcProps, HpaProps, JobProps, CronJobProps, ServiceAccountProps, RoleProps, ClusterRoleProps, RoleBindingProps, ClusterRoleBindingProps, RoleRule, } from './types.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAEL,QAAQ,EAGR,OAAO,EACP,SAAS,EAGT,UAAU,EACV,SAAS,EACT,GAAG,EACH,OAAO,EAGP,IAAI,EACJ,GAAG,EACH,SAAS,EACT,YAAY,EACZ,SAAS,EAGT,KAAK,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EAGT,OAAO,EACP,OAAO,EACP,WAAW,EACX,KAAK,EAGL,SAAS,EACT,MAAM,EAGN,MAAM,EACN,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAe,EACf,YAAY,EAGZ,GAAG,EAGH,GAAG,EAGH,cAAc,EACd,IAAI,EACJ,WAAW,EACX,WAAW,EACX,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EAEV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,aAAa,EAGb,WAAW,EACX,WAAW,EAGX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,eAAe,EACf,cAAc,EACd,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,QAAQ,GACT,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🎯 Kubetsx - The Declarative Kubernetes Framework
|
|
3
|
+
*
|
|
4
|
+
* Write K8s configs with JSX. Yes, really.
|
|
5
|
+
*/
|
|
6
|
+
// JSX Runtime
|
|
7
|
+
export { h, Fragment, jsx, jsxs, jsxDEV } from './jsx-runtime.js';
|
|
8
|
+
// Render Engine
|
|
9
|
+
export { render } from './render.js';
|
|
10
|
+
// Components
|
|
11
|
+
export {
|
|
12
|
+
// Manifest (groups multiple resources)
|
|
13
|
+
Manifest,
|
|
14
|
+
// Cluster & Namespace
|
|
15
|
+
Cluster, Namespace,
|
|
16
|
+
// Workloads
|
|
17
|
+
Deployment, Container, Job, CronJob,
|
|
18
|
+
// Container Configuration
|
|
19
|
+
Port, Env, SecretRef, ConfigMapRef, Resources,
|
|
20
|
+
// Probes
|
|
21
|
+
Probe, HttpProbe, TcpProbe, ExecProbe,
|
|
22
|
+
// Networking
|
|
23
|
+
Service, Ingress, IngressHost, Route,
|
|
24
|
+
// Configuration
|
|
25
|
+
ConfigMap, Secret,
|
|
26
|
+
// Volumes
|
|
27
|
+
Volume, VolumeMount, EmptyDir, PvcVolume, ConfigMapVolume, SecretVolume,
|
|
28
|
+
// Storage
|
|
29
|
+
Pvc,
|
|
30
|
+
// Autoscaling
|
|
31
|
+
Hpa,
|
|
32
|
+
// RBAC
|
|
33
|
+
ServiceAccount, Role, ClusterRole, RoleBinding, ClusterRoleBinding, } from './components/index.js';
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc;AACd,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAElE,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,aAAa;AACb,OAAO;AACL,uCAAuC;AACvC,QAAQ;AAER,sBAAsB;AACtB,OAAO,EACP,SAAS;AAET,YAAY;AACZ,UAAU,EACV,SAAS,EACT,GAAG,EACH,OAAO;AAEP,0BAA0B;AAC1B,IAAI,EACJ,GAAG,EACH,SAAS,EACT,YAAY,EACZ,SAAS;AAET,SAAS;AACT,KAAK,EACL,SAAS,EACT,QAAQ,EACR,SAAS;AAET,aAAa;AACb,OAAO,EACP,OAAO,EACP,WAAW,EACX,KAAK;AAEL,gBAAgB;AAChB,SAAS,EACT,MAAM;AAEN,UAAU;AACV,MAAM,EACN,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAe,EACf,YAAY;AAEZ,UAAU;AACV,GAAG;AAEH,cAAc;AACd,GAAG;AAEH,OAAO;AACP,cAAc,EACd,IAAI,EACJ,WAAW,EACX,WAAW,EACX,kBAAkB,GACnB,MAAM,uBAAuB,CAAC"}
|