Skip to content

Commit

Permalink
#25 fixed selector for kube-prometheus-stack, changed url for grafana…
Browse files Browse the repository at this point in the history
… dashboards
  • Loading branch information
khalezin committed Apr 22, 2021
1 parent 149080b commit 54deef3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 16 deletions.
11 changes: 7 additions & 4 deletions terraform/layer2-k8s/templates/cluster-autoscaler-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ autoDiscovery:
clusterName: ${cluster_name}

serviceMonitor:
enabled: false
enabled: true
interval: 10s
namespace: monitoring
selector:
prometheus: prometheus-operator
app: kube-prometheus-stack-operator
release: kube-prometheus-stack
path: /metrics

affinity:
Expand All @@ -23,5 +25,6 @@ affinity:
- matchExpressions:
- key: node.kubernetes.io/lifecycle
operator: In
values:
- ondemand
values:
- ondemand

3 changes: 2 additions & 1 deletion terraform/layer2-k8s/templates/external-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ metrics:
enabled: false
namespace: monitoring
selector:
prometheus: prometheus-operator
app: kube-prometheus-stack-operator
release: kube-prometheus-stack

sources:
- service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ controller:
metrics:
enabled: true
serviceMonitor:
enabled: false
enabled: true
additionalLabels:
release: prometheus-operator
app: kube-prometheus-stack-operator
release: kube-prometheus-stack

affinity:
nodeAffinity:
Expand All @@ -41,7 +42,7 @@ controller:
- matchExpressions:
- key: node.kubernetes.io/lifecycle
operator: In
values:
values:
- ondemand

rbac:
Expand Down
7 changes: 4 additions & 3 deletions terraform/layer2-k8s/templates/nginx-ingress-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ controller:
metrics:
enabled: true
serviceMonitor:
enabled: false
enabled: true
additionalLabels:
release: prometheus-operator
app: kube-prometheus-stack-operator
release: kube-prometheus-stack

podAnnotations:
co.elastic.logs/module: nginx
Expand All @@ -37,7 +38,7 @@ controller:
- matchExpressions:
- key: node.kubernetes.io/lifecycle
operator: In
values:
values:
- ondemand

rbac:
Expand Down
7 changes: 4 additions & 3 deletions terraform/layer2-k8s/templates/prometheus-mysql-exporter.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
serviceMonitor:
enabled: false
enabled: true
additionalLabels:
release: prometheus-operator
app: kube-prometheus-stack-operator
release: kube-prometheus-stack

mysql:
existingSecret: mysql-exporter
Expand All @@ -13,5 +14,5 @@ affinity:
- matchExpressions:
- key: node.kubernetes.io/lifecycle
operator: In
values:
values:
- spot
16 changes: 14 additions & 2 deletions terraform/layer2-k8s/templates/prometheus-values.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,25 @@ grafana:
dashboards:
logs:
logs:
url: https://gist.githubusercontent.com/khalezin/49766ed2976d49b0dc84a9c7809392e5/raw/53c0d067713e4da0e6cf187c6515a19e5dd996f5/loki-dashboard-quick-search.json
url: https://s3.amazonaws.com/grafana-dashboards.maddevs.org/common/aws-eks-base/loki-dashboard-quick-search.json

k8s:
nginx-ingress:
gnetId: 6927
datasource: Prometheus
loki-promtail:
url: https://gist.githubusercontent.com/khalezin/dd63440a404afc7ff13815dded04e74a/raw/613f52a7c57b824ec52c15a8e89ff6ba2ba2f73d/loki-promtail.json
url: https://s3.amazonaws.com/grafana-dashboards.maddevs.org/common/aws-eks-base/loki-promtail.json
core-dns:
url: https://s3.amazonaws.com/grafana-dashboards.maddevs.org/common/aws-eks-base/core-dns.json
cluster-autoscaler:
url: https://s3.amazonaws.com/grafana-dashboards.maddevs.org/common/aws-eks-base/cluster-autoscaler.json


plugins:
- grafana-piechart-panel
- simpod-json-datasource
- devopsprodigy-kubegraf-app
- grafana-worldmap-panel

affinity:
nodeAffinity:
Expand Down

0 comments on commit 54deef3

Please sign in to comment.