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