@intentius/chant-lexicon-k8s 0.106.4 → 0.108.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/codegen/naming.d.ts.map +1 -1
- package/dist/composites/catalog.d.ts.map +1 -1
- package/dist/composites/index.d.ts +2 -0
- package/dist/composites/index.d.ts.map +1 -1
- package/dist/composites/otel-collector-shape.d.ts +2 -0
- package/dist/composites/otel-collector-shape.d.ts.map +1 -1
- package/dist/composites/otel-operator-collector.d.ts +101 -0
- package/dist/composites/otel-operator-collector.d.ts.map +1 -0
- package/dist/config-schema.d.ts +115 -1
- package/dist/config-schema.d.ts.map +1 -1
- package/dist/config.d.ts +58 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/crd/crd-sources.d.ts.map +1 -1
- package/dist/crd/loader.d.ts +4 -0
- package/dist/crd/loader.d.ts.map +1 -1
- package/dist/crd/parser.d.ts +5 -0
- package/dist/crd/parser.d.ts.map +1 -1
- package/dist/crd/project-codegen.d.ts +33 -0
- package/dist/crd/project-codegen.d.ts.map +1 -0
- package/dist/generated/index.d.d.ts +172 -2
- package/dist/generated/index.d.ts +301 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/group-namespace.d.ts.map +1 -1
- package/dist/import/embedded.d.ts +3 -0
- package/dist/import/embedded.d.ts.map +1 -1
- package/dist/include/entity.d.ts +73 -0
- package/dist/include/entity.d.ts.map +1 -0
- package/dist/include/resolve.d.ts +29 -0
- package/dist/include/resolve.d.ts.map +1 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +17 -10
- package/dist/kustomize/rendered-entity.d.ts +15 -1
- package/dist/kustomize/rendered-entity.d.ts.map +1 -1
- package/dist/kustomize/root.d.ts +11 -2
- package/dist/kustomize/root.d.ts.map +1 -1
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/post-synth/crd-schema-helpers.d.ts +5 -1
- package/dist/lint/post-synth/crd-schema-helpers.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/monitoring-selection-helpers.d.ts +55 -0
- package/dist/lint/post-synth/monitoring-selection-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/otel-placement-helpers.d.ts +16 -0
- package/dist/lint/post-synth/otel-placement-helpers.d.ts.map +1 -1
- package/dist/lint/post-synth/wk8604.d.ts +6 -0
- package/dist/lint/post-synth/wk8604.d.ts.map +1 -1
- package/dist/lint/post-synth/wk8605.d.ts.map +1 -1
- package/dist/lint/post-synth/wk8606.d.ts +17 -0
- package/dist/lint/post-synth/wk8606.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8701.d.ts +17 -0
- package/dist/lint/post-synth/wk8701.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8702.d.ts +17 -0
- package/dist/lint/post-synth/wk8702.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8703.d.ts +17 -0
- package/dist/lint/post-synth/wk8703.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8704.d.ts +21 -0
- package/dist/lint/post-synth/wk8704.d.ts.map +1 -0
- package/dist/lint/post-synth/wk8705.d.ts +18 -0
- package/dist/lint/post-synth/wk8705.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/meta.json +2284 -370
- package/dist/okf/index.md +20 -1
- package/dist/okf/rules/WK8604.md +6 -2
- package/dist/okf/rules/WK8605.md +4 -0
- package/dist/okf/rules/WK8606.md +15 -0
- package/dist/okf/rules/WK8701.md +18 -0
- package/dist/okf/rules/WK8702.md +20 -0
- package/dist/okf/rules/WK8703.md +17 -0
- package/dist/okf/rules/WK8704.md +22 -0
- package/dist/okf/rules/WK8705.md +18 -0
- package/dist/okf/types/Alertmanager.md +18 -0
- package/dist/okf/types/AlertmanagerConfig.md +18 -0
- package/dist/okf/types/ClusterObservability.md +14 -0
- package/dist/okf/types/CronJob.md +1 -0
- package/dist/okf/types/DaemonSet.md +1 -0
- package/dist/okf/types/Instrumentation.md +14 -0
- package/dist/okf/types/MonitoringProbe.md +14 -0
- package/dist/okf/types/Namespace.md +3 -0
- package/dist/okf/types/OpAMPBridge.md +14 -0
- package/dist/okf/types/OpenTelemetryCollector.md +19 -0
- package/dist/okf/types/Pod.md +1 -0
- package/dist/okf/types/PodMonitor.md +20 -0
- package/dist/okf/types/Prometheus.md +21 -0
- package/dist/okf/types/PrometheusAgent.md +18 -0
- package/dist/okf/types/PrometheusRule.md +6 -1
- package/dist/okf/types/ScrapeConfig.md +19 -0
- package/dist/okf/types/Service.md +1 -0
- package/dist/okf/types/ServiceMonitor.md +7 -1
- package/dist/okf/types/StatefulSet.md +1 -0
- package/dist/okf/types/TargetAllocator.md +14 -0
- package/dist/okf/types/ThanosRuler.md +18 -0
- package/dist/patch/json-patch.d.ts +51 -0
- package/dist/patch/json-patch.d.ts.map +1 -0
- package/dist/patch/rendered-patch.d.ts +90 -0
- package/dist/patch/rendered-patch.d.ts.map +1 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/project-kinds.d.ts +46 -0
- package/dist/project-kinds.d.ts.map +1 -0
- package/dist/rules/crd-schema-helpers.ts +10 -2
- package/dist/rules/monitoring-selection-helpers.ts +185 -0
- package/dist/rules/otel-placement-helpers.ts +61 -1
- package/dist/rules/wk8601.ts +1 -1
- package/dist/rules/wk8603.ts +1 -1
- package/dist/rules/wk8604.ts +8 -2
- package/dist/rules/wk8605.ts +5 -3
- package/dist/rules/wk8606.ts +27 -0
- package/dist/rules/wk8701.ts +37 -0
- package/dist/rules/wk8702.ts +43 -0
- package/dist/rules/wk8703.ts +37 -0
- package/dist/rules/wk8704.ts +134 -0
- package/dist/rules/wk8705.ts +45 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/types/index.d.ts +172 -2
- package/package.json +3 -3
- package/src/codegen/naming.ts +15 -1
- package/src/composites/catalog.ts +105 -0
- package/src/composites/index.ts +2 -0
- package/src/composites/otel-collector-shape.ts +2 -0
- package/src/composites/otel-operator-collector.test.ts +267 -0
- package/src/composites/otel-operator-collector.ts +221 -0
- package/src/config-augmentation.test.ts +28 -0
- package/src/config-schema.ts +47 -1
- package/src/config.ts +44 -3
- package/src/crd/crd-sources.ts +41 -2
- package/src/crd/loader.ts +1 -1
- package/src/crd/parser.ts +9 -5
- package/src/crd/project-codegen.test.ts +239 -0
- package/src/crd/project-codegen.ts +327 -0
- package/src/generated/index.d.ts +172 -2
- package/src/generated/index.ts +303 -2
- package/src/generated/lexicon-k8s.json +2284 -370
- package/src/generated/operations.json +208 -0
- package/src/group-namespace.test.ts +4 -0
- package/src/group-namespace.ts +4 -0
- package/src/import/embedded.ts +26 -0
- package/src/import/operator-collector-roundtrip.test.ts +105 -0
- package/src/include/entity.ts +119 -0
- package/src/include/include.test.ts +345 -0
- package/src/include/resolve.ts +204 -0
- package/src/index.ts +25 -2
- package/src/kustomize/rendered-entity.ts +43 -1
- package/src/kustomize/root.test.ts +39 -0
- package/src/kustomize/root.ts +16 -30
- package/src/lint/audit-catalog.ts +6 -0
- package/src/lint/post-synth/crd-schema-helpers.ts +10 -2
- package/src/lint/post-synth/index.ts +12 -0
- package/src/lint/post-synth/monitoring-selection-helpers.ts +185 -0
- package/src/lint/post-synth/monitoring-selection.test.ts +316 -0
- package/src/lint/post-synth/otel-placement-helpers.ts +61 -1
- package/src/lint/post-synth/wk8601.ts +1 -1
- package/src/lint/post-synth/wk8603.ts +1 -1
- package/src/lint/post-synth/wk8604.ts +8 -2
- package/src/lint/post-synth/wk8605.ts +5 -3
- package/src/lint/post-synth/wk8606.ts +27 -0
- package/src/lint/post-synth/wk8701.ts +37 -0
- package/src/lint/post-synth/wk8702.ts +43 -0
- package/src/lint/post-synth/wk8703.ts +37 -0
- package/src/lint/post-synth/wk8704.ts +134 -0
- package/src/lint/post-synth/wk8705.ts +45 -0
- package/src/patch/json-patch.test.ts +91 -0
- package/src/patch/json-patch.ts +189 -0
- package/src/patch/rendered-patch.test.ts +143 -0
- package/src/patch/rendered-patch.ts +180 -0
- package/src/plugin.ts +16 -2
- package/src/project-kinds.ts +75 -0
- package/src/serializer.ts +10 -0
- package/src/testdata/include/bundle.yaml +45 -0
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
* When a container passes `--config=<path>`, only keys named by those
|
|
16
16
|
* paths count.
|
|
17
17
|
*
|
|
18
|
+
* 3. An OpenTelemetry Operator `OpenTelemetryCollector` carries its config in
|
|
19
|
+
* `spec.config` (an object in v1beta1, a YAML string in v1alpha1) and its
|
|
20
|
+
* placement in `spec.mode` and `spec.replicas`; it is its own workload. A
|
|
21
|
+
* `sidecar` runs inside other pods and is left out. The Services the
|
|
22
|
+
* operator makes (`<name>-collector`, `<name>-collector-headless`) are not
|
|
23
|
+
* in the build, so \`servicesSelecting\` names them from the CR.
|
|
24
|
+
*
|
|
18
25
|
* Anything this can't resolve (a ConfigMap or workload outside the build, a
|
|
19
26
|
* replica count that isn't a number) is left out, so the checks stay silent
|
|
20
27
|
* rather than guess. Like every bundle-join check they see one build root at
|
|
@@ -30,6 +37,7 @@ export declare const PLACEMENT_ANNOTATIONS: {
|
|
|
30
37
|
readonly workload: "otel.chant.dev/workload";
|
|
31
38
|
readonly config: "otel.chant.dev/config";
|
|
32
39
|
readonly gateways: "otel.chant.dev/gateways";
|
|
40
|
+
readonly header: "otel.chant.dev/header";
|
|
33
41
|
};
|
|
34
42
|
/** The part of a collector config the placement checks read. */
|
|
35
43
|
export interface CollectorConfigShape {
|
|
@@ -58,10 +66,18 @@ export interface CollectorPlacement {
|
|
|
58
66
|
* Undefined for a DaemonSet, or when the count isn't a number.
|
|
59
67
|
*/
|
|
60
68
|
replicas: number | undefined;
|
|
69
|
+
/** The ConfigMap holding the config; the CR's own name for an `OpenTelemetryCollector`. */
|
|
61
70
|
configMap: string;
|
|
71
|
+
/** The data key holding the config; `spec.config` for an `OpenTelemetryCollector`. */
|
|
62
72
|
key: string;
|
|
63
73
|
config: CollectorConfigShape;
|
|
74
|
+
/** Where the config is, for messages: `ConfigMap observability/x, config.yaml` or `spec.config`. */
|
|
75
|
+
where: string;
|
|
76
|
+
/** The workload is an OpenTelemetry Operator `OpenTelemetryCollector`, which the operator turns into the pods. */
|
|
77
|
+
operatorCR?: true;
|
|
64
78
|
}
|
|
79
|
+
/** An OpenTelemetry Operator `OpenTelemetryCollector` (any version of `opentelemetry.io`). */
|
|
80
|
+
export declare function isOperatorCollector(m: K8sManifest): boolean;
|
|
65
81
|
/**
|
|
66
82
|
* Parse a ConfigMap value as a collector config, or undefined when it isn't
|
|
67
83
|
* one. The otel lexicon's parser, shared with its config checks (OTEL101 and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otel-placement-helpers.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/otel-placement-helpers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"otel-placement-helpers.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/otel-placement-helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
* otel lexicon's `validateCollectorConfig`, and through `attributionIssues`
|
|
11
11
|
* (OTEL118) when the build stamps telemetry attribution.
|
|
12
12
|
*
|
|
13
|
+
* An OpenTelemetry Operator `OpenTelemetryCollector` carries its config in
|
|
14
|
+
* `spec.config` (an object in v1beta1, YAML text in v1alpha1), and goes
|
|
15
|
+
* through the same checks; its findings name `OpenTelemetryCollector
|
|
16
|
+
* <namespace>/<name>, spec.config` where a ConfigMap's name the ConfigMap and
|
|
17
|
+
* key (#3367).
|
|
18
|
+
*
|
|
13
19
|
* Findings keep the otel rule ids (OTEL101-OTEL106, OTEL112-OTEL127, and any config
|
|
14
20
|
* check the otel lexicon adds later), so `lint.rules` and suppressions name
|
|
15
21
|
* one id wherever the config lives. Each message names the ConfigMap's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wk8604.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8604.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"wk8604.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8604.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAQpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wk8605.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8605.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"wk8605.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8605.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AA2E9G,eAAO,MAAM,MAAM,EAAE,cAoCpB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8606: the prometheus rule checks over PrometheusRule groups
|
|
3
|
+
*
|
|
4
|
+
* `PrometheusRule.spec.groups` is a rule file's `groups`. `chant build` gives
|
|
5
|
+
* each lexicon's checks only that lexicon's output, so the prometheus
|
|
6
|
+
* lexicon's PROM checks never see a rule that lives in the k8s output. This
|
|
7
|
+
* check runs them there: every PrometheusRule's groups go through the
|
|
8
|
+
* prometheus lexicon's rule-file checks (PROM101-PROM107, PROM211,
|
|
9
|
+
* PROM213-PROM219; PROM212 stays opt-in).
|
|
10
|
+
*
|
|
11
|
+
* Findings keep the PROM ids, so `lint.rules` and suppressions name one id
|
|
12
|
+
* wherever the rules live. Each message names the PrometheusRule's namespace
|
|
13
|
+
* and name. Needs only the k8s lexicon in the project.
|
|
14
|
+
*/
|
|
15
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
16
|
+
export declare const wk8606: PostSynthCheck;
|
|
17
|
+
//# sourceMappingURL=wk8606.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8606.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8606.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAQpB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8701: a PrometheusRule that no Prometheus or ThanosRuler selects
|
|
3
|
+
*
|
|
4
|
+
* A Prometheus or ThanosRuler runs the rules whose labels match its `ruleSelector` in the namespaces its
|
|
5
|
+
* `ruleNamespaceSelector` picks. A PrometheusRule neither selects is accepted by the API server and then
|
|
6
|
+
* never evaluated: no error, no alert.
|
|
7
|
+
*
|
|
8
|
+
* Selection is worked out from the manifests in one build root (chant #1939),
|
|
9
|
+
* by the operator's rules: a null object selector matches nothing, `{}`
|
|
10
|
+
* matches all; a null namespace selector matches only the selecting resource's
|
|
11
|
+
* own namespace, `{}` every namespace. Silent when the build has no Prometheus or ThanosRuler, since the
|
|
12
|
+
* stack is often installed separately. A selector on a namespace label the
|
|
13
|
+
* build cannot read (the Namespace is not declared in it) counts as selecting.
|
|
14
|
+
*/
|
|
15
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
16
|
+
export declare const wk8701: PostSynthCheck;
|
|
17
|
+
//# sourceMappingURL=wk8701.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8701.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8701.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAkBpB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8702: a ServiceMonitor, PodMonitor, Probe or ScrapeConfig that no Prometheus or PrometheusAgent selects
|
|
3
|
+
*
|
|
4
|
+
* A Prometheus or PrometheusAgent scrapes the monitors whose labels match its `serviceMonitorSelector`,
|
|
5
|
+
* `podMonitorSelector`, `probeSelector` or `scrapeConfigSelector`, in the namespaces the matching
|
|
6
|
+
* `*NamespaceSelector` picks. A monitor none selects is accepted and then never scraped.
|
|
7
|
+
*
|
|
8
|
+
* Selection is worked out from the manifests in one build root (chant #1939),
|
|
9
|
+
* by the operator's rules: a null object selector matches nothing, `{}`
|
|
10
|
+
* matches all; a null namespace selector matches only the selecting resource's
|
|
11
|
+
* own namespace, `{}` every namespace. Silent when the build has no Prometheus or PrometheusAgent, since the
|
|
12
|
+
* stack is often installed separately. A selector on a namespace label the
|
|
13
|
+
* build cannot read (the Namespace is not declared in it) counts as selecting.
|
|
14
|
+
*/
|
|
15
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
16
|
+
export declare const wk8702: PostSynthCheck;
|
|
17
|
+
//# sourceMappingURL=wk8702.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8702.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8702.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8703: an AlertmanagerConfig that no Alertmanager selects
|
|
3
|
+
*
|
|
4
|
+
* An Alertmanager merges the AlertmanagerConfigs whose labels match its `alertmanagerConfigSelector` in the
|
|
5
|
+
* namespaces its `alertmanagerConfigNamespaceSelector` picks. One neither selects is accepted and then
|
|
6
|
+
* never routes an alert.
|
|
7
|
+
*
|
|
8
|
+
* Selection is worked out from the manifests in one build root (chant #1939),
|
|
9
|
+
* by the operator's rules: a null object selector matches nothing, `{}`
|
|
10
|
+
* matches all; a null namespace selector matches only the selecting resource's
|
|
11
|
+
* own namespace, `{}` every namespace. Silent when the build has no Alertmanager, since the
|
|
12
|
+
* stack is often installed separately. A selector on a namespace label the
|
|
13
|
+
* build cannot read (the Namespace is not declared in it) counts as selecting.
|
|
14
|
+
*/
|
|
15
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
16
|
+
export declare const wk8703: PostSynthCheck;
|
|
17
|
+
//# sourceMappingURL=wk8703.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8703.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8703.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAkBpB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8704: a ServiceMonitor or PodMonitor that selects no Service or pod, or names a port that is not there
|
|
3
|
+
*
|
|
4
|
+
* A ServiceMonitor's `selector` picks Services (in its own namespace, the
|
|
5
|
+
* `namespaceSelector.matchNames` ones, or every namespace with `any: true`),
|
|
6
|
+
* and each `endpoints[].port` names a port on them. A PodMonitor's `selector`
|
|
7
|
+
* picks pods, and each `podMetricsEndpoints[].port` names a container port.
|
|
8
|
+
* When nothing matches, or the port name is on none of the matches, Prometheus
|
|
9
|
+
* scrapes nothing and says nothing. This check needs no Prometheus in the
|
|
10
|
+
* build: it reads the monitor against the Services and workloads declared
|
|
11
|
+
* beside it.
|
|
12
|
+
*
|
|
13
|
+
* Pods come from the pod templates of Deployment, StatefulSet, DaemonSet, Job
|
|
14
|
+
* and CronJob, and from Pods themselves. An empty `selector` ({}) matches
|
|
15
|
+
* everything, as the operator does. Only a port given by name is checked;
|
|
16
|
+
* `targetPort` and `portNumber` are left alone. One build root at a time
|
|
17
|
+
* (chant #1939): a Service or workload installed from another root is not seen.
|
|
18
|
+
*/
|
|
19
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
20
|
+
export declare const wk8704: PostSynthCheck;
|
|
21
|
+
//# sourceMappingURL=wk8704.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8704.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8704.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAqD9G,eAAO,MAAM,MAAM,EAAE,cAoDpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WK8705: a Prometheus whose four monitor selectors are all null
|
|
3
|
+
*
|
|
4
|
+
* A Prometheus picks the ServiceMonitors, PodMonitors, Probes and
|
|
5
|
+
* ScrapeConfigs to scrape with `serviceMonitorSelector`, `podMonitorSelector`,
|
|
6
|
+
* `probeSelector` and `scrapeConfigSelector`. A null selector (absent counts
|
|
7
|
+
* as null) matches nothing, so a Prometheus with all four null selects no
|
|
8
|
+
* monitor at all and scrapes only what `additionalScrapeConfigs` and its own
|
|
9
|
+
* config hold. `{}` matches every monitor in the selected namespaces. This is
|
|
10
|
+
* the usual way a fresh Prometheus ends up scraping nothing.
|
|
11
|
+
*
|
|
12
|
+
* A Prometheus with `additionalScrapeConfigs` set still reports: that
|
|
13
|
+
* is a deliberate setup the finding names, not one it hides. The message says
|
|
14
|
+
* so, and a suppression is the way to accept it.
|
|
15
|
+
*/
|
|
16
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
17
|
+
export declare const wk8705: PostSynthCheck;
|
|
18
|
+
//# sourceMappingURL=wk8705.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wk8705.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wk8705.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cAuBpB,CAAC"}
|