@intentius/chant-lexicon-k8s 0.100.0 → 0.101.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/composites/catalog.d.ts.map +1 -1
- package/dist/composites/gke-otel-collector.d.ts.map +1 -1
- package/dist/composites/otel-collector-agent.d.ts +5 -1
- package/dist/composites/otel-collector-agent.d.ts.map +1 -1
- package/dist/composites/otel-collector-gateway.d.ts +37 -52
- package/dist/composites/otel-collector-gateway.d.ts.map +1 -1
- package/dist/composites/otel-collector-rbac.d.ts +74 -0
- package/dist/composites/otel-collector-rbac.d.ts.map +1 -0
- package/dist/composites/otel-collector-shape.d.ts +7 -0
- package/dist/composites/otel-collector-shape.d.ts.map +1 -1
- package/dist/composites/otel-collector.d.ts +8 -20
- package/dist/composites/otel-collector.d.ts.map +1 -1
- package/dist/import/live-export.d.ts +5 -0
- package/dist/import/live-export.d.ts.map +1 -1
- package/dist/integrity.json +4 -3
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/otel-placement-helpers.d.ts +5 -1
- package/dist/lint/post-synth/otel-placement-helpers.d.ts.map +1 -1
- package/dist/lint/post-synth/wk8604.d.ts +19 -0
- package/dist/lint/post-synth/wk8604.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/okf/index.md +1 -0
- package/dist/okf/rules/WK8604.md +11 -0
- package/dist/rules/otel-placement-helpers.ts +7 -11
- package/dist/rules/wk8604.ts +29 -0
- package/package.json +3 -3
- package/src/composites/__snapshots__/gke-otel-collector.snapshot.test.ts.snap +2 -68
- package/src/composites/catalog.ts +6 -0
- package/src/composites/gke-otel-collector.snapshot.test.ts +3 -1
- package/src/composites/gke-otel-collector.ts +8 -2
- package/src/composites/otel-collector-agent.ts +6 -9
- package/src/composites/otel-collector-gateway.test.ts +102 -5
- package/src/composites/otel-collector-gateway.ts +96 -18
- package/src/composites/otel-collector-rbac.test.ts +114 -0
- package/src/composites/otel-collector-rbac.ts +144 -0
- package/src/composites/otel-collector-shape.ts +19 -0
- package/src/composites/otel-collector.ts +25 -34
- package/src/import/embedded-live.test.ts +138 -0
- package/src/import/live-export.ts +10 -2
- package/src/lint/audit-catalog.ts +1 -0
- package/src/lint/post-synth/index.ts +2 -0
- package/src/lint/post-synth/otel-placement-helpers.ts +7 -11
- package/src/lint/post-synth/otel-placement.test.ts +35 -0
- package/src/lint/post-synth/wk8604.ts +29 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8604: the otel config checks over collector configs in ConfigMaps
|
|
3
|
+
*
|
|
4
|
+
* `OtelCollector`, `OtelCollectorGateway`, `GkeOtelCollector` and hand-written
|
|
5
|
+
* manifests carry the collector config as a string under a ConfigMap data key.
|
|
6
|
+
* `chant build` gives each lexicon's checks only that lexicon's output, so the
|
|
7
|
+
* otel lexicon's config checks never see a config that lives in the k8s output
|
|
8
|
+
* (chant #2930). This check runs them there: every ConfigMap data value that
|
|
9
|
+
* parses as a collector config (a `service.pipelines` map) goes through the
|
|
10
|
+
* otel lexicon's `validateCollectorConfig`.
|
|
11
|
+
*
|
|
12
|
+
* Findings keep the otel rule ids (OTEL101-OTEL106, OTEL112-OTEL117, and any config
|
|
13
|
+
* check the otel lexicon adds later), so `lint.rules` and suppressions name
|
|
14
|
+
* one id wherever the config lives. Each message names the ConfigMap's
|
|
15
|
+
* namespace, name and key. Needs only the k8s lexicon in the project.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
|
19
|
+
import { collectorConfigDiagnostics } from "@intentius/chant-lexicon-otel/lint/post-synth/otel-helpers";
|
|
20
|
+
|
|
21
|
+
export const wk8604: PostSynthCheck = {
|
|
22
|
+
id: "WK8604",
|
|
23
|
+
description:
|
|
24
|
+
"OpenTelemetry Collector config in a ConfigMap fails the otel lexicon's config checks; findings are reported under their OTEL1xx ids, naming the ConfigMap and key.",
|
|
25
|
+
|
|
26
|
+
check(ctx: PostSynthContext): PostSynthDiagnostic[] {
|
|
27
|
+
return collectorConfigDiagnostics(ctx, { configMapsOnly: true });
|
|
28
|
+
},
|
|
29
|
+
};
|