mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-28 18:01:47 +02:00
Merge pull request #852 from brancz/probe-port
blackbox-exporter: Add probe port to Service
This commit is contained in:
commit
1928f7083a
@ -19,8 +19,8 @@ The `prometheus-operator` defines a `Probe` resource type that can be used to de
|
|||||||
* `_config.versions.configmapReloader`: the tag of the ConfigMap reloader image to deploy. Defaults to the version `kube-prometheus` was tested with.
|
* `_config.versions.configmapReloader`: the tag of the ConfigMap reloader image to deploy. Defaults to the version `kube-prometheus` was tested with.
|
||||||
* `_config.resources.blackbox-exporter.requests`: the requested resources; this is used for each container. Defaults to `10m` CPU and `20Mi` RAM. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for details.
|
* `_config.resources.blackbox-exporter.requests`: the requested resources; this is used for each container. Defaults to `10m` CPU and `20Mi` RAM. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for details.
|
||||||
* `_config.resources.blackbox-exporter.limits`: the resource limits; this is used for each container. Defaults to `20m` CPU and `40Mi` RAM. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for details.
|
* `_config.resources.blackbox-exporter.limits`: the resource limits; this is used for each container. Defaults to `20m` CPU and `40Mi` RAM. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for details.
|
||||||
* `_config.blackboxExporter.port`: the exposed HTTPS port of the exporter. This is where Prometheus should send the probe requests. Defaults to `9115`.
|
* `_config.blackboxExporter.port`: the exposed HTTPS port of the exporter. This is what Prometheus can scrape for metrics related to the blackbox exporter itself. Defaults to `9115`.
|
||||||
* `_config.blackboxExporter.internalPort`: the internal plaintext port of the exporter. Not accessible from outside the pod. Defaults to `19115`.
|
* `_config.blackboxExporter.internalPort`: the internal plaintext port of the exporter. Prometheus scrapes configured via `Probe` objects cannot access the HTTPS port right now, so you have to specify this port in the `url` field. Defaults to `19115`.
|
||||||
* `_config.blackboxExporter.replicas`: the number of exporter replicas to be deployed. Defaults to `1`.
|
* `_config.blackboxExporter.replicas`: the number of exporter replicas to be deployed. Defaults to `1`.
|
||||||
* `_config.blackboxExporter.matchLabels`: map of the labels to be used to select resources belonging to the instance deployed. Defaults to `{ 'app.kubernetes.io/name': 'blackbox-exporter' }`
|
* `_config.blackboxExporter.matchLabels`: map of the labels to be used to select resources belonging to the instance deployed. Defaults to `{ 'app.kubernetes.io/name': 'blackbox-exporter' }`
|
||||||
* `_config.blackboxExporter.assignLabels`: map of the labels applied to components of the instance deployed. Defaults to all the labels included in the `matchLabels` option, and additionally `app.kubernetes.io/version` is set to the version of the blackbox exporter.
|
* `_config.blackboxExporter.assignLabels`: map of the labels applied to components of the instance deployed. Defaults to all the labels included in the `matchLabels` option, and additionally `app.kubernetes.io/version` is set to the version of the blackbox exporter.
|
||||||
@ -73,7 +73,7 @@ spec:
|
|||||||
interval: 60s
|
interval: 60s
|
||||||
module: http_2xx
|
module: http_2xx
|
||||||
prober:
|
prober:
|
||||||
url: blackbox-exporter.monitoring.svc.cluster.local:9115
|
url: blackbox-exporter.monitoring.svc.cluster.local:19115
|
||||||
targets:
|
targets:
|
||||||
staticConfig:
|
staticConfig:
|
||||||
static:
|
static:
|
||||||
|
@ -228,7 +228,15 @@ local kubeRbacProxyContainer = import '../kube-rbac-proxy/container.libsonnet';
|
|||||||
labels: bb.assignLabels,
|
labels: bb.assignLabels,
|
||||||
},
|
},
|
||||||
spec: {
|
spec: {
|
||||||
ports: [{ name: 'http', port: bb.port, targetPort: 'https' }],
|
ports: [{
|
||||||
|
name: 'https',
|
||||||
|
port: bb.port,
|
||||||
|
targetPort: 'https',
|
||||||
|
}, {
|
||||||
|
name: 'probe',
|
||||||
|
port: bb.internalPort,
|
||||||
|
targetPort: 'http',
|
||||||
|
}],
|
||||||
selector: bb.matchLabels,
|
selector: bb.matchLabels,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -247,7 +255,7 @@ local kubeRbacProxyContainer = import '../kube-rbac-proxy/container.libsonnet';
|
|||||||
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||||
interval: '30s',
|
interval: '30s',
|
||||||
path: '/metrics',
|
path: '/metrics',
|
||||||
port: 'http',
|
port: 'https',
|
||||||
scheme: 'https',
|
scheme: 'https',
|
||||||
tlsConfig: {
|
tlsConfig: {
|
||||||
insecureSkipVerify: true,
|
insecureSkipVerify: true,
|
||||||
|
@ -8,8 +8,11 @@ metadata:
|
|||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: https
|
||||||
port: 9115
|
port: 9115
|
||||||
targetPort: https
|
targetPort: https
|
||||||
|
- name: probe
|
||||||
|
port: 19115
|
||||||
|
targetPort: http
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: blackbox-exporter
|
app.kubernetes.io/name: blackbox-exporter
|
||||||
|
@ -11,7 +11,7 @@ spec:
|
|||||||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
interval: 30s
|
interval: 30s
|
||||||
path: /metrics
|
path: /metrics
|
||||||
port: http
|
port: https
|
||||||
scheme: https
|
scheme: https
|
||||||
tlsConfig:
|
tlsConfig:
|
||||||
insecureSkipVerify: true
|
insecureSkipVerify: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user