Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
f95f0fa8
Unverified
Commit
f95f0fa8
authored
4 years ago
by
paulfantom
Browse files
Options
Downloads
Patches
Plain Diff
examples,jsonnet: fix thanos-sidecar addon; add test for thanos-sidecar addon
parent
e3cd00e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/thanos-sidecar.jsonnet
+32
-0
32 additions, 0 deletions
examples/thanos-sidecar.jsonnet
jsonnet/kube-prometheus/addons/thanos-sidecar.libsonnet
+5
-8
5 additions, 8 deletions
jsonnet/kube-prometheus/addons/thanos-sidecar.libsonnet
with
37 additions
and
8 deletions
examples/thanos-sidecar.jsonnet
0 → 100644
+
32
−
0
View file @
f95f0fa8
local
kp
=
(
import
'kube-prometheus/main.libsonnet'
)
+
(
import
'kube-prometheus/addons/thanos-sidecar.libsonnet'
)
+
{
values
+::
{
common
+:
{
namespace
:
'monitoring'
,
},
thanos
:
{
version
:
'0.17.2'
,
image
:
'quay.io/thanos-io/thanos:v'
+
$
.
values
.
thanos
.
version
,
objectStorageConfig
:
{
key
:
'thanos.yaml'
,
// How the file inside the secret is called
name
:
'thanos-objectstorage'
,
// This is the name of your Kubernetes secret with the config
},
},
},
};
{
[
'setup/0namespace-'
+
name
]:
kp
.
kubePrometheus
[
name
]
for
name
in
std
.
objectFields
(
kp
.
kubePrometheus
)
}
+
{
[
'setup/prometheus-operator-'
+
name
]:
kp
.
prometheusOperator
[
name
]
for
name
in
std
.
filter
((
function
(
name
)
name
!
=
'serviceMonitor'
),
std
.
objectFields
(
kp
.
prometheusOperator
))
}
+
// serviceMonitor is separated so that it can be created after the CRDs are ready
{
'prometheus-operator-serviceMonitor'
:
kp
.
prometheusOperator
.
serviceMonitor
}
+
{
[
'node-exporter-'
+
name
]:
kp
.
nodeExporter
[
name
]
for
name
in
std
.
objectFields
(
kp
.
nodeExporter
)
}
+
{
[
'kube-state-metrics-'
+
name
]:
kp
.
kubeStateMetrics
[
name
]
for
name
in
std
.
objectFields
(
kp
.
kubeStateMetrics
)
}
+
{
[
'alertmanager-'
+
name
]:
kp
.
alertmanager
[
name
]
for
name
in
std
.
objectFields
(
kp
.
alertmanager
)
}
+
{
[
'prometheus-'
+
name
]:
kp
.
prometheus
[
name
]
for
name
in
std
.
objectFields
(
kp
.
prometheus
)
}
+
{
[
'prometheus-adapter-'
+
name
]:
kp
.
prometheusAdapter
[
name
]
for
name
in
std
.
objectFields
(
kp
.
prometheusAdapter
)
}
+
{
[
'grafana-'
+
name
]:
kp
.
grafana
[
name
]
for
name
in
std
.
objectFields
(
kp
.
grafana
)
}
This diff is collapsed.
Click to expand it.
jsonnet/kube-prometheus/addons/thanos-sidecar.libsonnet
+
5
−
8
View file @
f95f0fa8
(
import
'github.com/thanos-io/thanos/mixin/alerts/sidecar.libsonnet'
)
+
{
values
+::
{
thanos
+::
{
version
:
'0.14.0'
,
image
:
'quay.io/thanos/thanos:v0.14.0'
,
objectStorageConfig
:
{
key
:
'thanos.yaml'
,
// How the file inside the secret is called
name
:
'thanos-objectstorage'
,
// This is the name of your Kubernetes secret with the config
},
thanos
:
{
version
:
error
'must provide thanos version'
,
image
:
error
'must provide thanos image'
,
objectStorageConfig
:
error
'must provide thanos object storage configuration'
,
},
},
prometheus
+:
{
...
...
@@ -35,7 +32,7 @@
{
name
:
'grpc'
,
port
:
10901
,
targetPort
:
10901
},
{
name
:
'http'
,
port
:
10902
,
targetPort
:
10902
},
],
selector
:
{
app
:
'prometheus'
,
prometheus
:
p
.
name
},
selector
:
{
app
:
'prometheus'
,
prometheus
:
p
.
config
.
name
},
clusterIP
:
'None'
,
},
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment