Skip to content

Commit

Permalink
Merge pull request #8 from AndreZiviani/fix-default-config
Browse files Browse the repository at this point in the history
fix global parameters on prometheus config
  • Loading branch information
AndreZiviani authored May 27, 2021
2 parents 617dfaa + 61f8dfd commit dc0134b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion charts/grafana-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: grafana-agent
description: Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the opinionated Grafana observability stack.
type: application
appVersion: 0.14.0
version: 1.0.5
version: 1.0.6
home: https://github.com/grafana/agent/
sources:
- https://grafana.com/docs/grafana-cloud/agent/
Expand Down
2 changes: 1 addition & 1 deletion charts/grafana-agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# grafana-agent

![Version: 1.0.5](https://img.shields.io/badge/Version-1.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.14.0](https://img.shields.io/badge/AppVersion-0.14.0-informational?style=flat-square)
![Version: 1.0.6](https://img.shields.io/badge/Version-1.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.14.0](https://img.shields.io/badge/AppVersion-0.14.0-informational?style=flat-square)

This chart is a temporary solution while the [Operator is not finished](https://github.com/grafana/agent/pull/549),
after that this chart will be discontinued.
Expand Down
58 changes: 28 additions & 30 deletions charts/grafana-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,23 @@ prometheusDaemonSet:
# -- Section for configuring the prometheus daemonset part of the agent
# @default -- See `values.yaml`
config: |
global:
scrape_interval: 15s
remote_write:
- url: {{ .Values.prometheusDaemonSet.remoteWriteURL }}
{{- if .Values.prometheusDaemonSet.basicAuth }}
basic_auth:
password: {{ .Values.prometheusDaemonSet.basicAuth.password }}
username: {{ .Values.prometheusDaemonSet.basicAuth.username }}
{{- end }}
{{- if .Values.prometheusDaemonSet.tenant }}
headers:
"X-Scope-OrgID": {{ .Values.prometheusDaemonSet.tenant }}
{{- end }}
wal_directory: /var/lib/agent/data
configs:
- host_filter: true
name: agent
global:
remote_write:
- url: {{ .Values.prometheusDaemonSet.remoteWriteURL }}
{{- if .Values.prometheusDaemonSet.basicAuth }}
basic_auth:
password: {{ .Values.prometheusDaemonSet.basicAuth.password }}
username: {{ .Values.prometheusDaemonSet.basicAuth.username }}
{{- end }}
{{- if .Values.prometheusDaemonSet.tenant }}
headers:
"X-Scope-OrgID": {{ .Values.prometheusDaemonSet.tenant }}
{{- end }}
scrape_configs:
- job_name: kubernetes-pods
kubernetes_sd_configs:
Expand Down Expand Up @@ -266,9 +268,6 @@ prometheusDaemonSet:
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: false
global:
scrape_interval: 15s
wal_directory: /var/lib/agent/data
prometheusDeployment:
# -- Enable metrics collection in deployment mode
Expand All @@ -284,21 +283,23 @@ prometheusDeployment:
# -- Section for configuring the prometheus deployment part of the agent
# @default -- See `values.yaml`
config: |
global:
scrape_interval: 15s
remote_write:
- url: {{ .Values.prometheusDeployment.remoteWriteURL }}
{{- if .Values.prometheusDeployment.basicAuth }}
basic_auth:
password: {{ .Values.prometheusDeployment.basicAuth.password }}
username: {{ .Values.prometheusDeployment.basicAuth.username }}
{{- end }}
{{- if .Values.prometheusDeployment.tenant }}
headers:
"X-Scope-OrgID": {{ .Values.prometheusDeployment.tenant }}
{{- end }}
wal_directory: /var/lib/agent/data
configs:
- host_filter: false
name: agent
global:
remote_write:
- url: {{ .Values.prometheusDeployment.remoteWriteURL }}
{{- if .Values.prometheusDeployment.basicAuth }}
basic_auth:
password: {{ .Values.prometheusDeployment.basicAuth.password }}
username: {{ .Values.prometheusDeployment.basicAuth.username }}
{{- end }}
{{- if .Values.prometheusDeployment.tenant }}
headers:
"X-Scope-OrgID": {{ .Values.prometheusDeployment.tenant }}
{{- end }}
scrape_configs:
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: default/kubernetes
Expand All @@ -319,9 +320,6 @@ prometheusDeployment:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: false
server_name: kubernetes
global:
scrape_interval: 15s
wal_directory: /var/lib/agent/data
loki:
# -- Enable metrics collection in daemonset mode.
Expand Down

0 comments on commit dc0134b

Please sign in to comment.