mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-11-01 16:41:02 +01:00
jsonnet: Support scraping the config-reloader for AlertManager and Prometheus
This commit is contained in:
parent
bc82275a07
commit
7b32afb8aa
@ -19,6 +19,7 @@ local defaults = {
|
||||
if !std.setMember(labelName, ['app.kubernetes.io/version'])
|
||||
},
|
||||
name: error 'must provide name',
|
||||
reloaderPort: 8080,
|
||||
config: {
|
||||
global: {
|
||||
resolve_timeout: '5m',
|
||||
@ -136,6 +137,7 @@ function(params) {
|
||||
spec: {
|
||||
ports: [
|
||||
{ name: 'web', targetPort: 'web', port: 9093 },
|
||||
{ name: 'reloader-web', port: am._config.reloaderPort, targetPort: 'reloader-web' },
|
||||
],
|
||||
selector: {
|
||||
app: 'alertmanager',
|
||||
@ -161,6 +163,7 @@ function(params) {
|
||||
},
|
||||
endpoints: [
|
||||
{ port: 'web', interval: '30s' },
|
||||
{ port: 'reloader-web', interval: '30s' },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@ -35,6 +35,7 @@ local defaults = {
|
||||
},
|
||||
},
|
||||
thanos: null,
|
||||
reloaderPort: 8080,
|
||||
};
|
||||
|
||||
|
||||
@ -98,6 +99,7 @@ function(params) {
|
||||
spec: {
|
||||
ports: [
|
||||
{ name: 'web', targetPort: 'web', port: 9090 },
|
||||
{ name: 'reloader-web', port: p._config.reloaderPort, targetPort: 'reloader-web' },
|
||||
] +
|
||||
(
|
||||
if p._config.thanos != null then
|
||||
@ -317,10 +319,10 @@ function(params) {
|
||||
selector: {
|
||||
matchLabels: p._config.selectorLabels,
|
||||
},
|
||||
endpoints: [{
|
||||
port: 'web',
|
||||
interval: '30s',
|
||||
}],
|
||||
endpoints: [
|
||||
{ port: 'web', interval: '30s' },
|
||||
{ port: 'reloader-web', interval: '30s' },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@ -14,6 +14,9 @@ spec:
|
||||
- name: web
|
||||
port: 9093
|
||||
targetPort: web
|
||||
- name: reloader-web
|
||||
port: 8080
|
||||
targetPort: reloader-web
|
||||
selector:
|
||||
alertmanager: main
|
||||
app: alertmanager
|
||||
|
||||
@ -12,6 +12,8 @@ spec:
|
||||
endpoints:
|
||||
- interval: 30s
|
||||
port: web
|
||||
- interval: 30s
|
||||
port: reloader-web
|
||||
selector:
|
||||
matchLabels:
|
||||
alertmanager: main
|
||||
|
||||
@ -14,6 +14,9 @@ spec:
|
||||
- name: web
|
||||
port: 9090
|
||||
targetPort: web
|
||||
- name: reloader-web
|
||||
port: 8080
|
||||
targetPort: reloader-web
|
||||
selector:
|
||||
app: prometheus
|
||||
app.kubernetes.io/component: prometheus
|
||||
|
||||
@ -12,6 +12,8 @@ spec:
|
||||
endpoints:
|
||||
- interval: 30s
|
||||
port: web
|
||||
- interval: 30s
|
||||
port: reloader-web
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: prometheus
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user