Select Git revision
podmonitor.yaml

Sheogorath authored
If no namespace selector is sepcified, it will only search in the current namespace. This is not intended for this podMonitor, therefore a config to explicitly search all namespaces is required. References: https://github.com/prometheus-operator/prometheus-operator/blob/615162d6d35314f94cb9c69f51bc47d62b81f154/Documentation/api.md#namespaceselector
podmonitor.yaml 434 B
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: postgresql
namespace: postgres-system
spec:
selector:
matchLabels:
application: spilo
namespaceSelector:
any: true
podMetricsEndpoints:
- port: exporter
interval: 15s
scrapeTimeout: 10s
- targetPort: 8008
interval: 15s
scrapeTimeout: 10s
podTargetLabels:
- spilo-role
- cluster-name
- team