@intentius/chant-lexicon-k8s 0.6.0 → 0.8.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/dist/actions/apps.d.ts +44 -0
- package/dist/actions/apps.d.ts.map +1 -0
- package/dist/actions/batch.d.ts +22 -0
- package/dist/actions/batch.d.ts.map +1 -0
- package/dist/actions/core.d.ts +131 -0
- package/dist/actions/core.d.ts.map +1 -0
- package/dist/actions/index.d.ts +9 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/networking.d.ts +27 -0
- package/dist/actions/networking.d.ts.map +1 -0
- package/dist/actions/rbac.d.ts +40 -0
- package/dist/actions/rbac.d.ts.map +1 -0
- package/dist/codegen/docs-cli.d.ts +2 -0
- package/dist/codegen/docs-cli.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +12 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +6 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate-lexicon.d.ts +21 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +11 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +19 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +15 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +11 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/patches.d.ts +31 -0
- package/dist/codegen/patches.d.ts.map +1 -0
- package/dist/codegen/typecheck.d.ts +5 -0
- package/dist/codegen/typecheck.d.ts.map +1 -0
- package/dist/codegen/versions.d.ts +20 -0
- package/dist/codegen/versions.d.ts.map +1 -0
- package/dist/composites/adot-collector.d.ts +66 -0
- package/dist/composites/adot-collector.d.ts.map +1 -0
- package/dist/composites/agic-ingress.d.ts +73 -0
- package/dist/composites/agic-ingress.d.ts.map +1 -0
- package/dist/composites/aks-external-dns-agent.d.ts +65 -0
- package/dist/composites/aks-external-dns-agent.d.ts.map +1 -0
- package/dist/composites/alb-ingress.d.ts +77 -0
- package/dist/composites/alb-ingress.d.ts.map +1 -0
- package/dist/composites/argo-app.d.ts +168 -0
- package/dist/composites/argo-app.d.ts.map +1 -0
- package/dist/composites/autoscaled-service.d.ts +106 -0
- package/dist/composites/autoscaled-service.d.ts.map +1 -0
- package/dist/composites/azure-disk-storage-class.d.ts +48 -0
- package/dist/composites/azure-disk-storage-class.d.ts.map +1 -0
- package/dist/composites/azure-file-storage-class.d.ts +46 -0
- package/dist/composites/azure-file-storage-class.d.ts.map +1 -0
- package/dist/composites/azure-monitor-collector.d.ts +63 -0
- package/dist/composites/azure-monitor-collector.d.ts.map +1 -0
- package/dist/composites/batch-job.d.ts +85 -0
- package/dist/composites/batch-job.d.ts.map +1 -0
- package/dist/composites/cockroachdb-cluster.d.ts +132 -0
- package/dist/composites/cockroachdb-cluster.d.ts.map +1 -0
- package/dist/composites/cockroachdb-region-stack.d.ts +164 -0
- package/dist/composites/cockroachdb-region-stack.d.ts.map +1 -0
- package/dist/composites/config-connector-context.d.ts +41 -0
- package/dist/composites/config-connector-context.d.ts.map +1 -0
- package/dist/composites/configured-app.d.ts +91 -0
- package/dist/composites/configured-app.d.ts.map +1 -0
- package/dist/composites/cron-workload.d.ts +76 -0
- package/dist/composites/cron-workload.d.ts.map +1 -0
- package/dist/composites/ebs-storage-class.d.ts +55 -0
- package/dist/composites/ebs-storage-class.d.ts.map +1 -0
- package/dist/composites/efs-storage-class.d.ts +47 -0
- package/dist/composites/efs-storage-class.d.ts.map +1 -0
- package/dist/composites/external-dns-agent.d.ts +58 -0
- package/dist/composites/external-dns-agent.d.ts.map +1 -0
- package/dist/composites/filestore-storage-class.d.ts +46 -0
- package/dist/composites/filestore-storage-class.d.ts.map +1 -0
- package/dist/composites/fluent-bit-agent.d.ts +66 -0
- package/dist/composites/fluent-bit-agent.d.ts.map +1 -0
- package/dist/composites/gce-ingress.d.ts +72 -0
- package/dist/composites/gce-ingress.d.ts.map +1 -0
- package/dist/composites/gce-pd-storage-class.d.ts +48 -0
- package/dist/composites/gce-pd-storage-class.d.ts.map +1 -0
- package/dist/composites/gke-external-dns-agent.d.ts +59 -0
- package/dist/composites/gke-external-dns-agent.d.ts.map +1 -0
- package/dist/composites/gke-fluent-bit-agent.d.ts +64 -0
- package/dist/composites/gke-fluent-bit-agent.d.ts.map +1 -0
- package/dist/composites/gke-gateway.d.ts +63 -0
- package/dist/composites/gke-gateway.d.ts.map +1 -0
- package/dist/composites/gke-otel-collector.d.ts +64 -0
- package/dist/composites/gke-otel-collector.d.ts.map +1 -0
- package/dist/composites/index.d.ts +86 -0
- package/dist/composites/index.d.ts.map +1 -0
- package/dist/composites/irsa-service-account.d.ts +54 -0
- package/dist/composites/irsa-service-account.d.ts.map +1 -0
- package/dist/composites/metrics-server.d.ts +56 -0
- package/dist/composites/metrics-server.d.ts.map +1 -0
- package/dist/composites/monitored-service.d.ts +92 -0
- package/dist/composites/monitored-service.d.ts.map +1 -0
- package/dist/composites/namespace-env.d.ts +64 -0
- package/dist/composites/namespace-env.d.ts.map +1 -0
- package/dist/composites/network-isolated-app.d.ts +88 -0
- package/dist/composites/network-isolated-app.d.ts.map +1 -0
- package/dist/composites/node-agent.d.ts +87 -0
- package/dist/composites/node-agent.d.ts.map +1 -0
- package/dist/composites/ray-cluster.d.ts +179 -0
- package/dist/composites/ray-cluster.d.ts.map +1 -0
- package/dist/composites/ray-job.d.ts +88 -0
- package/dist/composites/ray-job.d.ts.map +1 -0
- package/dist/composites/ray-service.d.ts +87 -0
- package/dist/composites/ray-service.d.ts.map +1 -0
- package/dist/composites/secure-ingress.d.ts +66 -0
- package/dist/composites/secure-ingress.d.ts.map +1 -0
- package/dist/composites/security-context.d.ts +17 -0
- package/dist/composites/security-context.d.ts.map +1 -0
- package/dist/composites/sidecar-app.d.ts +121 -0
- package/dist/composites/sidecar-app.d.ts.map +1 -0
- package/dist/composites/stateful-app.d.ts +82 -0
- package/dist/composites/stateful-app.d.ts.map +1 -0
- package/dist/composites/web-app.d.ts +95 -0
- package/dist/composites/web-app.d.ts.map +1 -0
- package/dist/composites/worker-pool.d.ts +96 -0
- package/dist/composites/worker-pool.d.ts.map +1 -0
- package/dist/composites/workload-identity-sa.d.ts +54 -0
- package/dist/composites/workload-identity-sa.d.ts.map +1 -0
- package/dist/composites/workload-identity-service-account.d.ts +54 -0
- package/dist/composites/workload-identity-service-account.d.ts.map +1 -0
- package/dist/coverage.d.ts +14 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/crd/crd-sources.d.ts +10 -0
- package/dist/crd/crd-sources.d.ts.map +1 -0
- package/dist/crd/loader.d.ts +17 -0
- package/dist/crd/loader.d.ts.map +1 -0
- package/dist/crd/parser.d.ts +21 -0
- package/dist/crd/parser.d.ts.map +1 -0
- package/dist/crd/types.d.ts +55 -0
- package/dist/crd/types.d.ts.map +1 -0
- package/dist/default-labels.d.ts +84 -0
- package/dist/default-labels.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +30 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/detect.d.ts +4 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/export-resources.d.ts +8 -0
- package/dist/export-resources.d.ts.map +1 -0
- package/dist/generated/index.d.ts +295 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/runtime.d.ts +5 -0
- package/dist/generated/runtime.d.ts.map +1 -0
- package/dist/import/generator.d.ts +25 -0
- package/dist/import/generator.d.ts.map +1 -0
- package/dist/import/live-export.d.ts +18 -0
- package/dist/import/live-export.d.ts.map +1 -0
- package/dist/import/parser.d.ts +19 -0
- package/dist/import/parser.d.ts.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +2 -2
- package/dist/lint/post-synth/argo-helpers.d.ts +24 -0
- package/dist/lint/post-synth/argo-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/argo002.d.ts +12 -0
- package/dist/lint/post-synth/argo002.d.ts.map +1 -0
- package/dist/lint/post-synth/argo003.d.ts +14 -0
- package/dist/lint/post-synth/argo003.d.ts.map +1 -0
- package/dist/lint/post-synth/argo005.d.ts +3 -0
- package/dist/lint/post-synth/argo005.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/post-synth/k8s-helpers.d.ts +97 -0
- package/dist/lint/post-synth/k8s-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8005.d.ts +10 -0
- package/dist/lint/post-synth/wk8005.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8006.d.ts +9 -0
- package/dist/lint/post-synth/wk8006.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8041.d.ts +10 -0
- package/dist/lint/post-synth/wk8041.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8042.d.ts +10 -0
- package/dist/lint/post-synth/wk8042.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8101.d.ts +10 -0
- package/dist/lint/post-synth/wk8101.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8102.d.ts +9 -0
- package/dist/lint/post-synth/wk8102.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8103.d.ts +9 -0
- package/dist/lint/post-synth/wk8103.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8104.d.ts +10 -0
- package/dist/lint/post-synth/wk8104.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8105.d.ts +10 -0
- package/dist/lint/post-synth/wk8105.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8201.d.ts +10 -0
- package/dist/lint/post-synth/wk8201.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8202.d.ts +10 -0
- package/dist/lint/post-synth/wk8202.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8203.d.ts +10 -0
- package/dist/lint/post-synth/wk8203.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8204.d.ts +14 -0
- package/dist/lint/post-synth/wk8204.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8205.d.ts +10 -0
- package/dist/lint/post-synth/wk8205.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8207.d.ts +10 -0
- package/dist/lint/post-synth/wk8207.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8208.d.ts +10 -0
- package/dist/lint/post-synth/wk8208.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8209.d.ts +10 -0
- package/dist/lint/post-synth/wk8209.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8301.d.ts +15 -0
- package/dist/lint/post-synth/wk8301.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8302.d.ts +9 -0
- package/dist/lint/post-synth/wk8302.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8303.d.ts +10 -0
- package/dist/lint/post-synth/wk8303.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8304.d.ts +10 -0
- package/dist/lint/post-synth/wk8304.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8305.d.ts +9 -0
- package/dist/lint/post-synth/wk8305.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8306.d.ts +11 -0
- package/dist/lint/post-synth/wk8306.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8401.d.ts +11 -0
- package/dist/lint/post-synth/wk8401.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8402.d.ts +10 -0
- package/dist/lint/post-synth/wk8402.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8403.d.ts +10 -0
- package/dist/lint/post-synth/wk8403.d.ts.map +1 -0
- package/dist/lint/rules/argo-appset-single-project.d.ts +18 -0
- package/dist/lint/rules/argo-appset-single-project.d.ts.map +1 -0
- package/dist/lint/rules/argo-ast.d.ts +37 -0
- package/dist/lint/rules/argo-ast.d.ts.map +1 -0
- package/dist/lint/rules/argo-automated-prune.d.ts +20 -0
- package/dist/lint/rules/argo-automated-prune.d.ts.map +1 -0
- package/dist/lint/rules/hardcoded-namespace.d.ts +13 -0
- package/dist/lint/rules/hardcoded-namespace.d.ts.map +1 -0
- package/dist/lint/rules/latest-image-tag.d.ts +3 -0
- package/dist/lint/rules/latest-image-tag.d.ts.map +1 -0
- package/dist/lint/rules/missing-resource-limits.d.ts +3 -0
- package/dist/lint/rules/missing-resource-limits.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +6 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +6 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/micro-time.d.ts +43 -0
- package/dist/micro-time.d.ts.map +1 -0
- package/dist/package-cli.d.ts +6 -0
- package/dist/package-cli.d.ts.map +1 -0
- package/dist/plugin.d.ts +9 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/serializer.d.ts +12 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/spec/fetch.d.ts +34 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/spec/parse.d.ts +73 -0
- package/dist/spec/parse.d.ts.map +1 -0
- package/dist/validate-cli.d.ts +6 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +15 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/variables.d.ts +35 -0
- package/dist/variables.d.ts.map +1 -0
- package/package.json +24 -5
- package/src/composites/argo-app.ts +3 -3
- package/src/detect.ts +9 -0
- package/src/lint/post-synth/index.ts +63 -0
- package/src/plugin.ts +4 -12
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SidecarApp composite — multi-container Deployment + Service.
|
|
3
|
+
*
|
|
4
|
+
* Sidecar and init container patterns (envoy proxy, log forwarder,
|
|
5
|
+
* DB migration init). Supports shared volumes between containers.
|
|
6
|
+
*/
|
|
7
|
+
import { Deployment, Service } from "../generated/index.js";
|
|
8
|
+
import type { ContainerSecurityContext } from "./security-context.js";
|
|
9
|
+
export interface SidecarContainer {
|
|
10
|
+
/** Sidecar container name. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Container image. */
|
|
13
|
+
image: string;
|
|
14
|
+
/** Container ports. */
|
|
15
|
+
ports?: Array<{
|
|
16
|
+
containerPort: number;
|
|
17
|
+
name?: string;
|
|
18
|
+
}>;
|
|
19
|
+
/** Resource limits and requests. */
|
|
20
|
+
resources?: {
|
|
21
|
+
limits?: {
|
|
22
|
+
cpu?: string;
|
|
23
|
+
memory?: string;
|
|
24
|
+
};
|
|
25
|
+
requests?: {
|
|
26
|
+
cpu?: string;
|
|
27
|
+
memory?: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/** Environment variables. */
|
|
31
|
+
env?: Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
export interface InitContainer {
|
|
37
|
+
/** Init container name. */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Container image. */
|
|
40
|
+
image: string;
|
|
41
|
+
/** Command to run. */
|
|
42
|
+
command?: string[];
|
|
43
|
+
/** Arguments to the command. */
|
|
44
|
+
args?: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface SharedVolume {
|
|
47
|
+
/** Volume name. */
|
|
48
|
+
name: string;
|
|
49
|
+
/** Use emptyDir (default). */
|
|
50
|
+
emptyDir?: Record<string, unknown>;
|
|
51
|
+
/** Use a ConfigMap by name. */
|
|
52
|
+
configMapName?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface SidecarAppProps {
|
|
55
|
+
/** Application name — used in metadata and labels. */
|
|
56
|
+
name: string;
|
|
57
|
+
/** Primary container image. */
|
|
58
|
+
image: string;
|
|
59
|
+
/** Primary container port (default: 80). */
|
|
60
|
+
port?: number;
|
|
61
|
+
/** Number of replicas (default: 2). */
|
|
62
|
+
replicas?: number;
|
|
63
|
+
/** Sidecar containers. */
|
|
64
|
+
sidecars: SidecarContainer[];
|
|
65
|
+
/** Init containers (run before main containers). */
|
|
66
|
+
initContainers?: InitContainer[];
|
|
67
|
+
/** Shared volumes between containers. */
|
|
68
|
+
sharedVolumes?: SharedVolume[];
|
|
69
|
+
/** Additional labels to apply to all resources. */
|
|
70
|
+
labels?: Record<string, string>;
|
|
71
|
+
/** CPU limit for the primary container (default: "500m"). */
|
|
72
|
+
cpuLimit?: string;
|
|
73
|
+
/** Memory limit for the primary container (default: "256Mi"). */
|
|
74
|
+
memoryLimit?: string;
|
|
75
|
+
/** CPU request for the primary container (default: "100m"). */
|
|
76
|
+
cpuRequest?: string;
|
|
77
|
+
/** Memory request for the primary container (default: "128Mi"). */
|
|
78
|
+
memoryRequest?: string;
|
|
79
|
+
/** Namespace for all resources. */
|
|
80
|
+
namespace?: string;
|
|
81
|
+
/** Environment variables for the primary container. */
|
|
82
|
+
env?: Array<{
|
|
83
|
+
name: string;
|
|
84
|
+
value: string;
|
|
85
|
+
}>;
|
|
86
|
+
/** Container security context for the primary container (supports PSS restricted fields). */
|
|
87
|
+
securityContext?: ContainerSecurityContext;
|
|
88
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
89
|
+
defaults?: {
|
|
90
|
+
deployment?: Partial<Record<string, unknown>>;
|
|
91
|
+
service?: Partial<Record<string, unknown>>;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export interface SidecarAppResult {
|
|
95
|
+
deployment: InstanceType<typeof Deployment>;
|
|
96
|
+
service: InstanceType<typeof Service>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Create a SidecarApp composite — returns prop objects for
|
|
100
|
+
* a multi-container Deployment and Service.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { SidecarApp } from "@intentius/chant-lexicon-k8s";
|
|
105
|
+
*
|
|
106
|
+
* const { deployment, service } = SidecarApp({
|
|
107
|
+
* name: "api",
|
|
108
|
+
* image: "api:1.0",
|
|
109
|
+
* port: 8080,
|
|
110
|
+
* sidecars: [
|
|
111
|
+
* { name: "envoy", image: "envoyproxy/envoy:v1.28", ports: [{ containerPort: 9901 }] },
|
|
112
|
+
* ],
|
|
113
|
+
* initContainers: [
|
|
114
|
+
* { name: "migrate", image: "api:1.0", command: ["python", "manage.py", "migrate"] },
|
|
115
|
+
* ],
|
|
116
|
+
* sharedVolumes: [{ name: "tmp", emptyDir: {} }],
|
|
117
|
+
* });
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare const SidecarApp: import("@intentius/chant").CompositeDefinition<SidecarAppProps, import("@intentius/chant").CompositeMembers>;
|
|
121
|
+
//# sourceMappingURL=sidecar-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidecar-app.d.ts","sourceRoot":"","sources":["../../src/composites/sidecar-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,oCAAoC;IACpC,SAAS,CAAC,EAAE;QACV,MAAM,CAAC,EAAE;YAAE,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,QAAQ,CAAC,EAAE;YAAE,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9C,CAAC;IACF,6BAA6B;IAC7B,GAAG,CAAC,EAAE,KAAK,CAA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AAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,GAAG,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,6FAA6F;IAC7F,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,sDAAsD;IACtD,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAC5C,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;IAC5C,OAAO,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,8GAmGP,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatefulApp composite — StatefulSet + headless Service + PVC template.
|
|
3
|
+
*
|
|
4
|
+
* A higher-level construct for deploying stateful applications
|
|
5
|
+
* like databases, caches, and message queues.
|
|
6
|
+
*/
|
|
7
|
+
import { StatefulSet, Service, PodDisruptionBudget } from "../generated/index.js";
|
|
8
|
+
import type { ContainerSecurityContext } from "./security-context.js";
|
|
9
|
+
export interface StatefulAppProps {
|
|
10
|
+
/** Application name — used in metadata and labels. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Container image (e.g., "postgres:16"). */
|
|
13
|
+
image: string;
|
|
14
|
+
/** Container port (default: 5432). */
|
|
15
|
+
port?: number;
|
|
16
|
+
/** Number of replicas (default: 1). */
|
|
17
|
+
replicas?: number;
|
|
18
|
+
/** Storage size for the PVC (e.g., "10Gi"). */
|
|
19
|
+
storageSize?: string;
|
|
20
|
+
/** Storage class name. */
|
|
21
|
+
storageClassName?: string;
|
|
22
|
+
/** Volume mount path inside the container (default: "/data"). */
|
|
23
|
+
mountPath?: string;
|
|
24
|
+
/** PodDisruptionBudget minAvailable — if set, creates a PDB. */
|
|
25
|
+
minAvailable?: number | string;
|
|
26
|
+
/** Init containers (e.g., schema migrations, permission setup). */
|
|
27
|
+
initContainers?: Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
image: string;
|
|
30
|
+
command?: string[];
|
|
31
|
+
args?: string[];
|
|
32
|
+
}>;
|
|
33
|
+
/** Container security context (supports PSS restricted fields). */
|
|
34
|
+
securityContext?: ContainerSecurityContext;
|
|
35
|
+
/** Termination grace period in seconds. */
|
|
36
|
+
terminationGracePeriodSeconds?: number;
|
|
37
|
+
/** Priority class name for pod scheduling. */
|
|
38
|
+
priorityClassName?: string;
|
|
39
|
+
/** Additional labels to apply to all resources. */
|
|
40
|
+
labels?: Record<string, string>;
|
|
41
|
+
/** CPU limit (e.g., "1"). */
|
|
42
|
+
cpuLimit?: string;
|
|
43
|
+
/** Memory limit (e.g., "1Gi"). */
|
|
44
|
+
memoryLimit?: string;
|
|
45
|
+
/** Namespace for all resources. */
|
|
46
|
+
namespace?: string;
|
|
47
|
+
/** Environment variables for the container. */
|
|
48
|
+
env?: Array<{
|
|
49
|
+
name: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}>;
|
|
52
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
53
|
+
defaults?: {
|
|
54
|
+
statefulSet?: Partial<Record<string, unknown>>;
|
|
55
|
+
service?: Partial<Record<string, unknown>>;
|
|
56
|
+
pdb?: Partial<Record<string, unknown>>;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface StatefulAppResult {
|
|
60
|
+
statefulSet: InstanceType<typeof StatefulSet>;
|
|
61
|
+
service: InstanceType<typeof Service>;
|
|
62
|
+
pdb?: InstanceType<typeof PodDisruptionBudget>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Create a StatefulApp composite — returns prop objects for
|
|
66
|
+
* a StatefulSet and headless Service.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* import { StatefulApp } from "@intentius/chant-lexicon-k8s";
|
|
71
|
+
*
|
|
72
|
+
* const { statefulSet, service } = StatefulApp({
|
|
73
|
+
* name: "postgres",
|
|
74
|
+
* image: "postgres:16",
|
|
75
|
+
* port: 5432,
|
|
76
|
+
* storageSize: "20Gi",
|
|
77
|
+
* env: [{ name: "POSTGRES_PASSWORD", value: "changeme" }],
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare const StatefulApp: import("@intentius/chant").CompositeDefinition<StatefulAppProps, import("@intentius/chant").CompositeMembers>;
|
|
82
|
+
//# sourceMappingURL=stateful-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateful-app.d.ts","sourceRoot":"","sources":["../../src/composites/stateful-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC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AmB,CAAC,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,+GAgHP,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebApp composite — Deployment + Service + optional Ingress.
|
|
3
|
+
*
|
|
4
|
+
* A higher-level construct for deploying stateless web applications
|
|
5
|
+
* with common defaults (health probes, resource limits, labels).
|
|
6
|
+
*/
|
|
7
|
+
import { Deployment, Service, Ingress, PodDisruptionBudget } from "../generated/index.js";
|
|
8
|
+
import type { ContainerSecurityContext } from "./security-context.js";
|
|
9
|
+
export interface WebAppProps {
|
|
10
|
+
/** Application name — used in metadata and labels. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Container image (e.g., "nginx:1.25"). */
|
|
13
|
+
image: string;
|
|
14
|
+
/** Container port (default: 80). */
|
|
15
|
+
port?: number;
|
|
16
|
+
/** Number of replicas (default: 2). */
|
|
17
|
+
replicas?: number;
|
|
18
|
+
/** Ingress hostname — if set, creates an Ingress resource. */
|
|
19
|
+
ingressHost?: string;
|
|
20
|
+
/** Ingress TLS secret name — if set, enables TLS on the Ingress. */
|
|
21
|
+
ingressTlsSecret?: string;
|
|
22
|
+
/** Multi-path ingress rules — overrides the default single "/" path. */
|
|
23
|
+
ingressPaths?: Array<{
|
|
24
|
+
path: string;
|
|
25
|
+
pathType?: string;
|
|
26
|
+
serviceName?: string;
|
|
27
|
+
servicePort?: number;
|
|
28
|
+
}>;
|
|
29
|
+
/** PodDisruptionBudget minAvailable — if set, creates a PDB. */
|
|
30
|
+
minAvailable?: number | string;
|
|
31
|
+
/** Init containers (e.g., migrations, cert setup). */
|
|
32
|
+
initContainers?: Array<{
|
|
33
|
+
name: string;
|
|
34
|
+
image: string;
|
|
35
|
+
command?: string[];
|
|
36
|
+
args?: string[];
|
|
37
|
+
}>;
|
|
38
|
+
/** Container security context (supports PSS restricted fields). */
|
|
39
|
+
securityContext?: ContainerSecurityContext;
|
|
40
|
+
/** Termination grace period in seconds. */
|
|
41
|
+
terminationGracePeriodSeconds?: number;
|
|
42
|
+
/** Priority class name for pod scheduling. */
|
|
43
|
+
priorityClassName?: string;
|
|
44
|
+
/** Additional labels to apply to all resources. */
|
|
45
|
+
labels?: Record<string, string>;
|
|
46
|
+
/** CPU limit (e.g., "500m"). */
|
|
47
|
+
cpuLimit?: string;
|
|
48
|
+
/** Memory limit (e.g., "256Mi"). */
|
|
49
|
+
memoryLimit?: string;
|
|
50
|
+
/** CPU request (e.g., "100m"). */
|
|
51
|
+
cpuRequest?: string;
|
|
52
|
+
/** Memory request (e.g., "128Mi"). */
|
|
53
|
+
memoryRequest?: string;
|
|
54
|
+
/** Namespace for all resources. */
|
|
55
|
+
namespace?: string;
|
|
56
|
+
/** Environment variables for the container. */
|
|
57
|
+
env?: Array<{
|
|
58
|
+
name: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
62
|
+
defaults?: {
|
|
63
|
+
deployment?: Partial<Record<string, unknown>>;
|
|
64
|
+
service?: Partial<Record<string, unknown>>;
|
|
65
|
+
ingress?: Partial<Record<string, unknown>>;
|
|
66
|
+
pdb?: Partial<Record<string, unknown>>;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface WebAppResult {
|
|
70
|
+
deployment: InstanceType<typeof Deployment>;
|
|
71
|
+
service: InstanceType<typeof Service>;
|
|
72
|
+
ingress?: InstanceType<typeof Ingress>;
|
|
73
|
+
pdb?: InstanceType<typeof PodDisruptionBudget>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Create a WebApp composite — returns declarable instances for
|
|
77
|
+
* a Deployment, Service, and optional Ingress.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* import { WebApp } from "@intentius/chant-lexicon-k8s";
|
|
82
|
+
*
|
|
83
|
+
* const { deployment, service, ingress } = WebApp({
|
|
84
|
+
* name: "my-app",
|
|
85
|
+
* image: "my-app:1.0",
|
|
86
|
+
* port: 8080,
|
|
87
|
+
* replicas: 3,
|
|
88
|
+
* ingressHost: "my-app.example.com",
|
|
89
|
+
* });
|
|
90
|
+
*
|
|
91
|
+
* export { deployment, service, ingress };
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare const WebApp: import("@intentius/chant").CompositeDefinition<WebAppProps, import("@intentius/chant").CompositeMembers>;
|
|
95
|
+
//# sourceMappingURL=web-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../src/composites/web-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,YAAY,CAAC,EAAE,KAAK,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;IACH,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,sDAAsD;IACtD,cAAc,CAAC,EAAE,KAAK,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YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;IAC5C,OAAO,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,MAAM,0GA6JP,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkerPool composite — Deployment + ServiceAccount + Role + RoleBinding + optional ConfigMap + optional HPA.
|
|
3
|
+
*
|
|
4
|
+
* A higher-level construct for background queue workers (Sidekiq, Celery, Bull)
|
|
5
|
+
* that need RBAC for secrets/configmaps and optional autoscaling, but no Service.
|
|
6
|
+
*/
|
|
7
|
+
import { Deployment, ServiceAccount, Role, RoleBinding, ConfigMap, HorizontalPodAutoscaler, PodDisruptionBudget } from "../generated/index.js";
|
|
8
|
+
import type { ContainerSecurityContext } from "./security-context.js";
|
|
9
|
+
export interface WorkerPoolProps {
|
|
10
|
+
/** Worker name — used in metadata and labels. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Container image. */
|
|
13
|
+
image: string;
|
|
14
|
+
/** Command to run in the container. */
|
|
15
|
+
command?: string[];
|
|
16
|
+
/** Arguments to the command. */
|
|
17
|
+
args?: string[];
|
|
18
|
+
/** Number of replicas (default: 1, ignored if autoscaling). */
|
|
19
|
+
replicas?: number;
|
|
20
|
+
/** Config data — creates a ConfigMap and injects via envFrom. */
|
|
21
|
+
config?: Record<string, string>;
|
|
22
|
+
/** RBAC rules for the service account. */
|
|
23
|
+
rbacRules?: Array<{
|
|
24
|
+
apiGroups: string[];
|
|
25
|
+
resources: string[];
|
|
26
|
+
verbs: string[];
|
|
27
|
+
}>;
|
|
28
|
+
/** Optional autoscaling — creates an HPA when provided. */
|
|
29
|
+
autoscaling?: {
|
|
30
|
+
minReplicas: number;
|
|
31
|
+
maxReplicas: number;
|
|
32
|
+
targetCPUPercent?: number;
|
|
33
|
+
};
|
|
34
|
+
/** PodDisruptionBudget minAvailable — if set, creates a PDB. */
|
|
35
|
+
minAvailable?: number | string;
|
|
36
|
+
/** Container security context (supports PSS restricted fields). */
|
|
37
|
+
securityContext?: ContainerSecurityContext;
|
|
38
|
+
/** Termination grace period in seconds. */
|
|
39
|
+
terminationGracePeriodSeconds?: number;
|
|
40
|
+
/** Priority class name for pod scheduling. */
|
|
41
|
+
priorityClassName?: string;
|
|
42
|
+
/** CPU request (default: "100m"). */
|
|
43
|
+
cpuRequest?: string;
|
|
44
|
+
/** Memory request (default: "128Mi"). */
|
|
45
|
+
memoryRequest?: string;
|
|
46
|
+
/** CPU limit (default: "500m"). */
|
|
47
|
+
cpuLimit?: string;
|
|
48
|
+
/** Memory limit (default: "256Mi"). */
|
|
49
|
+
memoryLimit?: string;
|
|
50
|
+
/** Additional labels to apply to all resources. */
|
|
51
|
+
labels?: Record<string, string>;
|
|
52
|
+
/** Namespace for all resources. */
|
|
53
|
+
namespace?: string;
|
|
54
|
+
/** Environment variables for the container. */
|
|
55
|
+
env?: Array<{
|
|
56
|
+
name: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}>;
|
|
59
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
60
|
+
defaults?: {
|
|
61
|
+
deployment?: Partial<Record<string, unknown>>;
|
|
62
|
+
serviceAccount?: Partial<Record<string, unknown>>;
|
|
63
|
+
role?: Partial<Record<string, unknown>>;
|
|
64
|
+
roleBinding?: Partial<Record<string, unknown>>;
|
|
65
|
+
configMap?: Partial<Record<string, unknown>>;
|
|
66
|
+
hpa?: Partial<Record<string, unknown>>;
|
|
67
|
+
pdb?: Partial<Record<string, unknown>>;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export interface WorkerPoolResult {
|
|
71
|
+
deployment: InstanceType<typeof Deployment>;
|
|
72
|
+
serviceAccount?: InstanceType<typeof ServiceAccount>;
|
|
73
|
+
role?: InstanceType<typeof Role>;
|
|
74
|
+
roleBinding?: InstanceType<typeof RoleBinding>;
|
|
75
|
+
configMap?: InstanceType<typeof ConfigMap>;
|
|
76
|
+
hpa?: InstanceType<typeof HorizontalPodAutoscaler>;
|
|
77
|
+
pdb?: InstanceType<typeof PodDisruptionBudget>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Create a WorkerPool composite — returns prop objects for
|
|
81
|
+
* a Deployment, ServiceAccount, Role, RoleBinding, optional ConfigMap, and optional HPA.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* import { WorkerPool } from "@intentius/chant-lexicon-k8s";
|
|
86
|
+
*
|
|
87
|
+
* const { deployment, serviceAccount, role, roleBinding } = WorkerPool({
|
|
88
|
+
* name: "email-worker",
|
|
89
|
+
* image: "worker:1.0",
|
|
90
|
+
* command: ["bundle", "exec", "sidekiq"],
|
|
91
|
+
* config: { REDIS_URL: "redis://redis:6379" },
|
|
92
|
+
* });
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare const WorkerPool: import("@intentius/chant").CompositeDefinition<WorkerPoolProps, import("@intentius/chant").CompositeMembers>;
|
|
96
|
+
//# sourceMappingURL=worker-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-pool.d.ts","sourceRoot":"","sources":["../../src/composites/worker-pool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAC7C,SAAS,EAAE,uBAAuB,EAAE,mBAAmB,EACxD,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,KAAK,EAAE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 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkloadIdentityServiceAccount composite — ServiceAccount + Workload Identity annotation + optional RBAC.
|
|
3
|
+
*
|
|
4
|
+
* @aks Creates a ServiceAccount with the `azure.workload.identity/client-id`
|
|
5
|
+
* annotation and `azure.workload.identity/use: "true"` label for AKS Workload Identity.
|
|
6
|
+
*/
|
|
7
|
+
import { ServiceAccount, Role, RoleBinding } from "../generated/index.js";
|
|
8
|
+
export interface WorkloadIdentityServiceAccountProps {
|
|
9
|
+
/** ServiceAccount name — used in metadata and labels. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Azure AD application client ID for Workload Identity. */
|
|
12
|
+
clientId: string;
|
|
13
|
+
/** Optional RBAC rules — if provided, creates Role + RoleBinding. */
|
|
14
|
+
rbacRules?: Array<{
|
|
15
|
+
apiGroups: string[];
|
|
16
|
+
resources: string[];
|
|
17
|
+
verbs: string[];
|
|
18
|
+
}>;
|
|
19
|
+
/** Additional labels to apply to all resources. */
|
|
20
|
+
labels?: Record<string, string>;
|
|
21
|
+
/** Namespace for all resources. */
|
|
22
|
+
namespace?: string;
|
|
23
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
24
|
+
defaults?: {
|
|
25
|
+
serviceAccount?: Partial<Record<string, unknown>>;
|
|
26
|
+
role?: Partial<Record<string, unknown>>;
|
|
27
|
+
roleBinding?: Partial<Record<string, unknown>>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface WorkloadIdentityServiceAccountResult {
|
|
31
|
+
serviceAccount: InstanceType<typeof ServiceAccount>;
|
|
32
|
+
role?: InstanceType<typeof Role>;
|
|
33
|
+
roleBinding?: InstanceType<typeof RoleBinding>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a WorkloadIdentityServiceAccount composite — returns prop objects for
|
|
37
|
+
* a ServiceAccount with AKS Workload Identity annotation, and optional Role + RoleBinding.
|
|
38
|
+
*
|
|
39
|
+
* @aks
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* import { WorkloadIdentityServiceAccount } from "@intentius/chant-lexicon-k8s";
|
|
43
|
+
*
|
|
44
|
+
* const { serviceAccount, role, roleBinding } = WorkloadIdentityServiceAccount({
|
|
45
|
+
* name: "app-sa",
|
|
46
|
+
* clientId: "00000000-0000-0000-0000-000000000000",
|
|
47
|
+
* rbacRules: [
|
|
48
|
+
* { apiGroups: [""], resources: ["secrets"], verbs: ["get"] },
|
|
49
|
+
* ],
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const WorkloadIdentityServiceAccount: import("@intentius/chant").CompositeDefinition<WorkloadIdentityServiceAccountProps, import("@intentius/chant").CompositeMembers>;
|
|
54
|
+
//# sourceMappingURL=workload-identity-sa.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload-identity-sa.d.ts","sourceRoot":"","sources":["../../src/composites/workload-identity-sa.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,WAAW,mCAAmC;IAClD,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC,CAAC;IACH,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,QAAQ,CAAC,EAAE;QACT,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAClD,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACxC,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAChD,CAAC;CACH;AAED,MAAM,WAAW,oCAAoC;IACnD,cAAc,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;IACpD,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,8BAA8B,kIAoEP,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkloadIdentityServiceAccount composite — ServiceAccount + GKE Workload Identity annotation + optional RBAC.
|
|
3
|
+
*
|
|
4
|
+
* @gke Creates a ServiceAccount with the `iam.gke.io/gcp-service-account`
|
|
5
|
+
* annotation for GKE Workload Identity Federation.
|
|
6
|
+
*/
|
|
7
|
+
import { ServiceAccount, Role, RoleBinding } from "../generated/index.js";
|
|
8
|
+
export interface WorkloadIdentityServiceAccountProps {
|
|
9
|
+
/** ServiceAccount name — used in metadata and labels. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** GCP service account email for Workload Identity annotation. */
|
|
12
|
+
gcpServiceAccountEmail: string;
|
|
13
|
+
/** Optional RBAC rules — if provided, creates Role + RoleBinding. */
|
|
14
|
+
rbacRules?: Array<{
|
|
15
|
+
apiGroups: string[];
|
|
16
|
+
resources: string[];
|
|
17
|
+
verbs: string[];
|
|
18
|
+
}>;
|
|
19
|
+
/** Additional labels to apply to all resources. */
|
|
20
|
+
labels?: Record<string, string>;
|
|
21
|
+
/** Namespace for all resources. */
|
|
22
|
+
namespace?: string;
|
|
23
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
24
|
+
defaults?: {
|
|
25
|
+
serviceAccount?: Partial<Record<string, unknown>>;
|
|
26
|
+
role?: Partial<Record<string, unknown>>;
|
|
27
|
+
roleBinding?: Partial<Record<string, unknown>>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface WorkloadIdentityServiceAccountResult {
|
|
31
|
+
serviceAccount: InstanceType<typeof ServiceAccount>;
|
|
32
|
+
role?: InstanceType<typeof Role>;
|
|
33
|
+
roleBinding?: InstanceType<typeof RoleBinding>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a WorkloadIdentityServiceAccount composite — returns prop objects for
|
|
37
|
+
* a ServiceAccount with GKE Workload Identity annotation, and optional Role + RoleBinding.
|
|
38
|
+
*
|
|
39
|
+
* @gke
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* import { WorkloadIdentityServiceAccount } from "@intentius/chant-lexicon-k8s";
|
|
43
|
+
*
|
|
44
|
+
* const { serviceAccount, role, roleBinding } = WorkloadIdentityServiceAccount({
|
|
45
|
+
* name: "app-sa",
|
|
46
|
+
* gcpServiceAccountEmail: "sa@my-project.iam.gserviceaccount.com",
|
|
47
|
+
* rbacRules: [
|
|
48
|
+
* { apiGroups: [""], resources: ["secrets"], verbs: ["get"] },
|
|
49
|
+
* ],
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const WorkloadIdentityServiceAccount: import("@intentius/chant").CompositeDefinition<WorkloadIdentityServiceAccountProps, import("@intentius/chant").CompositeMembers>;
|
|
54
|
+
//# sourceMappingURL=workload-identity-service-account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload-identity-service-account.d.ts","sourceRoot":"","sources":["../../src/composites/workload-identity-service-account.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,WAAW,mCAAmC;IAClD,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qEAAqE;IACrE,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC,CAAC;IACH,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,QAAQ,CAAC,EAAE;QACT,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAClD,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACxC,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAChD,CAAC;CACH;AAED,MAAM,WAAW,oCAAoC;IACnD,cAAc,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;IACpD,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,8BAA8B,kIAgEP,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coverage analysis for the Kubernetes lexicon.
|
|
3
|
+
*
|
|
4
|
+
* Analyzes generated resources for coverage of property constraints,
|
|
5
|
+
* lifecycle attributes, and other dimensions.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Analyze coverage of the K8s lexicon.
|
|
9
|
+
*/
|
|
10
|
+
export declare function analyzeK8sCoverage(opts?: {
|
|
11
|
+
verbose?: boolean;
|
|
12
|
+
minOverall?: number;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
//# sourceMappingURL=coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage.d.ts","sourceRoot":"","sources":["../src/coverage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,CAAC,EAAE;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAchB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Third-party CRD sources included in k8s lexicon generation.
|
|
3
|
+
*
|
|
4
|
+
* Add entries here to have CRDs fetched and code-generated alongside
|
|
5
|
+
* the core Kubernetes OpenAPI types. The CRD YAML is fetched at
|
|
6
|
+
* generation time (npm run generate) and baked into the output.
|
|
7
|
+
*/
|
|
8
|
+
import type { CRDSource } from "./types.js";
|
|
9
|
+
export declare const CRD_SOURCES: CRDSource[];
|
|
10
|
+
//# sourceMappingURL=crd-sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crd-sources.d.ts","sourceRoot":"","sources":["../../src/crd/crd-sources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAqGzC,eAAO,MAAM,WAAW,EAAE,SAAS,EAgBlC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRD loader — loads Custom Resource Definitions from various sources.
|
|
3
|
+
*
|
|
4
|
+
* Supports loading from local files, remote URLs, and (placeholder)
|
|
5
|
+
* live cluster introspection via kubectl.
|
|
6
|
+
*/
|
|
7
|
+
import type { CRDSource } from "./types.js";
|
|
8
|
+
import type { K8sParseResult } from "../spec/parse.js";
|
|
9
|
+
/**
|
|
10
|
+
* Load CRDs from a source and return parsed K8sParseResult entries.
|
|
11
|
+
*/
|
|
12
|
+
export declare function loadCRDs(source: CRDSource): Promise<K8sParseResult[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Load CRDs from multiple sources and merge results.
|
|
15
|
+
*/
|
|
16
|
+
export declare function loadMultipleCRDs(sources: CRDSource[]): Promise<K8sParseResult[]>;
|
|
17
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/crd/loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD;;GAEG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAG3E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAOtF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRD parser — converts CRD YAML into K8sParseResult entries.
|
|
3
|
+
*
|
|
4
|
+
* Parses the openAPIV3Schema from a CRD's versions to extract resource
|
|
5
|
+
* properties, building the same K8sParseResult structures used by the
|
|
6
|
+
* main K8s swagger parser. This enables CRD-based resources to integrate
|
|
7
|
+
* with the full codegen pipeline.
|
|
8
|
+
*/
|
|
9
|
+
import type { K8sParseResult } from "../spec/parse.js";
|
|
10
|
+
import type { CRDSpec } from "./types.js";
|
|
11
|
+
/**
|
|
12
|
+
* Parse a CRD YAML document string into K8sParseResult entries.
|
|
13
|
+
* Returns one result per served version in the CRD.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseCRD(content: string): K8sParseResult[];
|
|
16
|
+
/**
|
|
17
|
+
* Parse a CRD spec into K8sParseResult entries.
|
|
18
|
+
* Extracts one result per served version with storage version preferred.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseCRDSpec(spec: CRDSpec): K8sParseResult[];
|
|
21
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/crd/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAwD,MAAM,eAAe,CAAC;AAC1G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA+BvC;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAqB1D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,EAAE,CAwC5D"}
|