Skip to content

Commit 7c04922

Browse files
committed
jsonnet/kube-prometheus/components/specs: introduce CRD specs
1 parent 31d86b7 commit 7c04922

File tree

4 files changed

+148
-4
lines changed

4 files changed

+148
-4
lines changed

jsonnet/kube-prometheus/components/alertmanager.libsonnet

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
local defaults = {
1+
local spec = import 'specs/alertmanager-spec.libsonnet';
2+
3+
local defaults = spec {
24
local defaults = self,
35
// Convention: Top-level fields related to CRDs are public, other fields are hidden
46
// If there is no CRD for the component, everything is hidden in defaults.
@@ -186,7 +188,7 @@ function(params) {
186188
alertmanager: am._config.name,
187189
},
188190
},
189-
spec: {
191+
spec: spec {
190192
replicas: am._config.replicas,
191193
version: am._config.version,
192194
image: am._config.image,

jsonnet/kube-prometheus/components/prometheus.libsonnet

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
local defaults = {
1+
local spec = import 'specs/prometheus-spec.libsonnet';
2+
3+
local defaults = spec {
24
local defaults = self,
35
// Convention: Top-level fields related to CRDs are public, other fields are hidden
46
// If there is no CRD for the component, everything is hidden in defaults.
@@ -253,7 +255,7 @@ function(params) {
253255
name: p._config.name,
254256
labels+: { prometheus: p._config.name },
255257
},
256-
spec: {
258+
spec: spec {
257259
replicas: p._config.replicas,
258260
version: p._config.version,
259261
image: p._config.image,
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
// Not required fields are hidden
3+
// Deprecated fields are commented out as we don't want to popularize them
4+
// Types mapping:
5+
// Object (or pointer to Object) -> {}
6+
// List (or pointer to List) -> []
7+
// String (or pointer to String) -> ""
8+
// Everything else -> null
9+
//
10+
// This file can be converted to YAML with jsonnet 0.18.0
11+
additionalPeers:: [],
12+
affinity:: {},
13+
alertmanagerConfigNamespaceSelector:: {},
14+
alertmanagerConfigSelector:: {},
15+
baseImage:: "", // Deprecated, remove
16+
clusterAdvertiseAddress:: "",
17+
clusterGossipInterval:: "",
18+
clusterPeerTimeout:: "",
19+
clusterPushpullInterval:: "",
20+
configMaps:: [],
21+
configSecret:: "",
22+
containers:: [],
23+
externalUrl:: "",
24+
forceEnableClusterMode:: null,
25+
image:: "",
26+
imagePullSecrets:: [],
27+
initContainers:: [],
28+
listenLocal:: null,
29+
logFormat:: "",
30+
logLevel:: "",
31+
minReadySeconds:: null,
32+
nodeSelector:: {},
33+
paused:: null,
34+
podMetadata:: {},
35+
portName:: "",
36+
priorityClassName:: "",
37+
replicas:: null,
38+
resources:: {},
39+
retention:: "",
40+
routePrefix:: "",
41+
secrets:: [],
42+
securityContext:: {},
43+
serviceAccountName:: "",
44+
sha:: "", // Deprecated, remove
45+
storage:: {},
46+
tag:: "", // Deprecated, remove
47+
tolerations:: [],
48+
topologySpreadConstraints:: [],
49+
version:: "",
50+
volumeMounts:: [],
51+
volumes:: [],
52+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
// Not required fields are hidden
3+
// Deprecated fields are commented out as we don't want to popularize them
4+
// Types mapping:
5+
// Object (or pointer to Object) -> {}
6+
// List (or pointer to List) -> []
7+
// String (or pointer to String) -> ""
8+
// Everything else -> null
9+
//
10+
// This file can be converted to YAML with jsonnet 0.18.0
11+
additionalAlertManagerConfigs:: {},
12+
additionalAlertRelabelConfigs:: {},
13+
additionalScrapeConfigs:: {},
14+
affinity:: {},
15+
alerting:: {},
16+
allowOverlappingBlocks:: null,
17+
apiserverConfig:: {},
18+
arbitraryFSAccessThroughSMs:: {},
19+
baseImage:: "", // Deprecated, remove
20+
configMaps:: [],
21+
containers:: [],
22+
disableCompaction:: null,
23+
enableAdminAPI:: null,
24+
enableFeatures:: [],
25+
enforcedBodySizeLimit:: "",
26+
enforcedLabelLimit:: null,
27+
enforcedLabelNameLengthLimit:: null,
28+
enforcedLabelValueLengthLimit:: null,
29+
enforcedNamespaceLabel:: "",
30+
enforcedSampleLimit:: null,
31+
enforcedTargetLimit:: null,
32+
evaluationInterval:: "",
33+
externalLabels:: {},
34+
externalUrl:: "",
35+
ignoreNamespaceSelectors:: null,
36+
image:: "",
37+
imagePullSecrets:: [],
38+
initContainers:: [],
39+
listenLocal:: null,
40+
logFormat:: "",
41+
logLevel:: "",
42+
minReadySeconds:: null,
43+
nodeSelector:: {},
44+
overrideHonorLabels:: null,
45+
overrideHonorTimestamps:: null,
46+
paused:: null,
47+
podMetadata:: {},
48+
podMonitorNamespaceSelector:: {},
49+
podMonitorSelector:: {},
50+
portName:: "",
51+
priorityClassName:: "",
52+
probeNamespaceSelector:: {},
53+
probeSelector:: {},
54+
prometheusExternalLabelName:: "",
55+
prometheusRulesExcludedFromEnforce:: {},
56+
query:: {},
57+
queryLogFile:: "",
58+
remoteRead:: {},
59+
remoteWrite:: {},
60+
replicaExternalLabelName:: "",
61+
replicas:: null,
62+
resources:: {},
63+
retention:: "",
64+
retentionSize:: "",
65+
routePrefix:: "",
66+
ruleNamespaceSelector:: {},
67+
ruleSelector:: {},
68+
rules:: {},
69+
scrapeInterval:: "",
70+
scrapeTimeout:: "",
71+
secrets:: [],
72+
securityContext:: {},
73+
serviceAccountName:: "",
74+
serviceMonitorNamespaceSelector:: {},
75+
serviceMonitorSelector:: {},
76+
sha:: "", // Deprecated, remove
77+
shards:: null,
78+
storage:: {},
79+
tag:: "", // Deprecated, remove
80+
thanos:: {},
81+
tolerations:: [],
82+
topologySpreadConstraints:: [],
83+
version:: "",
84+
volumeMounts:: [],
85+
volumes:: [],
86+
walCompression:: null,
87+
web:: {},
88+
}

0 commit comments

Comments
 (0)