Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨(helm) add local prom and grafana #120

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/helm/env.d/dev/values.grafana.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
rbac:
create: true
namespaced: true
ingress:
enabled: true
hosts:
- grafana.127.0.0.1.nip.io
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
testFramework:
enabled: false
persistence:
type: pvc
enabled: true
size: 10Gi
adminUser: admin
adminPassword: strongpassword
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-server
access: proxy
isDefault: true
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default
dashboards:
default:
prometheus-2-stats:
url: https://raw.githubusercontent.com/grafana/grafana/main/public/app/plugins/datasource/prometheus/dashboards/prometheus_2_stats.json
datasource: Prometheus
grafana-metrics:
url: https://raw.githubusercontent.com/grafana/grafana/main/public/app/plugins/datasource/prometheus/dashboards/grafana_stats.json
datasource: Prometheus
68 changes: 68 additions & 0 deletions src/helm/env.d/dev/values.prometheus.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
rbac:
create: true

server:
releaseNamespace: true
namespaces:
- {{ .Release.Namespace | quote }}
global:
## How frequently to scrape targets by default
##
scrape_interval: 1m
## How long until a scrape request times out
##
scrape_timeout: 10s
## How frequently to evaluate rules
##
evaluation_interval: 1m
persistentVolume:
enabled: true
size: 8Gi
resources: {}
# limits:
# cpu: 500m
# memory: 512Mi
# requests:
# cpu: 500m
# memory: 512Mi
retention: "2y"
serverFiles:
prometheus.yml:
rule_files:
- /etc/config/recording_rules.yml
- /etc/config/alerting_rules.yml
## Below two files are DEPRECATED will be removed from this default values file
- /etc/config/rules
- /etc/config/alerts

scrape_configs:
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- job_name: grafana
static_configs:
- targets:
- grafana:80

alertmanager:
## If false, alertmanager will not be installed
##
enabled: true

persistence:
size: 2Gi

podSecurityContext:
runAsUser: 65534
runAsNonRoot: true
runAsGroup: 65534
fsGroup: 65534

kube-state-metrics:
enabled: false

prometheus-node-exporter:
enabled: false
prometheus-pushgateway:
enabled: false
18 changes: 18 additions & 0 deletions src/helm/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ repositories:
oci: true
- name: livekit
url: https://helm.livekit.io
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: grafana
url: https://grafana.github.io/helm-charts

releases:
- name: postgres
Expand Down Expand Up @@ -55,6 +59,20 @@ releases:
secrets:
- env.d/{{ .Environment.Name }}/secrets.enc.yaml

- name: prometheus
namespace: {{ .Namespace }}
version: 25.26.0
chart: prometheus-community/prometheus
values:
- env.d/{{ .Environment.Name }}/values.prometheus.yaml.gotmpl

- name: grafana
namespace: {{ .Namespace }}
version: 8.4.8
chart: grafana/grafana
values:
- env.d/{{ .Environment.Name }}/values.grafana.yaml.gotmpl

environments:
dev:
values:
Expand Down