Skip to content

Instantly share code, notes, and snippets.

@shawnho1018
Created September 19, 2022 10:56
Show Gist options
  • Save shawnho1018/622b31034875cfa3bd9594346dfc425a to your computer and use it in GitHub Desktop.
Save shawnho1018/622b31034875cfa3bd9594346dfc425a to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
namespace: gmp-test
name: prometheus-test
labels:
prometheus: test
data:
config.yaml: |
global:
scrape_interval: 30s
scrape_timeout: 10s
evaluation_interval: 1m
scrape_configs:
# Let Prometheus scrape itself.
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
- job_name: 'istiod'
kubernetes_sd_configs:
- role: endpoints
namespaces:
names:
- istio-system
relabel_configs:
- source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
action: keep
regex: istiod;http-monitoring
- job_name: 'envoy-stats'
metrics_path: /stats/prometheus
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_container_port_name]
action: keep
regex: '.*-envoy-prom'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment