-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #557 from oxddr/kube-proxy-scrapping
Recording rule for Network Programming Latency
- Loading branch information
Showing
8 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
clusterloader2/pkg/prometheus/manifests/default/kube-proxy-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{$PROMETHEUS_SCRAPE_KUBE_PROXY := DefaultParam .PROMETHEUS_SCRAPE_KUBE_PROXY false}} | ||
|
||
{{if $PROMETHEUS_SCRAPE_KUBE_PROXY}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
namespace: kube-system | ||
name: kube-proxy | ||
labels: | ||
k8s-app: kube-proxy | ||
spec: | ||
type: ClusterIP | ||
clusterIP: None | ||
ports: | ||
- name: http-metrics | ||
port: 10249 | ||
selector: | ||
component: kube-proxy | ||
{{end}} |
27 changes: 27 additions & 0 deletions
27
clusterloader2/pkg/prometheus/manifests/default/prometheus-serviceMonitorKubeProxy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{$PROMETHEUS_SCRAPE_KUBE_PROXY := DefaultParam .PROMETHEUS_SCRAPE_KUBE_PROXY false}} | ||
|
||
{{if $PROMETHEUS_SCRAPE_KUBE_PROXY}} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
k8s-app: kube-proxy | ||
name: kube-proxy | ||
namespace: monitoring | ||
spec: | ||
endpoints: | ||
# We modify interval depending on the cluster size to avoid collecting too many samples for | ||
# large clusters. Also because the tests run longer in bigger clusters we don't need to | ||
# collect them as often as in smaller clusters. We use 30s interval for small clusters | ||
# (# nodes <= 1000) and 1min interval in big clusters (# nodes > 1000) | ||
# TODO(mm4tt): Once we prove the interval works in big clusters, simplify the expression. | ||
- interval: {{MinInt 60 (MultiplyInt 30 (AddInt 1 (DivideInt .Nodes 1001)))}}s | ||
port: http-metrics | ||
jobLabel: k8s-app | ||
namespaceSelector: | ||
matchNames: | ||
- kube-system | ||
selector: | ||
matchLabels: | ||
k8s-app: kube-proxy | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PROMETHEUS_SCRAPE_KUBE_PROXY: true |