Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #73 from zatricky/master
Browse files Browse the repository at this point in the history
Updates for 1.7 cadvisor changes and rbac requirements
  • Loading branch information
pipo02mix authored Nov 7, 2018
2 parents ffe7474 + 95191f7 commit 9d7b655
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configs/grafana/grafana-net-2-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"step": 4
}],
"thresholds": "500,4000",
"title": "Interal Storage Queue Length",
"title": "Internal Storage Queue Length",
"type": "singlestat",
"valueFontSize": "70%",
"valueMaps": [{
Expand Down
17 changes: 17 additions & 0 deletions configs/prometheus/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,20 @@ scrape_configs:
- source_labels: [__meta_kubernetes_pod_container_port_number]
action: keep
regex: 9\d{3}
- job_name: 'kubernetes-cadvisor'
scheme: https
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: node
relabel_configs:
- action: labelmap
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
replacement: kubernetes.default.svc:443
- source_labels: [__meta_kubernetes_node_name]
regex: (.+)
target_label: __metrics_path__
replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
21 changes: 19 additions & 2 deletions manifests-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ data:
"step": 4
}],
"thresholds": "500,4000",
"title": "Interal Storage Queue Length",
"title": "Internal Storage Queue Length",
"type": "singlestat",
"valueFontSize": "70%",
"valueMaps": [{
Expand Down Expand Up @@ -2455,6 +2455,23 @@ data:
- source_labels: [__meta_kubernetes_pod_container_port_number]
action: keep
regex: 9\d{3}
- job_name: 'kubernetes-cadvisor'
scheme: https
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: node
relabel_configs:
- action: labelmap
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
replacement: kubernetes.default.svc:443
- source_labels: [__meta_kubernetes_node_name]
regex: (.+)
target_label: __metrics_path__
replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down Expand Up @@ -2780,7 +2797,6 @@ metadata:
name: prometheus-rules
namespace: monitoring
---
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
Expand All @@ -2802,6 +2818,7 @@ rules:
- apiGroups: [""]
resources:
- nodes
- nodes/proxy
- services
- endpoints
- pods
Expand Down
2 changes: 1 addition & 1 deletion manifests/grafana/import-dashboards/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ data:
"step": 4
}],
"thresholds": "500,4000",
"title": "Interal Storage Queue Length",
"title": "Internal Storage Queue Length",
"type": "singlestat",
"valueFontSize": "70%",
"valueMaps": [{
Expand Down
17 changes: 17 additions & 0 deletions manifests/prometheus/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,23 @@ data:
- source_labels: [__meta_kubernetes_pod_container_port_number]
action: keep
regex: 9\d{3}
- job_name: 'kubernetes-cadvisor'
scheme: https
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: node
relabel_configs:
- action: labelmap
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
replacement: kubernetes.default.svc:443
- source_labels: [__meta_kubernetes_node_name]
regex: (.+)
target_label: __metrics_path__
replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
1 change: 1 addition & 0 deletions manifests/prometheus/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ rules:
- apiGroups: [""]
resources:
- nodes
- nodes/proxy
- services
- endpoints
- pods
Expand Down

0 comments on commit 9d7b655

Please sign in to comment.