@intentius/chant-lexicon-k8s 0.7.0 → 0.8.1
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,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GkeGateway composite — Gateway + HTTPRoute for GKE Gateway API.
|
|
3
|
+
*
|
|
4
|
+
* @gke Creates a Gateway with a GKE-specific `gatewayClassName` and
|
|
5
|
+
* HTTPRoute resources for traffic routing.
|
|
6
|
+
*/
|
|
7
|
+
import { Deployment } from "../generated/index.js";
|
|
8
|
+
export interface GkeGatewayHost {
|
|
9
|
+
/** Hostname (e.g., "api.example.com"). */
|
|
10
|
+
hostname: string;
|
|
11
|
+
/** Path rules for this host. */
|
|
12
|
+
paths: Array<{
|
|
13
|
+
path: string;
|
|
14
|
+
serviceName: string;
|
|
15
|
+
servicePort: number;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
export interface GkeGatewayProps {
|
|
19
|
+
/** Gateway name — used in metadata and labels. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** GKE gateway class (default: "gke-l7-global-external-managed"). */
|
|
22
|
+
gatewayClassName?: "gke-l7-global-external-managed" | "gke-l7-regional-external-managed" | "gke-l7-rilb";
|
|
23
|
+
/** Host definitions with paths. */
|
|
24
|
+
hosts: GkeGatewayHost[];
|
|
25
|
+
/** Google-managed certificate name for TLS. */
|
|
26
|
+
certificateName?: string;
|
|
27
|
+
/** Additional labels to apply to all resources. */
|
|
28
|
+
labels?: Record<string, string>;
|
|
29
|
+
/** Namespace for all resources. */
|
|
30
|
+
namespace?: string;
|
|
31
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
32
|
+
defaults?: {
|
|
33
|
+
gateway?: Partial<Record<string, unknown>>;
|
|
34
|
+
httpRoute?: Partial<Record<string, unknown>>;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface GkeGatewayResult {
|
|
38
|
+
gateway: InstanceType<typeof Deployment>;
|
|
39
|
+
httpRoute: InstanceType<typeof Deployment>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create a GkeGateway composite — returns prop objects for
|
|
43
|
+
* a Gateway and HTTPRoute with GKE-specific gateway class.
|
|
44
|
+
*
|
|
45
|
+
* @gke
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* import { GkeGateway } from "@intentius/chant-lexicon-k8s";
|
|
49
|
+
*
|
|
50
|
+
* const { gateway, httpRoute } = GkeGateway({
|
|
51
|
+
* name: "api-gateway",
|
|
52
|
+
* hosts: [
|
|
53
|
+
* {
|
|
54
|
+
* hostname: "api.example.com",
|
|
55
|
+
* paths: [{ path: "/", serviceName: "api", servicePort: 80 }],
|
|
56
|
+
* },
|
|
57
|
+
* ],
|
|
58
|
+
* certificateName: "api-cert",
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const GkeGateway: import("@intentius/chant").CompositeDefinition<GkeGatewayProps, import("@intentius/chant").CompositeMembers>;
|
|
63
|
+
//# sourceMappingURL=gke-gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gke-gateway.d.ts","sourceRoot":"","sources":["../../src/composites/gke-gateway.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,gBAAgB,CAAC,EACb,gCAAgC,GAChC,kCAAkC,GAClC,aAAa,CAAC;IAClB,mCAAmC;IACnC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,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,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAC3C,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAC9C,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;IACzC,SAAS,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,UAAU,8GA+EP,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GkeOtelCollector composite — DaemonSet + RBAC + ConfigMap for OpenTelemetry on GKE.
|
|
3
|
+
*
|
|
4
|
+
* @gke Like AdotCollector but targets Cloud Trace + Cloud Monitoring via the
|
|
5
|
+
* googlecloud exporter and uses GKE Workload Identity instead of IRSA.
|
|
6
|
+
*/
|
|
7
|
+
import { DaemonSet, ServiceAccount, ClusterRole, ClusterRoleBinding, ConfigMap } from "../generated/index.js";
|
|
8
|
+
export interface GkeOtelCollectorProps {
|
|
9
|
+
/** GKE cluster name. */
|
|
10
|
+
clusterName: string;
|
|
11
|
+
/** GCP project ID. */
|
|
12
|
+
projectId: string;
|
|
13
|
+
/** GCP service account email for Workload Identity. */
|
|
14
|
+
gcpServiceAccountEmail?: string;
|
|
15
|
+
/** Agent name (default: "gke-otel-collector"). */
|
|
16
|
+
name?: string;
|
|
17
|
+
/** OTel Collector image (default: "otel/opentelemetry-collector-contrib:latest"). */
|
|
18
|
+
image?: string;
|
|
19
|
+
/** Namespace (default: "gke-monitoring"). */
|
|
20
|
+
namespace?: string;
|
|
21
|
+
/** Additional labels. */
|
|
22
|
+
labels?: Record<string, string>;
|
|
23
|
+
/** CPU request (default: "100m"). */
|
|
24
|
+
cpuRequest?: string;
|
|
25
|
+
/** Memory request (default: "256Mi"). */
|
|
26
|
+
memoryRequest?: string;
|
|
27
|
+
/** CPU limit (default: "500m"). */
|
|
28
|
+
cpuLimit?: string;
|
|
29
|
+
/** Memory limit (default: "512Mi"). */
|
|
30
|
+
memoryLimit?: string;
|
|
31
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
32
|
+
defaults?: {
|
|
33
|
+
daemonSet?: Partial<Record<string, unknown>>;
|
|
34
|
+
serviceAccount?: Partial<Record<string, unknown>>;
|
|
35
|
+
clusterRole?: Partial<Record<string, unknown>>;
|
|
36
|
+
clusterRoleBinding?: Partial<Record<string, unknown>>;
|
|
37
|
+
configMap?: Partial<Record<string, unknown>>;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface GkeOtelCollectorResult {
|
|
41
|
+
daemonSet: InstanceType<typeof DaemonSet>;
|
|
42
|
+
serviceAccount: InstanceType<typeof ServiceAccount>;
|
|
43
|
+
clusterRole: InstanceType<typeof ClusterRole>;
|
|
44
|
+
clusterRoleBinding: InstanceType<typeof ClusterRoleBinding>;
|
|
45
|
+
configMap: InstanceType<typeof ConfigMap>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a GkeOtelCollector composite — returns prop objects for
|
|
49
|
+
* a DaemonSet, ServiceAccount, ClusterRole, ClusterRoleBinding, and ConfigMap.
|
|
50
|
+
*
|
|
51
|
+
* @gke
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* import { GkeOtelCollector } from "@intentius/chant-lexicon-k8s";
|
|
55
|
+
*
|
|
56
|
+
* const { daemonSet, serviceAccount, clusterRole, clusterRoleBinding, configMap } = GkeOtelCollector({
|
|
57
|
+
* clusterName: "my-cluster",
|
|
58
|
+
* projectId: "my-project",
|
|
59
|
+
* gcpServiceAccountEmail: "otel@my-project.iam.gserviceaccount.com",
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare const GkeOtelCollector: import("@intentius/chant").CompositeDefinition<GkeOtelCollectorProps, import("@intentius/chant").CompositeMembers>;
|
|
64
|
+
//# sourceMappingURL=gke-otel-collector.d.ts.map
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C,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAC9C,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC;IAC1C,cAAc,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;IACpD,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;IAC9C,kBAAkB,EAAE,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC5D,SAAS,EAAE,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,oHA6KP,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type { ContainerSecurityContext } from "./security-context.js";
|
|
2
|
+
export { WebApp } from "./web-app.js";
|
|
3
|
+
export type { WebAppProps, WebAppResult } from "./web-app.js";
|
|
4
|
+
export { StatefulApp } from "./stateful-app.js";
|
|
5
|
+
export type { StatefulAppProps, StatefulAppResult } from "./stateful-app.js";
|
|
6
|
+
export { CronWorkload } from "./cron-workload.js";
|
|
7
|
+
export type { CronWorkloadProps, CronWorkloadResult } from "./cron-workload.js";
|
|
8
|
+
export { AutoscaledService } from "./autoscaled-service.js";
|
|
9
|
+
export type { AutoscaledServiceProps, AutoscaledServiceResult } from "./autoscaled-service.js";
|
|
10
|
+
export { WorkerPool } from "./worker-pool.js";
|
|
11
|
+
export type { WorkerPoolProps, WorkerPoolResult } from "./worker-pool.js";
|
|
12
|
+
export { NamespaceEnv } from "./namespace-env.js";
|
|
13
|
+
export type { NamespaceEnvProps, NamespaceEnvResult } from "./namespace-env.js";
|
|
14
|
+
export { NodeAgent } from "./node-agent.js";
|
|
15
|
+
export type { NodeAgentProps, NodeAgentResult } from "./node-agent.js";
|
|
16
|
+
export { BatchJob } from "./batch-job.js";
|
|
17
|
+
export type { BatchJobProps, BatchJobResult } from "./batch-job.js";
|
|
18
|
+
export { SecureIngress } from "./secure-ingress.js";
|
|
19
|
+
export type { SecureIngressProps, SecureIngressResult } from "./secure-ingress.js";
|
|
20
|
+
export { ConfiguredApp } from "./configured-app.js";
|
|
21
|
+
export type { ConfiguredAppProps, ConfiguredAppResult } from "./configured-app.js";
|
|
22
|
+
export { SidecarApp } from "./sidecar-app.js";
|
|
23
|
+
export type { SidecarAppProps, SidecarAppResult } from "./sidecar-app.js";
|
|
24
|
+
export { MonitoredService } from "./monitored-service.js";
|
|
25
|
+
export type { MonitoredServiceProps, MonitoredServiceResult } from "./monitored-service.js";
|
|
26
|
+
export { NetworkIsolatedApp } from "./network-isolated-app.js";
|
|
27
|
+
export type { NetworkIsolatedAppProps, NetworkIsolatedAppResult } from "./network-isolated-app.js";
|
|
28
|
+
export { IrsaServiceAccount } from "./irsa-service-account.js";
|
|
29
|
+
export type { IrsaServiceAccountProps, IrsaServiceAccountResult } from "./irsa-service-account.js";
|
|
30
|
+
export { AlbIngress } from "./alb-ingress.js";
|
|
31
|
+
export type { AlbIngressProps, AlbIngressResult } from "./alb-ingress.js";
|
|
32
|
+
export { EbsStorageClass } from "./ebs-storage-class.js";
|
|
33
|
+
export type { EbsStorageClassProps, EbsStorageClassResult } from "./ebs-storage-class.js";
|
|
34
|
+
export { EfsStorageClass } from "./efs-storage-class.js";
|
|
35
|
+
export type { EfsStorageClassProps, EfsStorageClassResult } from "./efs-storage-class.js";
|
|
36
|
+
export { FluentBitAgent } from "./fluent-bit-agent.js";
|
|
37
|
+
export type { FluentBitAgentProps, FluentBitAgentResult } from "./fluent-bit-agent.js";
|
|
38
|
+
export { ExternalDnsAgent } from "./external-dns-agent.js";
|
|
39
|
+
export type { ExternalDnsAgentProps, ExternalDnsAgentResult } from "./external-dns-agent.js";
|
|
40
|
+
export { AdotCollector } from "./adot-collector.js";
|
|
41
|
+
export type { AdotCollectorProps, AdotCollectorResult } from "./adot-collector.js";
|
|
42
|
+
export { MetricsServer } from "./metrics-server.js";
|
|
43
|
+
export type { MetricsServerProps, MetricsServerResult } from "./metrics-server.js";
|
|
44
|
+
export { WorkloadIdentityServiceAccount } from "./workload-identity-service-account.js";
|
|
45
|
+
export type { WorkloadIdentityServiceAccountProps, WorkloadIdentityServiceAccountResult } from "./workload-identity-service-account.js";
|
|
46
|
+
export { GcePdStorageClass } from "./gce-pd-storage-class.js";
|
|
47
|
+
export type { GcePdStorageClassProps, GcePdStorageClassResult } from "./gce-pd-storage-class.js";
|
|
48
|
+
export { FilestoreStorageClass } from "./filestore-storage-class.js";
|
|
49
|
+
export type { FilestoreStorageClassProps, FilestoreStorageClassResult } from "./filestore-storage-class.js";
|
|
50
|
+
export { GkeGateway } from "./gke-gateway.js";
|
|
51
|
+
export type { GkeGatewayProps, GkeGatewayResult } from "./gke-gateway.js";
|
|
52
|
+
export { ConfigConnectorContext } from "./config-connector-context.js";
|
|
53
|
+
export type { ConfigConnectorContextProps, ConfigConnectorContextResult } from "./config-connector-context.js";
|
|
54
|
+
export { GceIngress } from "./gce-ingress.js";
|
|
55
|
+
export type { GceIngressProps, GceIngressResult } from "./gce-ingress.js";
|
|
56
|
+
export { AgicIngress } from "./agic-ingress.js";
|
|
57
|
+
export type { AgicIngressProps, AgicIngressResult } from "./agic-ingress.js";
|
|
58
|
+
export { AzureDiskStorageClass } from "./azure-disk-storage-class.js";
|
|
59
|
+
export type { AzureDiskStorageClassProps, AzureDiskStorageClassResult } from "./azure-disk-storage-class.js";
|
|
60
|
+
export { AzureFileStorageClass } from "./azure-file-storage-class.js";
|
|
61
|
+
export type { AzureFileStorageClassProps, AzureFileStorageClassResult } from "./azure-file-storage-class.js";
|
|
62
|
+
export { AzureMonitorCollector } from "./azure-monitor-collector.js";
|
|
63
|
+
export type { AzureMonitorCollectorProps, AzureMonitorCollectorResult } from "./azure-monitor-collector.js";
|
|
64
|
+
export { WorkloadIdentityServiceAccount as AksWorkloadIdentityServiceAccount } from "./workload-identity-sa.js";
|
|
65
|
+
export type { WorkloadIdentityServiceAccountProps as AksWorkloadIdentityServiceAccountProps, WorkloadIdentityServiceAccountResult as AksWorkloadIdentityServiceAccountResult } from "./workload-identity-sa.js";
|
|
66
|
+
export { GkeFluentBitAgent } from "./gke-fluent-bit-agent.js";
|
|
67
|
+
export type { GkeFluentBitAgentProps, GkeFluentBitAgentResult } from "./gke-fluent-bit-agent.js";
|
|
68
|
+
export { GkeOtelCollector } from "./gke-otel-collector.js";
|
|
69
|
+
export type { GkeOtelCollectorProps, GkeOtelCollectorResult } from "./gke-otel-collector.js";
|
|
70
|
+
export { GkeExternalDnsAgent } from "./gke-external-dns-agent.js";
|
|
71
|
+
export type { GkeExternalDnsAgentProps, GkeExternalDnsAgentResult } from "./gke-external-dns-agent.js";
|
|
72
|
+
export { AksExternalDnsAgent } from "./aks-external-dns-agent.js";
|
|
73
|
+
export type { AksExternalDnsAgentProps, AksExternalDnsAgentResult } from "./aks-external-dns-agent.js";
|
|
74
|
+
export { CockroachDbCluster } from "./cockroachdb-cluster.js";
|
|
75
|
+
export type { CockroachDbClusterProps, CockroachDbClusterResult } from "./cockroachdb-cluster.js";
|
|
76
|
+
export { CockroachDbRegionStack } from "./cockroachdb-region-stack.js";
|
|
77
|
+
export type { CockroachDbRegionStackConfig, CockroachDbRegionCockroachConfig, CockroachDbRegionTlsConfig } from "./cockroachdb-region-stack.js";
|
|
78
|
+
export { RayCluster } from "./ray-cluster.js";
|
|
79
|
+
export type { RayClusterProps, RayClusterResult, RayClusterSpec, ResourceSpec, HeadGroupSpec, WorkerGroupSpec } from "./ray-cluster.js";
|
|
80
|
+
export { RayJob } from "./ray-job.js";
|
|
81
|
+
export type { RayJobProps, RayJobResult } from "./ray-job.js";
|
|
82
|
+
export { RayService } from "./ray-service.js";
|
|
83
|
+
export type { RayServiceProps, RayServiceResult } from "./ray-service.js";
|
|
84
|
+
export { ArgoAppFor, ArgoAppSetForRegions, registerArgoCluster } from "./argo-app.js";
|
|
85
|
+
export type { ArgoDestination, ArgoSyncPolicy, ArgoAppForOptions, ArgoAppForResult, ArgoRegionTarget, ArgoAppSetForRegionsOptions, ArgoAppSetForRegionsResult, RegisterArgoClusterOptions, RegisterArgoClusterResult, } from "./argo-app.js";
|
|
86
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composites/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EAAE,aAAa,EAAE,cAAc,EAA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AAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrI,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACnF,YAAY,EACV,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IrsaServiceAccount composite — ServiceAccount + IAM annotation + optional RBAC.
|
|
3
|
+
*
|
|
4
|
+
* @eks Creates a ServiceAccount with the `eks.amazonaws.com/role-arn`
|
|
5
|
+
* annotation for IAM Roles for Service Accounts (IRSA).
|
|
6
|
+
*/
|
|
7
|
+
import { ServiceAccount, Role, RoleBinding } from "../generated/index.js";
|
|
8
|
+
export interface IrsaServiceAccountProps {
|
|
9
|
+
/** ServiceAccount name — used in metadata and labels. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** IAM Role ARN for IRSA annotation. */
|
|
12
|
+
iamRoleArn: 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 IrsaServiceAccountResult {
|
|
31
|
+
serviceAccount: InstanceType<typeof ServiceAccount>;
|
|
32
|
+
role?: InstanceType<typeof Role>;
|
|
33
|
+
roleBinding?: InstanceType<typeof RoleBinding>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create an IrsaServiceAccount composite — returns prop objects for
|
|
37
|
+
* a ServiceAccount with IRSA annotation, and optional Role + RoleBinding.
|
|
38
|
+
*
|
|
39
|
+
* @eks
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* import { IrsaServiceAccount } from "@intentius/chant-lexicon-k8s";
|
|
43
|
+
*
|
|
44
|
+
* const { serviceAccount, role, roleBinding } = IrsaServiceAccount({
|
|
45
|
+
* name: "app-sa",
|
|
46
|
+
* iamRoleArn: "arn:aws:iam::123456789012:role/my-app-role",
|
|
47
|
+
* rbacRules: [
|
|
48
|
+
* { apiGroups: [""], resources: ["secrets"], verbs: ["get"] },
|
|
49
|
+
* ],
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const IrsaServiceAccount: import("@intentius/chant").CompositeDefinition<IrsaServiceAccountProps, import("@intentius/chant").CompositeMembers>;
|
|
54
|
+
//# sourceMappingURL=irsa-service-account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irsa-service-account.d.ts","sourceRoot":"","sources":["../../src/composites/irsa-service-account.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,WAAW,uBAAuB;IACtC,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,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,wBAAwB;IACvC,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,kBAAkB,sHAgEP,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MetricsServer composite — Deployment + Service + ServiceAccount + RBAC + APIService.
|
|
3
|
+
*
|
|
4
|
+
* Deploys metrics-server for HPA pod CPU/memory metrics. metrics-server is not an
|
|
5
|
+
* EKS managed addon — it needs K8s workloads. Uses in-cluster RBAC only (no IRSA).
|
|
6
|
+
*/
|
|
7
|
+
import { Deployment, Service, ServiceAccount, ClusterRole, ClusterRoleBinding, APIService } from "../generated/index.js";
|
|
8
|
+
export interface MetricsServerProps {
|
|
9
|
+
/** Agent name (default: "metrics-server"). */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** Container image (default: "registry.k8s.io/metrics-server/metrics-server:v0.7.2"). */
|
|
12
|
+
image?: string;
|
|
13
|
+
/** Replicas (default: 1). */
|
|
14
|
+
replicas?: number;
|
|
15
|
+
/** Namespace (default: "kube-system"). */
|
|
16
|
+
namespace?: string;
|
|
17
|
+
/** Additional labels. */
|
|
18
|
+
labels?: Record<string, string>;
|
|
19
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
20
|
+
defaults?: {
|
|
21
|
+
deployment?: Partial<Record<string, unknown>>;
|
|
22
|
+
service?: Partial<Record<string, unknown>>;
|
|
23
|
+
serviceAccount?: Partial<Record<string, unknown>>;
|
|
24
|
+
clusterRole?: Partial<Record<string, unknown>>;
|
|
25
|
+
clusterRoleBinding?: Partial<Record<string, unknown>>;
|
|
26
|
+
aggregatedClusterRole?: Partial<Record<string, unknown>>;
|
|
27
|
+
authDelegatorBinding?: Partial<Record<string, unknown>>;
|
|
28
|
+
apiService?: Partial<Record<string, unknown>>;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface MetricsServerResult {
|
|
32
|
+
deployment: InstanceType<typeof Deployment>;
|
|
33
|
+
service: InstanceType<typeof Service>;
|
|
34
|
+
serviceAccount: InstanceType<typeof ServiceAccount>;
|
|
35
|
+
clusterRole: InstanceType<typeof ClusterRole>;
|
|
36
|
+
clusterRoleBinding: InstanceType<typeof ClusterRoleBinding>;
|
|
37
|
+
/** ClusterRole for aggregated API access. */
|
|
38
|
+
aggregatedClusterRole: InstanceType<typeof ClusterRole>;
|
|
39
|
+
/** Binding for aggregated API auth-delegator. */
|
|
40
|
+
authDelegatorBinding: InstanceType<typeof ClusterRoleBinding>;
|
|
41
|
+
/** APIService registration for v1beta1.metrics.k8s.io. */
|
|
42
|
+
apiService: InstanceType<typeof APIService>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Create a MetricsServer composite — returns prop objects for a Deployment,
|
|
46
|
+
* Service, ServiceAccount, ClusterRoles, ClusterRoleBindings, and APIService.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import { MetricsServer } from "@intentius/chant-lexicon-k8s";
|
|
51
|
+
*
|
|
52
|
+
* const ms = MetricsServer({});
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare const MetricsServer: import("@intentius/chant").CompositeDefinition<MetricsServerProps, import("@intentius/chant").CompositeMembers>;
|
|
56
|
+
//# sourceMappingURL=metrics-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics-server.d.ts","sourceRoot":"","sources":["../../src/composites/metrics-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhH,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,sDAAsD;IACtD,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,EAAE,OAAO,C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onitoredService composite — Deployment + Service + ServiceMonitor + optional PrometheusRule.
|
|
3
|
+
*
|
|
4
|
+
* Observability pattern. ServiceMonitor and PrometheusRule are CRDs
|
|
5
|
+
* from the Prometheus Operator (monitoring.coreos.com/v1), returned
|
|
6
|
+
* as raw objects that can be serialized alongside native K8s resources.
|
|
7
|
+
*/
|
|
8
|
+
import { Deployment, Service, ServiceMonitor, PrometheusRule } from "../generated/index.js";
|
|
9
|
+
import type { ContainerSecurityContext } from "./security-context.js";
|
|
10
|
+
export interface AlertRule {
|
|
11
|
+
/** Alert name. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** PromQL expression. */
|
|
14
|
+
expr: string;
|
|
15
|
+
/** Duration before firing (e.g., "5m"). */
|
|
16
|
+
for?: string;
|
|
17
|
+
/** Severity label (e.g., "warning", "critical"). */
|
|
18
|
+
severity?: string;
|
|
19
|
+
/** Additional annotations (summary, description). */
|
|
20
|
+
annotations?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
export interface MonitoredServiceProps {
|
|
23
|
+
/** Application name — used in metadata and labels. */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Container image. */
|
|
26
|
+
image: string;
|
|
27
|
+
/** Application container port (default: 80). */
|
|
28
|
+
port?: number;
|
|
29
|
+
/** Metrics port (default: 9090). */
|
|
30
|
+
metricsPort?: number;
|
|
31
|
+
/** Metrics path (default: "/metrics"). */
|
|
32
|
+
metricsPath?: string;
|
|
33
|
+
/** Scrape interval (default: "30s"). */
|
|
34
|
+
scrapeInterval?: string;
|
|
35
|
+
/** Alert rules — if provided, creates a PrometheusRule. */
|
|
36
|
+
alertRules?: AlertRule[];
|
|
37
|
+
/** Number of replicas (default: 2). */
|
|
38
|
+
replicas?: number;
|
|
39
|
+
/** Additional labels to apply to all resources. */
|
|
40
|
+
labels?: Record<string, string>;
|
|
41
|
+
/** CPU limit (default: "500m"). */
|
|
42
|
+
cpuLimit?: string;
|
|
43
|
+
/** Memory limit (default: "256Mi"). */
|
|
44
|
+
memoryLimit?: string;
|
|
45
|
+
/** CPU request (default: "100m"). */
|
|
46
|
+
cpuRequest?: string;
|
|
47
|
+
/** Memory request (default: "128Mi"). */
|
|
48
|
+
memoryRequest?: string;
|
|
49
|
+
/** Namespace for all resources. */
|
|
50
|
+
namespace?: string;
|
|
51
|
+
/** Environment variables for the container. */
|
|
52
|
+
env?: Array<{
|
|
53
|
+
name: string;
|
|
54
|
+
value: string;
|
|
55
|
+
}>;
|
|
56
|
+
/** Container security context (supports PSS restricted fields). */
|
|
57
|
+
securityContext?: ContainerSecurityContext;
|
|
58
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
59
|
+
defaults?: {
|
|
60
|
+
deployment?: Partial<Record<string, unknown>>;
|
|
61
|
+
service?: Partial<Record<string, unknown>>;
|
|
62
|
+
serviceMonitor?: Partial<Record<string, unknown>>;
|
|
63
|
+
prometheusRule?: Partial<Record<string, unknown>>;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export interface MonitoredServiceResult {
|
|
67
|
+
deployment: InstanceType<typeof Deployment>;
|
|
68
|
+
service: InstanceType<typeof Service>;
|
|
69
|
+
serviceMonitor: InstanceType<typeof ServiceMonitor>;
|
|
70
|
+
prometheusRule?: InstanceType<typeof PrometheusRule>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Create a MonitoredService composite — returns prop objects for
|
|
74
|
+
* a Deployment, Service, ServiceMonitor, and optional PrometheusRule.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* import { MonitoredService } from "@intentius/chant-lexicon-k8s";
|
|
79
|
+
*
|
|
80
|
+
* const { deployment, service, serviceMonitor, prometheusRule } = MonitoredService({
|
|
81
|
+
* name: "api",
|
|
82
|
+
* image: "api:1.0",
|
|
83
|
+
* port: 8080,
|
|
84
|
+
* metricsPort: 9090,
|
|
85
|
+
* alertRules: [
|
|
86
|
+
* { name: "HighErrorRate", expr: 'rate(http_errors_total[5m]) > 0.1', for: "5m", severity: "critical" },
|
|
87
|
+
* ],
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export declare const MonitoredService: import("@intentius/chant").CompositeDefinition<MonitoredServiceProps, import("@intentius/chant").CompositeMembers>;
|
|
92
|
+
//# sourceMappingURL=monitored-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitored-service.d.ts","sourceRoot":"","sources":["../../src/composites/monitored-service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD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 -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NamespaceEnv composite — Namespace + optional ResourceQuota + LimitRange + NetworkPolicy.
|
|
3
|
+
*
|
|
4
|
+
* A higher-level construct for multi-tenant namespace provisioning with
|
|
5
|
+
* resource guardrails and network isolation.
|
|
6
|
+
*/
|
|
7
|
+
import { Namespace, ResourceQuota, LimitRange, NetworkPolicy } from "../generated/index.js";
|
|
8
|
+
export interface NamespaceEnvProps {
|
|
9
|
+
/** Namespace name. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Total namespace CPU quota (e.g., "8"). */
|
|
12
|
+
cpuQuota?: string;
|
|
13
|
+
/** Total namespace memory quota (e.g., "16Gi"). */
|
|
14
|
+
memoryQuota?: string;
|
|
15
|
+
/** Maximum pods in namespace. */
|
|
16
|
+
maxPods?: number;
|
|
17
|
+
/** LimitRange default CPU request (e.g., "100m"). */
|
|
18
|
+
defaultCpuRequest?: string;
|
|
19
|
+
/** LimitRange default memory request (e.g., "128Mi"). */
|
|
20
|
+
defaultMemoryRequest?: string;
|
|
21
|
+
/** LimitRange default CPU limit (e.g., "500m"). */
|
|
22
|
+
defaultCpuLimit?: string;
|
|
23
|
+
/** LimitRange default memory limit (e.g., "512Mi"). */
|
|
24
|
+
defaultMemoryLimit?: string;
|
|
25
|
+
/** Create default-deny ingress NetworkPolicy (default: true). */
|
|
26
|
+
defaultDenyIngress?: boolean;
|
|
27
|
+
/** Create default-deny egress NetworkPolicy (default: false). */
|
|
28
|
+
defaultDenyEgress?: boolean;
|
|
29
|
+
/** Additional labels to apply to all resources. */
|
|
30
|
+
labels?: Record<string, string>;
|
|
31
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
32
|
+
defaults?: {
|
|
33
|
+
namespace?: Partial<Record<string, unknown>>;
|
|
34
|
+
resourceQuota?: Partial<Record<string, unknown>>;
|
|
35
|
+
limitRange?: Partial<Record<string, unknown>>;
|
|
36
|
+
networkPolicy?: Partial<Record<string, unknown>>;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface NamespaceEnvResult {
|
|
40
|
+
namespace: InstanceType<typeof Namespace>;
|
|
41
|
+
resourceQuota?: InstanceType<typeof ResourceQuota>;
|
|
42
|
+
limitRange?: InstanceType<typeof LimitRange>;
|
|
43
|
+
networkPolicy?: InstanceType<typeof NetworkPolicy>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create a NamespaceEnv composite — returns prop objects for
|
|
47
|
+
* a Namespace, optional ResourceQuota, LimitRange, and NetworkPolicy.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* import { NamespaceEnv } from "@intentius/chant-lexicon-k8s";
|
|
52
|
+
*
|
|
53
|
+
* const { namespace, resourceQuota, limitRange, networkPolicy } = NamespaceEnv({
|
|
54
|
+
* name: "team-alpha",
|
|
55
|
+
* cpuQuota: "8",
|
|
56
|
+
* memoryQuota: "16Gi",
|
|
57
|
+
* defaultCpuRequest: "100m",
|
|
58
|
+
* defaultMemoryRequest: "128Mi",
|
|
59
|
+
* defaultDenyIngress: true,
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare const NamespaceEnv: import("@intentius/chant").CompositeDefinition<NamespaceEnvProps, import("@intentius/chant").CompositeMembers>;
|
|
64
|
+
//# sourceMappingURL=namespace-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace-env.d.ts","sourceRoot":"","sources":["../../src/composites/namespace-env.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEnF,MAAM,WAAW,iBAAiB;IAChC,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,WAAW,C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
|
|
|
1
|
+
/**
|
|
2
|
+
* NetworkIsolatedApp composite — Deployment + Service + NetworkPolicy.
|
|
3
|
+
*
|
|
4
|
+
* Per-app allow rules beyond NamespaceEnv's default-deny.
|
|
5
|
+
* Creates fine-grained ingress/egress policies for a single application.
|
|
6
|
+
*/
|
|
7
|
+
import { Deployment, Service, NetworkPolicy } from "../generated/index.js";
|
|
8
|
+
import type { ContainerSecurityContext } from "./security-context.js";
|
|
9
|
+
export interface NetworkPolicyPeer {
|
|
10
|
+
/** Pod selector for the peer. */
|
|
11
|
+
podSelector?: Record<string, string>;
|
|
12
|
+
/** Namespace selector for the peer. */
|
|
13
|
+
namespaceSelector?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
export interface NetworkPolicyEgressPeer extends NetworkPolicyPeer {
|
|
16
|
+
/** Allowed ports for egress. */
|
|
17
|
+
ports?: Array<{
|
|
18
|
+
port: number;
|
|
19
|
+
protocol?: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
export interface NetworkIsolatedAppProps {
|
|
23
|
+
/** Application name — used in metadata and labels. */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Container image. */
|
|
26
|
+
image: string;
|
|
27
|
+
/** Container port (default: 80). */
|
|
28
|
+
port?: number;
|
|
29
|
+
/** Number of replicas (default: 2). */
|
|
30
|
+
replicas?: number;
|
|
31
|
+
/** Allowed ingress sources. */
|
|
32
|
+
allowIngressFrom?: NetworkPolicyPeer[];
|
|
33
|
+
/** Allowed egress destinations. */
|
|
34
|
+
allowEgressTo?: NetworkPolicyEgressPeer[];
|
|
35
|
+
/** Additional labels to apply to all resources. */
|
|
36
|
+
labels?: Record<string, string>;
|
|
37
|
+
/** CPU limit (default: "500m"). */
|
|
38
|
+
cpuLimit?: string;
|
|
39
|
+
/** Memory limit (default: "256Mi"). */
|
|
40
|
+
memoryLimit?: string;
|
|
41
|
+
/** CPU request (default: "100m"). */
|
|
42
|
+
cpuRequest?: string;
|
|
43
|
+
/** Memory request (default: "128Mi"). */
|
|
44
|
+
memoryRequest?: 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
|
+
/** Container security context (supports PSS restricted fields). */
|
|
53
|
+
securityContext?: ContainerSecurityContext;
|
|
54
|
+
/** Per-member defaults for fine-grained overrides. */
|
|
55
|
+
defaults?: {
|
|
56
|
+
deployment?: Partial<Record<string, unknown>>;
|
|
57
|
+
service?: Partial<Record<string, unknown>>;
|
|
58
|
+
networkPolicy?: Partial<Record<string, unknown>>;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export interface NetworkIsolatedAppResult {
|
|
62
|
+
deployment: InstanceType<typeof Deployment>;
|
|
63
|
+
service: InstanceType<typeof Service>;
|
|
64
|
+
networkPolicy: InstanceType<typeof NetworkPolicy>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create a NetworkIsolatedApp composite — returns prop objects for
|
|
68
|
+
* a Deployment, Service, and NetworkPolicy.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* import { NetworkIsolatedApp } from "@intentius/chant-lexicon-k8s";
|
|
73
|
+
*
|
|
74
|
+
* const { deployment, service, networkPolicy } = NetworkIsolatedApp({
|
|
75
|
+
* name: "api",
|
|
76
|
+
* image: "api:1.0",
|
|
77
|
+
* port: 8080,
|
|
78
|
+
* allowIngressFrom: [
|
|
79
|
+
* { podSelector: { "app.kubernetes.io/name": "frontend" } },
|
|
80
|
+
* ],
|
|
81
|
+
* allowEgressTo: [
|
|
82
|
+
* { podSelector: { "app.kubernetes.io/name": "postgres" }, ports: [{ port: 5432 }] },
|
|
83
|
+
* ],
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export declare const NetworkIsolatedApp: import("@intentius/chant").CompositeDefinition<NetworkIsolatedAppProps, import("@intentius/chant").CompositeMembers>;
|
|
88
|
+
//# sourceMappingURL=network-isolated-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-isolated-app.d.ts","sourceRoot":"","sources":["../../src/composites/network-isolated-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,gCAAgC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,mCAAmC;IACnC,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAu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