Skip to content

Commit

Permalink
fix(kps): Remove duplicate apiserver and unused keepalived scrapeconf…
Browse files Browse the repository at this point in the history
…ig (#1483)

* fix(kps): Remove duplicate apiserver scrapeconfig

It looks like the KPS chart already defines a servicemonitor which
scrapes the apiserver metrics. Our additional scrapeconfig definition is
resulting in scraping the same apiserver targets and generating
duplicate metrics. We can remove our scrape config and rely on the chart
created servicemonitor.

* fix(kps): Remove unnecessary keepalived scrape target
  • Loading branch information
gracedo authored Aug 16, 2023
1 parent f381665 commit 90b170c
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions services/kube-prometheus-stack/48.3.1/defaults/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,22 +181,6 @@ data:
- configMapRef:
name: cluster-info-configmap
additionalScrapeConfigs:
# Kubernetes API
- job_name: 'kubernetes-apiserver'
kubernetes_sd_configs:
- role: endpoints
namespaces:
names:
- default
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
relabel_configs:
- source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
action: keep
regex: kubernetes;https
# Kubernetes pods
- job_name: 'kubernetes-pods'
kubernetes_sd_configs:
Expand Down Expand Up @@ -287,38 +271,6 @@ data:
- source_labels: [__meta_kubernetes_namespace]
target_label: namespace
action: replace
- job_name: 'kubernetes-keepalived'
metrics_path: /snmp
params:
target: ["127.0.0.1:6161"]
module: ["keepalived"]
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: pod
namespaces:
names:
- kube-system
relabel_configs:
- source_labels: [__meta_kubernetes_pod_container_port_protocol]
regex: TCP
action: keep
- source_labels: [__meta_kubernetes_pod_container_port_number]
regex: "6161"
action: keep
- source_labels: [__meta_kubernetes_pod_container_port_name]
target_label: endpoint
action: replace
- source_labels: [__meta_kubernetes_pod_node_name]
target_label: node
action: replace
- source_labels: [__meta_kubernetes_pod_name]
target_label: pod
action: replace
- source_labels: [__meta_kubernetes_namespace]
target_label: namespace
action: replace
enableAdminAPI: true
walCompression: true
# secrets:
Expand Down

0 comments on commit 90b170c

Please sign in to comment.