@intentius/chant-lexicon-k8s 0.7.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,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8304: SSL Redirect Without Certificate
|
|
3
|
+
*
|
|
4
|
+
* Flags Ingress resources that have `alb.ingress.kubernetes.io/ssl-redirect`
|
|
5
|
+
* annotation set but are missing `alb.ingress.kubernetes.io/certificate-arn`
|
|
6
|
+
* or don't have HTTPS in their listen-ports.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const wk8304: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=wk8304.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8304.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8304.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA0DpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8305: Ingress Port Not Matching Service
|
|
3
|
+
*
|
|
4
|
+
* Flags Ingress backends whose `service.port.number` does not match
|
|
5
|
+
* any declared port on the referenced Service in the manifest set.
|
|
6
|
+
*/
|
|
7
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
8
|
+
export declare const wk8305: PostSynthCheck;
|
|
9
|
+
//# sourceMappingURL=wk8305.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8305.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8305.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAI9G,eAAO,MAAM,MAAM,EAAE,cAoEpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8306: Container Command Starts With Flag
|
|
3
|
+
*
|
|
4
|
+
* If `command[0]` starts with `-` or `--`, it's almost certainly a mistake —
|
|
5
|
+
* the first element should be the binary/entrypoint, flags belong in `args`.
|
|
6
|
+
* This causes OCI runtime errors because the container runtime tries to
|
|
7
|
+
* execute the flag as a binary.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const wk8306: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=wk8306.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8306.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8306.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAqCpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8401: shmSize exceeds container memory limit
|
|
3
|
+
*
|
|
4
|
+
* A RayCluster pod uses an emptyDir volume with medium: Memory for /dev/shm.
|
|
5
|
+
* Kubernetes counts that memory against the container's memory limit — if the
|
|
6
|
+
* sizeLimit exceeds the container's memory limit the pod will never schedule
|
|
7
|
+
* (Kubelet rejects it with "Invalid value … must be less than or equal to memory limit").
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const wk8401: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=wk8401.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8401.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8401.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAqFpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8402: RayCluster missing spec.rayVersion
|
|
3
|
+
*
|
|
4
|
+
* KubeRay uses spec.rayVersion to select the Ray autoscaler sidecar image.
|
|
5
|
+
* Without it, KubeRay defaults to the "latest" tag — autoscaler and Ray head
|
|
6
|
+
* may run mismatched versions, leading to silent protocol failures.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const wk8402: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=wk8402.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8402.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8402.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA+BpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8403: spec.rayVersion does not match head image tag
|
|
3
|
+
*
|
|
4
|
+
* When spec.rayVersion is set but doesn't match the version in the head
|
|
5
|
+
* container image tag, the KubeRay autoscaler sidecar will run a different
|
|
6
|
+
* Ray version than the cluster. This can cause gRPC compatibility failures.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const wk8403: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=wk8403.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8403.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8403.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAgDpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
/**
|
|
3
|
+
* ARGO004: ApplicationSet template must scope to a single AppProject
|
|
4
|
+
*
|
|
5
|
+
* An `ApplicationSet` generates many Applications from one template. The
|
|
6
|
+
* template's `spec.project` should name a single, static `AppProject` so every
|
|
7
|
+
* generated Application lands in the same security boundary. If `project` is
|
|
8
|
+
* missing, the generated Applications fall back to whatever default and dodge
|
|
9
|
+
* project-level RBAC; if it is templated with a generator placeholder
|
|
10
|
+
* (`{{...}}`) the set sprays Applications across many projects, which defeats
|
|
11
|
+
* the point of an AppProject as a guardrail.
|
|
12
|
+
*
|
|
13
|
+
* Bad: new ApplicationSet({ spec: { template: { spec: { repoURL: "..." } } } }) // no project
|
|
14
|
+
* Bad: new ApplicationSet({ spec: { template: { spec: { project: "{{path.basename}}" } } } }) // templated
|
|
15
|
+
* Good: new ApplicationSet({ spec: { template: { spec: { project: "team-a" } } } })
|
|
16
|
+
*/
|
|
17
|
+
export declare const argoAppSetSingleProjectRule: LintRule;
|
|
18
|
+
//# sourceMappingURL=argo-appset-single-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argo-appset-single-project.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/argo-appset-single-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAGxF;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,2BAA2B,EAAE,QA8CzC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared AST helpers for the Argo declarative lint rules (ARGO001, ARGO004).
|
|
3
|
+
*
|
|
4
|
+
* The Argo CRDs are constructed like any other k8s resource —
|
|
5
|
+
* `new Application({ metadata, spec })` / `new ApplicationSet({ ... })`. These
|
|
6
|
+
* helpers walk the object-literal first argument so a rule can read a nested
|
|
7
|
+
* property by path without re-implementing the traversal each time.
|
|
8
|
+
*/
|
|
9
|
+
import * as ts from "typescript";
|
|
10
|
+
/**
|
|
11
|
+
* Find the object-literal first argument of every `new <Kind>(...)` expression
|
|
12
|
+
* in the file, where Kind is one of the supplied resource kinds.
|
|
13
|
+
*/
|
|
14
|
+
export declare function findResourceLiterals(sourceFile: ts.SourceFile, kinds: Set<string>): Array<{
|
|
15
|
+
kind: string;
|
|
16
|
+
literal: ts.ObjectLiteralExpression;
|
|
17
|
+
node: ts.NewExpression;
|
|
18
|
+
}>;
|
|
19
|
+
/** Read the initializer node for `key` on an object literal, if present. */
|
|
20
|
+
export declare function getProp(obj: ts.ObjectLiteralExpression, key: string): ts.Expression | undefined;
|
|
21
|
+
/** Read a nested object literal by walking `path` (each segment an object). */
|
|
22
|
+
export declare function getNestedObject(obj: ts.ObjectLiteralExpression, path: string[]): ts.ObjectLiteralExpression | undefined;
|
|
23
|
+
/** Read a string-literal property value by path (last segment is the key). */
|
|
24
|
+
export declare function getNestedString(obj: ts.ObjectLiteralExpression, path: string[]): string | undefined;
|
|
25
|
+
/** Read a boolean-literal property value by path (last segment is the key). */
|
|
26
|
+
export declare function getNestedBoolean(obj: ts.ObjectLiteralExpression, path: string[]): boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* True if the literal carries the given annotation key under
|
|
29
|
+
* `metadata.annotations`, regardless of value.
|
|
30
|
+
*/
|
|
31
|
+
export declare function hasAnnotation(obj: ts.ObjectLiteralExpression, annotationKey: string): boolean;
|
|
32
|
+
/** Line/column (1-based) for a node, for diagnostics. */
|
|
33
|
+
export declare function lineCol(sourceFile: ts.SourceFile, node: ts.Node): {
|
|
34
|
+
line: number;
|
|
35
|
+
column: number;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=argo-ast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argo-ast.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/argo-ast.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,GACjB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC,uBAAuB,CAAC;IAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAA;CAAE,CAAC,CAuBtF;AAED,4EAA4E;AAC5E,wBAAgB,OAAO,CACrB,GAAG,EAAE,EAAE,CAAC,uBAAuB,EAC/B,GAAG,EAAE,MAAM,GACV,EAAE,CAAC,UAAU,GAAG,SAAS,CAW3B;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAC7B,GAAG,EAAE,EAAE,CAAC,uBAAuB,EAC/B,IAAI,EAAE,MAAM,EAAE,GACb,EAAE,CAAC,uBAAuB,GAAG,SAAS,CAQxC;AAED,8EAA8E;AAC9E,wBAAgB,eAAe,CAC7B,GAAG,EAAE,EAAE,CAAC,uBAAuB,EAC/B,IAAI,EAAE,MAAM,EAAE,GACb,MAAM,GAAG,SAAS,CAMpB;AAED,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,EAAE,CAAC,uBAAuB,EAC/B,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,GAAG,SAAS,CASrB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,EAAE,CAAC,uBAAuB,EAC/B,aAAa,EAAE,MAAM,GACpB,OAAO,CAIT;AAED,yDAAyD;AACzD,wBAAgB,OAAO,CACrB,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAGlC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
/**
|
|
3
|
+
* ARGO001: Production Application must not enable automated prune
|
|
4
|
+
*
|
|
5
|
+
* An Argo CD `Application` whose `syncPolicy.automated.prune` is `true` lets the
|
|
6
|
+
* controller delete live resources that disappear from git. On a production
|
|
7
|
+
* Application that is a foot-gun — a bad merge can sweep away running
|
|
8
|
+
* infrastructure. Require `prune: false` for prod Applications unless the author
|
|
9
|
+
* opts in explicitly with the `argocd.chant.dev/allow-prune` annotation.
|
|
10
|
+
*
|
|
11
|
+
* "Production" is inferred from the Application name, its `metadata.namespace`,
|
|
12
|
+
* or its `spec.destination.namespace` containing `prod`.
|
|
13
|
+
*
|
|
14
|
+
* Bad: new Application({ metadata: { name: "api-prod" }, spec: { syncPolicy: { automated: { prune: true } } } })
|
|
15
|
+
* Good: new Application({ metadata: { name: "api-prod" }, spec: { syncPolicy: { automated: { prune: false } } } })
|
|
16
|
+
* Good: new Application({ metadata: { name: "api-prod", annotations: { "argocd.chant.dev/allow-prune": "true" } }, spec: { syncPolicy: { automated: { prune: true } } } })
|
|
17
|
+
*/
|
|
18
|
+
export declare const ALLOW_PRUNE_ANNOTATION = "argocd.chant.dev/allow-prune";
|
|
19
|
+
export declare const argoAutomatedPruneRule: LintRule;
|
|
20
|
+
//# sourceMappingURL=argo-automated-prune.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argo-automated-prune.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/argo-automated-prune.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAWxF;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AAWrE,eAAO,MAAM,sBAAsB,EAAE,QAmCpC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
/**
|
|
3
|
+
* WK8001: Hardcoded Namespace
|
|
4
|
+
*
|
|
5
|
+
* Detects hardcoded namespace strings in Kubernetes resource constructors.
|
|
6
|
+
* Namespaces should be parameterized or derived from configuration, not
|
|
7
|
+
* hardcoded as string literals.
|
|
8
|
+
*
|
|
9
|
+
* Bad: new Deployment({ metadata: { namespace: "production" } })
|
|
10
|
+
* Good: new Deployment({ metadata: { namespace: config.namespace } })
|
|
11
|
+
*/
|
|
12
|
+
export declare const hardcodedNamespaceRule: LintRule;
|
|
13
|
+
//# sourceMappingURL=hardcoded-namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardcoded-namespace.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/hardcoded-namespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAGxF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,QA0CpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latest-image-tag.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/latest-image-tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AA4DxF,eAAO,MAAM,kBAAkB,EAAE,QA4DhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-resource-limits.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/missing-resource-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAuBxF,eAAO,MAAM,yBAAyB,EAAE,QAuFvC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CompletionContext, CompletionItem } from "@intentius/chant/lsp/types";
|
|
2
|
+
/**
|
|
3
|
+
* Provide Kubernetes resource completions based on context.
|
|
4
|
+
*/
|
|
5
|
+
export declare function k8sCompletions(ctx: CompletionContext): CompletionItem[];
|
|
6
|
+
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/lsp/completions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAapF;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,EAAE,CAEvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../src/lsp/hover.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAa1E;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAEjE"}
|
package/dist/manifest.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for K8s `MicroTime` fields.
|
|
3
|
+
*
|
|
4
|
+
* The K8s API server validates fields like `coordination.k8s.io/v1.Lease.spec.renewTime`
|
|
5
|
+
* (kind: MicroTime) with the exact format `2006-01-02T15:04:05.000000Z07:00`
|
|
6
|
+
* — microsecond precision, always 6 fractional digits, UTC offset.
|
|
7
|
+
*
|
|
8
|
+
* The naive JS `Date.toISOString()` (millisecond precision, 3 fractional
|
|
9
|
+
* digits) is accepted by the API server too — the schema is more permissive
|
|
10
|
+
* than the documented format string — but `time.RFC3339Nano`-style strings
|
|
11
|
+
* with nanosecond precision (9 fractional digits) are rejected as
|
|
12
|
+
* `422 Unprocessable Entity` with:
|
|
13
|
+
*
|
|
14
|
+
* parsing time "...754Z" as "2006-01-02T15:04:05.000000Z07:00":
|
|
15
|
+
* cannot parse "754Z" as "Z07:00"
|
|
16
|
+
*
|
|
17
|
+
* Pass a JS Date through `microTime()` to get a string the API server
|
|
18
|
+
* always accepts. This is the canonical way to populate MicroTime fields
|
|
19
|
+
* when authoring chant resources by hand.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Format a Date as a K8s MicroTime string (UTC, exactly 6 fractional digits).
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* import { Lease } from "@intentius/chant-lexicon-k8s";
|
|
26
|
+
* import { microTime } from "@intentius/chant-lexicon-k8s/micro-time";
|
|
27
|
+
*
|
|
28
|
+
* new Lease({
|
|
29
|
+
* metadata: { name: "my-lease", namespace: "default" },
|
|
30
|
+
* spec: {
|
|
31
|
+
* holderIdentity: "node-1",
|
|
32
|
+
* leaseDurationSeconds: 15,
|
|
33
|
+
* renewTime: microTime(new Date()),
|
|
34
|
+
* },
|
|
35
|
+
* });
|
|
36
|
+
*/
|
|
37
|
+
export declare function microTime(date?: Date): string;
|
|
38
|
+
/**
|
|
39
|
+
* Returns true if `value` is a string in the K8s MicroTime canonical format
|
|
40
|
+
* (UTC, microsecond precision). Useful in lint/validation contexts.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isMicroTimeFormatted(value: string): boolean;
|
|
43
|
+
//# sourceMappingURL=micro-time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"micro-time.d.ts","sourceRoot":"","sources":["../src/micro-time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,IAAiB,GAAG,MAAM,CAKzD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-cli.d.ts","sourceRoot":"","sources":["../src/package-cli.ts"],"names":[],"mappings":";AACA;;GAEG"}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kubernetes lexicon plugin.
|
|
3
|
+
*
|
|
4
|
+
* Provides serializer, template detection, code generation,
|
|
5
|
+
* lint rules, and LSP/MCP integration for Kubernetes manifests.
|
|
6
|
+
*/
|
|
7
|
+
import type { LexiconPlugin } from "@intentius/chant/lexicon";
|
|
8
|
+
export declare const k8sPlugin: LexiconPlugin;
|
|
9
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAqC,MAAM,0BAA0B,CAAC;AAkBjG,eAAO,MAAM,SAAS,EAAE,aAwkBvB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kubernetes YAML serializer.
|
|
3
|
+
*
|
|
4
|
+
* Converts Chant declarables to multi-document K8s YAML output with
|
|
5
|
+
* apiVersion, kind, metadata, and spec structure.
|
|
6
|
+
*/
|
|
7
|
+
import type { Serializer } from "@intentius/chant/serializer";
|
|
8
|
+
/**
|
|
9
|
+
* Kubernetes YAML serializer implementation.
|
|
10
|
+
*/
|
|
11
|
+
export declare const k8sSerializer: Serializer;
|
|
12
|
+
//# sourceMappingURL=serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAsC,MAAM,6BAA6B,CAAC;AA2IlG;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,UA2I3B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kubernetes OpenAPI schema fetching — downloads the Swagger 2.0 spec
|
|
3
|
+
* and caches it locally.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Pinned Kubernetes version for schema download.
|
|
7
|
+
*/
|
|
8
|
+
export declare const K8S_SCHEMA_VERSION = "v1.32.0";
|
|
9
|
+
/**
|
|
10
|
+
* Get the cache file path for the K8s schema.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCachePath(version?: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Fetch the Kubernetes OpenAPI Swagger spec, returning the raw JSON buffer.
|
|
15
|
+
* Uses local file caching with 24-hour TTL.
|
|
16
|
+
*
|
|
17
|
+
* @param force Bypass cache and download fresh.
|
|
18
|
+
* @param version Kubernetes version tag. Defaults to {@link K8S_SCHEMA_VERSION}.
|
|
19
|
+
*/
|
|
20
|
+
export declare function fetchK8sSchema(force?: boolean, version?: string): Promise<Buffer>;
|
|
21
|
+
/**
|
|
22
|
+
* Fetch the K8s schema and return it as a Map<typeName, Buffer>
|
|
23
|
+
* compatible with the generatePipeline fetchSchemas callback.
|
|
24
|
+
*
|
|
25
|
+
* The K8s schema is a single document, so we return a single entry
|
|
26
|
+
* keyed by "Kubernetes::OpenAPI" — the parse step will split it
|
|
27
|
+
* into multiple resources.
|
|
28
|
+
*/
|
|
29
|
+
export declare function fetchSchemas(force?: boolean, version?: string): Promise<Map<string, Buffer>>;
|
|
30
|
+
/**
|
|
31
|
+
* Clear the cached schema file.
|
|
32
|
+
*/
|
|
33
|
+
export declare function clearCache(version?: string): void;
|
|
34
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/spec/fetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;GAEG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAS5C;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASvF;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAKlG;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAEjD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kubernetes OpenAPI Swagger 2.0 parser.
|
|
3
|
+
*
|
|
4
|
+
* Parses the single swagger.json into multiple K8sParseResult entries —
|
|
5
|
+
* one per resource identified by `x-kubernetes-group-version-kind`.
|
|
6
|
+
* Property types (Container, PodSpec, Volume, etc.) are extracted as
|
|
7
|
+
* nested property types within their parent resources.
|
|
8
|
+
*/
|
|
9
|
+
import type { PropertyConstraints } from "@intentius/chant/codegen/json-schema";
|
|
10
|
+
export type { PropertyConstraints };
|
|
11
|
+
export interface ParsedProperty {
|
|
12
|
+
name: string;
|
|
13
|
+
tsType: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
description?: string;
|
|
16
|
+
enum?: string[];
|
|
17
|
+
constraints: PropertyConstraints;
|
|
18
|
+
}
|
|
19
|
+
export interface ParsedPropertyType {
|
|
20
|
+
name: string;
|
|
21
|
+
/** The definition key in the original schema */
|
|
22
|
+
defType: string;
|
|
23
|
+
properties: ParsedProperty[];
|
|
24
|
+
}
|
|
25
|
+
export interface ParsedEnum {
|
|
26
|
+
name: string;
|
|
27
|
+
values: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface ParsedResource {
|
|
30
|
+
typeName: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
properties: ParsedProperty[];
|
|
33
|
+
attributes: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
tsType: string;
|
|
36
|
+
}>;
|
|
37
|
+
deprecatedProperties: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface GroupVersionKind {
|
|
40
|
+
group: string;
|
|
41
|
+
version: string;
|
|
42
|
+
kind: string;
|
|
43
|
+
}
|
|
44
|
+
export interface K8sParseResult {
|
|
45
|
+
resource: ParsedResource;
|
|
46
|
+
propertyTypes: ParsedPropertyType[];
|
|
47
|
+
enums: ParsedEnum[];
|
|
48
|
+
gvk: GroupVersionKind;
|
|
49
|
+
/** Whether this entity is a property type (nested inside resources) */
|
|
50
|
+
isProperty?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Parse the Kubernetes OpenAPI swagger.json into multiple resource results.
|
|
54
|
+
* Returns one result per top-level resource identified by x-kubernetes-group-version-kind.
|
|
55
|
+
*/
|
|
56
|
+
export declare function parseK8sSwagger(data: string | Buffer): K8sParseResult[];
|
|
57
|
+
/**
|
|
58
|
+
* Convert GVK to our type name convention: K8s::{Group}::{Kind}
|
|
59
|
+
*/
|
|
60
|
+
export declare function gvkToTypeName(gvk: GroupVersionKind): string;
|
|
61
|
+
/**
|
|
62
|
+
* Convert GVK to apiVersion string for serialization.
|
|
63
|
+
*/
|
|
64
|
+
export declare function gvkToApiVersion(gvk: GroupVersionKind): string;
|
|
65
|
+
/**
|
|
66
|
+
* Extract short name: "K8s::Apps::Deployment" → "Deployment"
|
|
67
|
+
*/
|
|
68
|
+
export declare function k8sShortName(typeName: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Extract service/group name: "K8s::Apps::Deployment" → "Apps"
|
|
71
|
+
*/
|
|
72
|
+
export declare function k8sServiceName(typeName: string): string;
|
|
73
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/spec/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAShF,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,GAAG,EAAE,gBAAgB,CAAC;IACtB,uEAAuE;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA8FD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,EAAE,CA+BvE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,gBAAgB,GAAG,MAAM,CAG3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,gBAAgB,GAAG,MAAM,CAK7D;AA6PD;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-cli.d.ts","sourceRoot":"","sources":["../src/validate-cli.ts"],"names":[],"mappings":";AACA;;GAEG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate generated lexicon-k8s artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper around the core validation framework
|
|
5
|
+
* with Kubernetes-specific configuration.
|
|
6
|
+
*/
|
|
7
|
+
import { type ValidateResult } from "@intentius/chant/codegen/validate";
|
|
8
|
+
export type { ValidateCheck, ValidateResult } from "@intentius/chant/codegen/validate";
|
|
9
|
+
/**
|
|
10
|
+
* Validate the generated lexicon-k8s artifacts.
|
|
11
|
+
*/
|
|
12
|
+
export declare function validate(opts?: {
|
|
13
|
+
basePath?: string;
|
|
14
|
+
}): Promise<ValidateResult>;
|
|
15
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAElG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAuBvF;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAQpF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kubernetes pseudo-parameters / well-known variables.
|
|
3
|
+
*
|
|
4
|
+
* Unlike AWS which has built-in pseudo-parameters (AWS::Region, etc.),
|
|
5
|
+
* Kubernetes doesn't have equivalent built-in variables. This module
|
|
6
|
+
* provides common label key constants for use in resource definitions.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Well-known Kubernetes label keys from the standard label taxonomy.
|
|
10
|
+
* These are string constants, not runtime-resolved pseudo-parameters.
|
|
11
|
+
*/
|
|
12
|
+
export declare const K8sLabels: {
|
|
13
|
+
/** app.kubernetes.io/name */
|
|
14
|
+
readonly AppName: "app.kubernetes.io/name";
|
|
15
|
+
/** app.kubernetes.io/instance */
|
|
16
|
+
readonly AppInstance: "app.kubernetes.io/instance";
|
|
17
|
+
/** app.kubernetes.io/version */
|
|
18
|
+
readonly AppVersion: "app.kubernetes.io/version";
|
|
19
|
+
/** app.kubernetes.io/component */
|
|
20
|
+
readonly AppComponent: "app.kubernetes.io/component";
|
|
21
|
+
/** app.kubernetes.io/part-of */
|
|
22
|
+
readonly AppPartOf: "app.kubernetes.io/part-of";
|
|
23
|
+
/** app.kubernetes.io/managed-by */
|
|
24
|
+
readonly AppManagedBy: "app.kubernetes.io/managed-by";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Well-known Kubernetes annotation keys.
|
|
28
|
+
*/
|
|
29
|
+
export declare const K8sAnnotations: {
|
|
30
|
+
/** kubernetes.io/change-cause */
|
|
31
|
+
readonly ChangeCause: "kubernetes.io/change-cause";
|
|
32
|
+
/** kubernetes.io/description */
|
|
33
|
+
readonly Description: "kubernetes.io/description";
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=variables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../src/variables.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,SAAS;IACpB,6BAA6B;;IAE7B,iCAAiC;;IAEjC,gCAAgC;;IAEhC,kCAAkC;;IAElC,gCAAgC;;IAEhC,mCAAmC;;CAE3B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB,iCAAiC;;IAEjC,gCAAgC;;CAExB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-k8s",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Kubernetes lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -29,8 +29,26 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
|
-
".":
|
|
33
|
-
|
|
32
|
+
".": {
|
|
33
|
+
"development": "./src/index.ts",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"default": "./src/index.ts"
|
|
36
|
+
},
|
|
37
|
+
"./*": {
|
|
38
|
+
"development": "./src/*.ts",
|
|
39
|
+
"types": "./dist/*.d.ts",
|
|
40
|
+
"default": "./src/*.ts"
|
|
41
|
+
},
|
|
42
|
+
"./detect": {
|
|
43
|
+
"development": "./src/detect.ts",
|
|
44
|
+
"types": "./dist/detect.d.ts",
|
|
45
|
+
"default": "./src/detect.ts"
|
|
46
|
+
},
|
|
47
|
+
"./lint/post-synth": {
|
|
48
|
+
"development": "./src/lint/post-synth/index.ts",
|
|
49
|
+
"types": "./dist/lint/post-synth/index.d.ts",
|
|
50
|
+
"default": "./src/lint/post-synth/index.ts"
|
|
51
|
+
},
|
|
34
52
|
"./manifest": "./dist/manifest.json",
|
|
35
53
|
"./meta": "./dist/meta.json",
|
|
36
54
|
"./types": "./dist/types/index.d.ts"
|
|
@@ -40,7 +58,8 @@
|
|
|
40
58
|
"bundle": "tsx src/package-cli.ts",
|
|
41
59
|
"validate": "tsx src/validate-cli.ts",
|
|
42
60
|
"docs": "tsx src/codegen/docs-cli.ts",
|
|
43
|
-
"prepack": "npm run generate && npm run bundle && npm run validate"
|
|
61
|
+
"prepack": "npm run generate && npm run bundle && npm run validate && npm run build",
|
|
62
|
+
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete"
|
|
44
63
|
},
|
|
45
64
|
"dependencies": {
|
|
46
65
|
"js-yaml": "^4.1.1",
|
|
@@ -51,6 +70,6 @@
|
|
|
51
70
|
"typescript": "^5.9.3"
|
|
52
71
|
},
|
|
53
72
|
"peerDependencies": {
|
|
54
|
-
"@intentius/chant": "^0.
|
|
73
|
+
"@intentius/chant": "^0.8.0"
|
|
55
74
|
}
|
|
56
75
|
}
|
|
@@ -97,7 +97,7 @@ export interface ArgoAppForOptions {
|
|
|
97
97
|
defaults?: { application?: Partial<Record<string, unknown>> };
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export
|
|
100
|
+
export type ArgoAppForResult = {
|
|
101
101
|
application: InstanceType<typeof ApplicationResource>;
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -196,7 +196,7 @@ export interface ArgoAppSetForRegionsOptions {
|
|
|
196
196
|
defaults?: { applicationSet?: Partial<Record<string, unknown>> };
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
export
|
|
199
|
+
export type ArgoAppSetForRegionsResult = {
|
|
200
200
|
applicationSet: InstanceType<typeof ApplicationSetResource>;
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -324,7 +324,7 @@ export interface RegisterArgoClusterOptions {
|
|
|
324
324
|
defaults?: { secret?: Partial<Record<string, unknown>> };
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
export
|
|
327
|
+
export type RegisterArgoClusterResult = {
|
|
328
328
|
secret: InstanceType<typeof SecretResource>;
|
|
329
329
|
}
|
|
330
330
|
|
package/src/detect.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Edge-safe template detection for k8s — extracted from plugin.ts so it imports
|
|
2
|
+
* without the lint rules (and the TypeScript compiler they pull in). See #426. */
|
|
3
|
+
export function detectTemplate(data: unknown): boolean {
|
|
4
|
+
if (typeof data !== "object" || data === null) return false;
|
|
5
|
+
const obj = data as Record<string, unknown>;
|
|
6
|
+
// K8s manifests have apiVersion + kind
|
|
7
|
+
if (typeof obj.apiVersion === "string" && typeof obj.kind === "string") return true;
|
|
8
|
+
return false;
|
|
9
|
+
}
|