Skip to content

Commit

Permalink
Replace grafana, prometheus with kube-prometheus-stack (#23)
Browse files Browse the repository at this point in the history
* Replace grafana, prometheus with kube-prometheus-stack

* Update README.md
  • Loading branch information
mherda64 committed Jun 9, 2023
1 parent 76f2b7b commit 0a35eb8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 37 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ Source:
## Setting up ArgoCD and Grafana/Loki/Promtail stack for monitoring
1. Run `terraform apply` on a machine which keeps the state of the cluster.

## Accessing Grafana

```shell
kubectl port-forward svc/prometheus-grafana -n monitoring 3000:80

```

## Accessing ArgoCD

```shell
Expand Down
23 changes: 6 additions & 17 deletions terraform/monitoring.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
resource "helm_release" "grafana" {
name = "grafana"
resource "helm_release" "kube-prometheus-stack" {
name = "prometheus"

repository = "https://grafana.github.io/helm-charts"
chart = "grafana"
repository = "https://prometheus-community.github.io/helm-charts"
chart = "kube-prometheus-stack"
namespace = "monitoring"
version = "6.54.0"
version = "46.8.0"
create_namespace = true

values = [
file("resources/grafana.yaml")
file("resources/kube-prometheus-stack.yaml")
]

}
Expand Down Expand Up @@ -37,15 +37,4 @@ resource "helm_release" "promtail" {
version = "6.10.0"
create_namespace = true

}

resource "helm_release" "prometheus" {
name = "prometheus"

repository = "https://prometheus-community.github.io/helm-charts"
chart = "prometheus"
namespace = "monitoring"
version = "22.4.1"
create_namespace = true

}
20 changes: 0 additions & 20 deletions terraform/resources/grafana.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions terraform/resources/kube-prometheus-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
grafana:
additionalDataSources:
- name: Loki
type: loki
url: http://loki:3100

0 comments on commit 0a35eb8

Please sign in to comment.