@intentius/chant-lexicon-k8s 0.106.4 → 0.107.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/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/crd/crd-sources.d.ts.map +1 -1
- 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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +16 -9
- 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/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/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/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/crd/crd-sources.ts +41 -2
- 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/index.ts +2 -2
- package/src/lint/audit-catalog.ts +6 -0
- 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
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
|
|
17
|
+
import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
|
18
|
+
import { describe, monitoringKind, nameOf, selectionContext } from "./monitoring-selection-helpers";
|
|
19
|
+
|
|
20
|
+
const SELECTORS = ["serviceMonitorSelector", "podMonitorSelector", "probeSelector", "scrapeConfigSelector"] as const;
|
|
21
|
+
|
|
22
|
+
export const wk8705: PostSynthCheck = {
|
|
23
|
+
id: "WK8705",
|
|
24
|
+
description:
|
|
25
|
+
"A Prometheus whose serviceMonitorSelector, podMonitorSelector, probeSelector and scrapeConfigSelector are all null selects no monitor, so the operator scrapes nothing from ServiceMonitors, PodMonitors, Probes or ScrapeConfigs.",
|
|
26
|
+
|
|
27
|
+
check(ctx: PostSynthContext): PostSynthDiagnostic[] {
|
|
28
|
+
const { manifests } = selectionContext(ctx);
|
|
29
|
+
return monitoringKind(manifests, "Prometheus")
|
|
30
|
+
.filter((p) => {
|
|
31
|
+
const spec = (p.spec ?? {}) as Record<string, unknown>;
|
|
32
|
+
return SELECTORS.every((k) => spec[k] === null || spec[k] === undefined);
|
|
33
|
+
})
|
|
34
|
+
.map((p) => ({
|
|
35
|
+
checkId: "WK8705",
|
|
36
|
+
severity: "warning" as const,
|
|
37
|
+
message:
|
|
38
|
+
`${describe(p)} has ${SELECTORS.join(", ")} all null, so it selects no ServiceMonitor, PodMonitor, Probe or ScrapeConfig and scrapes only its own config` +
|
|
39
|
+
`${(p.spec as Record<string, unknown> | undefined)?.additionalScrapeConfigs ? " and additionalScrapeConfigs" : ""}. ` +
|
|
40
|
+
`Set the selector for each monitor kind it should pick up ({} selects all in the selected namespaces).`,
|
|
41
|
+
entity: nameOf(p),
|
|
42
|
+
lexicon: "k8s",
|
|
43
|
+
}));
|
|
44
|
+
},
|
|
45
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,6 +26,33 @@ export declare class Alert {
|
|
|
26
26
|
readonly uid: string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
export declare class Alertmanager {
|
|
30
|
+
constructor(props: {
|
|
31
|
+
/** spec defines the specification of the desired behavior of the Alertmanager cluster. More info:
|
|
32
|
+
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status */
|
|
33
|
+
spec: Record<string, unknown>;
|
|
34
|
+
/** Standard object's metadata. */
|
|
35
|
+
metadata?: ObjectMeta;
|
|
36
|
+
});
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly namespace: string;
|
|
39
|
+
readonly status: Record<string, unknown>;
|
|
40
|
+
readonly uid: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare class AlertmanagerConfig {
|
|
44
|
+
constructor(props: {
|
|
45
|
+
/** spec defines the specification of AlertmanagerConfigSpec */
|
|
46
|
+
spec: Record<string, unknown>;
|
|
47
|
+
/** Standard object's metadata. */
|
|
48
|
+
metadata?: ObjectMeta;
|
|
49
|
+
});
|
|
50
|
+
readonly name: string;
|
|
51
|
+
readonly namespace: string;
|
|
52
|
+
readonly status: Record<string, unknown>;
|
|
53
|
+
readonly uid: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
29
56
|
export declare class APIGroup {
|
|
30
57
|
constructor(props: {
|
|
31
58
|
/** name is the name of the group. */
|
|
@@ -317,6 +344,18 @@ export declare class ClusterIssuer {
|
|
|
317
344
|
readonly uid: string;
|
|
318
345
|
}
|
|
319
346
|
|
|
347
|
+
export declare class ClusterObservability {
|
|
348
|
+
constructor(props: {
|
|
349
|
+
/** Standard object's metadata. */
|
|
350
|
+
metadata?: ObjectMeta;
|
|
351
|
+
spec?: Record<string, unknown>;
|
|
352
|
+
});
|
|
353
|
+
readonly name: string;
|
|
354
|
+
readonly namespace: string;
|
|
355
|
+
readonly status: Record<string, unknown>;
|
|
356
|
+
readonly uid: string;
|
|
357
|
+
}
|
|
358
|
+
|
|
320
359
|
export declare class ClusterResourceSet {
|
|
321
360
|
constructor(props: {
|
|
322
361
|
/** spec is the desired state of ClusterResourceSet. */
|
|
@@ -1569,6 +1608,18 @@ export declare class IngressRouteUDP {
|
|
|
1569
1608
|
readonly uid: string;
|
|
1570
1609
|
}
|
|
1571
1610
|
|
|
1611
|
+
export declare class Instrumentation {
|
|
1612
|
+
constructor(props: {
|
|
1613
|
+
/** Standard object's metadata. */
|
|
1614
|
+
metadata?: ObjectMeta;
|
|
1615
|
+
spec?: Record<string, unknown>;
|
|
1616
|
+
});
|
|
1617
|
+
readonly name: string;
|
|
1618
|
+
readonly namespace: string;
|
|
1619
|
+
readonly status: Record<string, unknown>;
|
|
1620
|
+
readonly uid: string;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1572
1623
|
export declare class IPAddress {
|
|
1573
1624
|
constructor(props: {
|
|
1574
1625
|
/** spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status */
|
|
@@ -1837,6 +1888,19 @@ export declare class MiddlewareTCP {
|
|
|
1837
1888
|
readonly uid: string;
|
|
1838
1889
|
}
|
|
1839
1890
|
|
|
1891
|
+
export declare class MonitoringProbe {
|
|
1892
|
+
constructor(props: {
|
|
1893
|
+
/** spec defines the specification of desired Ingress selection for target discovery by Prometheus. */
|
|
1894
|
+
spec: Record<string, unknown>;
|
|
1895
|
+
/** Standard object's metadata. */
|
|
1896
|
+
metadata?: ObjectMeta;
|
|
1897
|
+
});
|
|
1898
|
+
readonly name: string;
|
|
1899
|
+
readonly namespace: string;
|
|
1900
|
+
readonly status: Record<string, unknown>;
|
|
1901
|
+
readonly uid: string;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1840
1904
|
export declare class MutatingAdmissionPolicy {
|
|
1841
1905
|
constructor(props: {
|
|
1842
1906
|
/** metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. */
|
|
@@ -2032,6 +2096,30 @@ export declare class OCIRepository {
|
|
|
2032
2096
|
readonly uid: string;
|
|
2033
2097
|
}
|
|
2034
2098
|
|
|
2099
|
+
export declare class OpAMPBridge {
|
|
2100
|
+
constructor(props: {
|
|
2101
|
+
/** Standard object's metadata. */
|
|
2102
|
+
metadata?: ObjectMeta;
|
|
2103
|
+
spec?: Record<string, unknown>;
|
|
2104
|
+
});
|
|
2105
|
+
readonly name: string;
|
|
2106
|
+
readonly namespace: string;
|
|
2107
|
+
readonly status: Record<string, unknown>;
|
|
2108
|
+
readonly uid: string;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
export declare class OpenTelemetryCollector {
|
|
2112
|
+
constructor(props: {
|
|
2113
|
+
/** Standard object's metadata. */
|
|
2114
|
+
metadata?: ObjectMeta;
|
|
2115
|
+
spec?: Record<string, unknown>;
|
|
2116
|
+
});
|
|
2117
|
+
readonly name: string;
|
|
2118
|
+
readonly namespace: string;
|
|
2119
|
+
readonly status: Record<string, unknown>;
|
|
2120
|
+
readonly uid: string;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2035
2123
|
export declare class Order {
|
|
2036
2124
|
constructor(props: {
|
|
2037
2125
|
spec: Record<string, unknown>;
|
|
@@ -2193,6 +2281,19 @@ export declare class PodList {
|
|
|
2193
2281
|
readonly uid: string;
|
|
2194
2282
|
}
|
|
2195
2283
|
|
|
2284
|
+
export declare class PodMonitor {
|
|
2285
|
+
constructor(props: {
|
|
2286
|
+
/** spec defines the specification of desired Pod selection for target discovery by Prometheus. */
|
|
2287
|
+
spec: Record<string, unknown>;
|
|
2288
|
+
/** Standard object's metadata. */
|
|
2289
|
+
metadata?: ObjectMeta;
|
|
2290
|
+
});
|
|
2291
|
+
readonly name: string;
|
|
2292
|
+
readonly namespace: string;
|
|
2293
|
+
readonly status: Record<string, unknown>;
|
|
2294
|
+
readonly uid: string;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2196
2297
|
export declare class PodTemplate {
|
|
2197
2298
|
constructor(props: {
|
|
2198
2299
|
/** Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata */
|
|
@@ -2307,15 +2408,44 @@ export declare class PriorityLevelConfigurationList {
|
|
|
2307
2408
|
readonly uid: string;
|
|
2308
2409
|
}
|
|
2309
2410
|
|
|
2411
|
+
export declare class Prometheus {
|
|
2412
|
+
constructor(props: {
|
|
2413
|
+
/** spec defines the specification of the desired behavior of the Prometheus cluster. More info:
|
|
2414
|
+
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status */
|
|
2415
|
+
spec: Record<string, unknown>;
|
|
2416
|
+
/** Standard object's metadata. */
|
|
2417
|
+
metadata?: ObjectMeta;
|
|
2418
|
+
});
|
|
2419
|
+
readonly name: string;
|
|
2420
|
+
readonly namespace: string;
|
|
2421
|
+
readonly status: Record<string, unknown>;
|
|
2422
|
+
readonly uid: string;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
export declare class PrometheusAgent {
|
|
2426
|
+
constructor(props: {
|
|
2427
|
+
/** spec defines the specification of the desired behavior of the Prometheus agent. More info:
|
|
2428
|
+
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status */
|
|
2429
|
+
spec: Record<string, unknown>;
|
|
2430
|
+
/** Standard object's metadata. */
|
|
2431
|
+
metadata?: ObjectMeta;
|
|
2432
|
+
});
|
|
2433
|
+
readonly name: string;
|
|
2434
|
+
readonly namespace: string;
|
|
2435
|
+
readonly status: Record<string, unknown>;
|
|
2436
|
+
readonly uid: string;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2310
2439
|
export declare class PrometheusRule {
|
|
2311
2440
|
constructor(props: {
|
|
2312
|
-
/**
|
|
2441
|
+
/** spec defines the specification of desired alerting rule definitions for Prometheus. */
|
|
2313
2442
|
spec: Record<string, unknown>;
|
|
2314
2443
|
/** Standard object's metadata. */
|
|
2315
2444
|
metadata?: ObjectMeta;
|
|
2316
2445
|
});
|
|
2317
2446
|
readonly name: string;
|
|
2318
2447
|
readonly namespace: string;
|
|
2448
|
+
readonly status: Record<string, unknown>;
|
|
2319
2449
|
readonly uid: string;
|
|
2320
2450
|
}
|
|
2321
2451
|
|
|
@@ -2726,6 +2856,19 @@ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-
|
|
|
2726
2856
|
readonly uid: string;
|
|
2727
2857
|
}
|
|
2728
2858
|
|
|
2859
|
+
export declare class ScrapeConfig {
|
|
2860
|
+
constructor(props: {
|
|
2861
|
+
/** spec defines the specification of ScrapeConfigSpec. */
|
|
2862
|
+
spec: Record<string, unknown>;
|
|
2863
|
+
/** Standard object's metadata. */
|
|
2864
|
+
metadata?: ObjectMeta;
|
|
2865
|
+
});
|
|
2866
|
+
readonly name: string;
|
|
2867
|
+
readonly namespace: string;
|
|
2868
|
+
readonly status: Record<string, unknown>;
|
|
2869
|
+
readonly uid: string;
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2729
2872
|
export declare class Sec {
|
|
2730
2873
|
constructor(props: {
|
|
2731
2874
|
/** Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 */
|
|
@@ -2910,7 +3053,7 @@ export declare class ServiceList {
|
|
|
2910
3053
|
|
|
2911
3054
|
export declare class ServiceMonitor {
|
|
2912
3055
|
constructor(props: {
|
|
2913
|
-
/**
|
|
3056
|
+
/** spec defines the specification of desired Service selection for target discovery by
|
|
2914
3057
|
Prometheus. */
|
|
2915
3058
|
spec: Record<string, unknown>;
|
|
2916
3059
|
/** Standard object's metadata. */
|
|
@@ -2918,6 +3061,7 @@ Prometheus. */
|
|
|
2918
3061
|
});
|
|
2919
3062
|
readonly name: string;
|
|
2920
3063
|
readonly namespace: string;
|
|
3064
|
+
readonly status: Record<string, unknown>;
|
|
2921
3065
|
readonly uid: string;
|
|
2922
3066
|
}
|
|
2923
3067
|
|
|
@@ -3059,6 +3203,32 @@ export declare class SubjectAccessReview {
|
|
|
3059
3203
|
readonly uid: string;
|
|
3060
3204
|
}
|
|
3061
3205
|
|
|
3206
|
+
export declare class TargetAllocator {
|
|
3207
|
+
constructor(props: {
|
|
3208
|
+
/** Standard object's metadata. */
|
|
3209
|
+
metadata?: ObjectMeta;
|
|
3210
|
+
spec?: Record<string, unknown>;
|
|
3211
|
+
});
|
|
3212
|
+
readonly name: string;
|
|
3213
|
+
readonly namespace: string;
|
|
3214
|
+
readonly status: Record<string, unknown>;
|
|
3215
|
+
readonly uid: string;
|
|
3216
|
+
}
|
|
3217
|
+
|
|
3218
|
+
export declare class ThanosRuler {
|
|
3219
|
+
constructor(props: {
|
|
3220
|
+
/** spec defines the specification of the desired behavior of the ThanosRuler cluster. More info:
|
|
3221
|
+
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status */
|
|
3222
|
+
spec: Record<string, unknown>;
|
|
3223
|
+
/** Standard object's metadata. */
|
|
3224
|
+
metadata?: ObjectMeta;
|
|
3225
|
+
});
|
|
3226
|
+
readonly name: string;
|
|
3227
|
+
readonly namespace: string;
|
|
3228
|
+
readonly status: Record<string, unknown>;
|
|
3229
|
+
readonly uid: string;
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3062
3232
|
export declare class TLSOption {
|
|
3063
3233
|
constructor(props: {
|
|
3064
3234
|
/** TLSOptionSpec defines the desired state of a TLSOption. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-k8s",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.107.1",
|
|
4
4
|
"description": "Kubernetes lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@types/js-yaml": "^4.0.9"
|
|
79
79
|
},
|
|
80
80
|
"optionalDependencies": {
|
|
81
|
-
"@intentius/chant-k8s-client": "^0.
|
|
81
|
+
"@intentius/chant-k8s-client": "^0.107.1"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@intentius/chant": "*",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"zod": "^4.3.6",
|
|
89
|
-
"@intentius/chant": "^0.
|
|
89
|
+
"@intentius/chant": "^0.107.1",
|
|
90
90
|
"typescript": "^5.9.3"
|
|
91
91
|
}
|
|
92
92
|
}
|
package/src/codegen/naming.ts
CHANGED
|
@@ -80,6 +80,9 @@ const k8sNamingConfig: NamingConfig = {
|
|
|
80
80
|
// Events (core vs events.k8s.io — the core version wins)
|
|
81
81
|
"K8s::Core::Event": "Event",
|
|
82
82
|
|
|
83
|
+
// Prometheus Operator's Probe CRD would collide with the core Probe property type
|
|
84
|
+
"K8s::Monitoring::Probe": "MonitoringProbe",
|
|
85
|
+
|
|
83
86
|
// Property types
|
|
84
87
|
"K8s::Core::Container": "Container",
|
|
85
88
|
"K8s::Core::ContainerPort": "ContainerPort",
|
|
@@ -150,7 +153,18 @@ const k8sNamingConfig: NamingConfig = {
|
|
|
150
153
|
"K8s::Networking::NetworkPolicy": ["NetPol"],
|
|
151
154
|
},
|
|
152
155
|
|
|
153
|
-
|
|
156
|
+
// Names published before the Prometheus Operator CRDs (v0.94.1) added colliding
|
|
157
|
+
// property types stay with their original owners; the new CRDs' types are prefixed.
|
|
158
|
+
priorityPropertyAliases: {
|
|
159
|
+
"K8s::Monitoring::ServiceMonitor": {
|
|
160
|
+
AttachMetadata: "AttachMetadata",
|
|
161
|
+
NamespaceSelector: "NamespaceSelector",
|
|
162
|
+
Selector: "Selector",
|
|
163
|
+
},
|
|
164
|
+
"K8s::Traefik::Middleware": { BasicAuth: "BasicAuth" },
|
|
165
|
+
"K8s::Addons::HelmChartProxy": { TlsConfig: "TlsConfig" },
|
|
166
|
+
"K8s::S3::Bucket": { Lifecycle: "Lifecycle" },
|
|
167
|
+
},
|
|
154
168
|
|
|
155
169
|
serviceAbbreviations: {
|
|
156
170
|
Core: "Core",
|
|
@@ -3093,6 +3093,111 @@ export const compositeCatalog: CompositeEntry[] = [
|
|
|
3093
3093
|
}
|
|
3094
3094
|
]
|
|
3095
3095
|
},
|
|
3096
|
+
{
|
|
3097
|
+
"name": "OtelOperatorCollector",
|
|
3098
|
+
"lexicon": "k8s",
|
|
3099
|
+
"description": "Create an OtelOperatorCollector composite.",
|
|
3100
|
+
"bundles": [
|
|
3101
|
+
"ClusterRole",
|
|
3102
|
+
"ClusterRoleBinding",
|
|
3103
|
+
"OpenTelemetryCollector",
|
|
3104
|
+
"Role",
|
|
3105
|
+
"RoleBinding",
|
|
3106
|
+
"ServiceAccount"
|
|
3107
|
+
],
|
|
3108
|
+
"params": [
|
|
3109
|
+
{
|
|
3110
|
+
"name": "name",
|
|
3111
|
+
"type": "string",
|
|
3112
|
+
"required": false,
|
|
3113
|
+
"description": "Custom resource name (default: \"otel-collector\")."
|
|
3114
|
+
},
|
|
3115
|
+
{
|
|
3116
|
+
"name": "namespace",
|
|
3117
|
+
"type": "string",
|
|
3118
|
+
"required": false,
|
|
3119
|
+
"description": "Namespace (default: \"observability\")."
|
|
3120
|
+
},
|
|
3121
|
+
{
|
|
3122
|
+
"name": "mode",
|
|
3123
|
+
"type": "OtelOperatorMode",
|
|
3124
|
+
"required": false,
|
|
3125
|
+
"description": "How the operator runs it (default: \"daemonset\", the agent shape `OtelCollector` has)."
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
"name": "replicas",
|
|
3129
|
+
"type": "number",
|
|
3130
|
+
"required": false,
|
|
3131
|
+
"description": "Replica count for `deployment` and `statefulset` (left to the operator's default of 1 when unset)."
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
"name": "image",
|
|
3135
|
+
"type": "string",
|
|
3136
|
+
"required": false,
|
|
3137
|
+
"description": "Collector image (default: the contrib image at the otel lexicon's pinned collector version)."
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
"name": "config",
|
|
3141
|
+
"type": "Iterable<Declarable>",
|
|
3142
|
+
"required": false,
|
|
3143
|
+
"description": "The collector config, as otel lexicon entities (components and pipelines)."
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "exporters",
|
|
3147
|
+
"type": "OTelComponent<\"exporter\", string, any>[]",
|
|
3148
|
+
"required": false,
|
|
3149
|
+
"description": "Exporters for the default config (default: one `debug` exporter)."
|
|
3150
|
+
},
|
|
3151
|
+
{
|
|
3152
|
+
"name": "signals",
|
|
3153
|
+
"type": "Signal[]",
|
|
3154
|
+
"required": false,
|
|
3155
|
+
"description": "Signals the default config has pipelines for (default: traces, metrics and logs)."
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"name": "labels",
|
|
3159
|
+
"type": "Record<string, string>",
|
|
3160
|
+
"required": false,
|
|
3161
|
+
"description": "Additional labels."
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"name": "logAccess",
|
|
3165
|
+
"type": "CollectorLogAccess",
|
|
3166
|
+
"required": false,
|
|
3167
|
+
"description": "How a config with a `filelog` receiver reads the node's container logs; see `OtelCollector`."
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
"name": "cpuRequest",
|
|
3171
|
+
"type": "string",
|
|
3172
|
+
"required": false,
|
|
3173
|
+
"description": "CPU request (default: \"100m\")."
|
|
3174
|
+
},
|
|
3175
|
+
{
|
|
3176
|
+
"name": "memoryRequest",
|
|
3177
|
+
"type": "string",
|
|
3178
|
+
"required": false,
|
|
3179
|
+
"description": "Memory request (default: \"256Mi\")."
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
"name": "cpuLimit",
|
|
3183
|
+
"type": "string",
|
|
3184
|
+
"required": false,
|
|
3185
|
+
"description": "CPU limit (default: \"500m\")."
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
"name": "memoryLimit",
|
|
3189
|
+
"type": "string",
|
|
3190
|
+
"required": false,
|
|
3191
|
+
"description": "Memory limit (default: \"512Mi\")."
|
|
3192
|
+
},
|
|
3193
|
+
{
|
|
3194
|
+
"name": "defaults",
|
|
3195
|
+
"type": "{ collector?: Partial<Record<string, unknown>>; serviceAccount?: Partial<Record<string, unknown>>; clusterRole?: Part...",
|
|
3196
|
+
"required": false,
|
|
3197
|
+
"description": "Per-member defaults for fine-grained overrides."
|
|
3198
|
+
}
|
|
3199
|
+
]
|
|
3200
|
+
},
|
|
3096
3201
|
{
|
|
3097
3202
|
"name": "RayCluster",
|
|
3098
3203
|
"lexicon": "k8s",
|
package/src/composites/index.ts
CHANGED
|
@@ -68,6 +68,8 @@ export type { GkeFluentBitAgentProps, GkeFluentBitAgentResult } from "./gke-flue
|
|
|
68
68
|
export { OtelCollector } from "./otel-collector";
|
|
69
69
|
export type { OtelCollectorProps, OtelCollectorResult } from "./otel-collector";
|
|
70
70
|
export type { CollectorLogAccess } from "./otel-collector-agent";
|
|
71
|
+
export { OtelOperatorCollector } from "./otel-operator-collector";
|
|
72
|
+
export type { OtelOperatorCollectorProps, OtelOperatorCollectorResult, OtelOperatorMode } from "./otel-operator-collector";
|
|
71
73
|
export { OtelCollectorGateway, gatewayExporter } from "./otel-collector-gateway";
|
|
72
74
|
export type {
|
|
73
75
|
OtelCollectorGatewayProps,
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
* | `role` | ConfigMap, workload | `agent` (a DaemonSet, one collector per node) or `gateway` (a Deployment) |
|
|
31
31
|
* | `workload` | ConfigMap | the workload that mounts it, `DaemonSet/<name>` or `Deployment/<name>`, in the ConfigMap's namespace |
|
|
32
32
|
* | `config` | workload | the name of the ConfigMap holding its `config.yaml` |
|
|
33
|
+
* | `header` | `OtelOperatorCollector`'s `OpenTelemetryCollector` | the config's `# chant:` header lines (custom-component pins, semconv use), one per line, which an object-valued `spec.config` has no comments to hold |
|
|
33
34
|
* | `gateways` | agent ConfigMap and DaemonSet | comma-separated `<namespace>/<gateway name>=<routing>`, where routing is `loadbalancing` or `service` |
|
|
34
35
|
*
|
|
35
36
|
* The replica count is the workload's own `spec.replicas`.
|
|
@@ -39,6 +40,7 @@ export const OTEL_COLLECTOR_ANNOTATIONS = {
|
|
|
39
40
|
workload: "otel.chant.dev/workload",
|
|
40
41
|
config: "otel.chant.dev/config",
|
|
41
42
|
gateways: "otel.chant.dev/gateways",
|
|
43
|
+
header: "otel.chant.dev/header",
|
|
42
44
|
} as const;
|
|
43
45
|
|
|
44
46
|
export type CollectorRole = "agent" | "gateway";
|