From 01708a39ac1ac9be858a6262fad1e0162433a403 Mon Sep 17 00:00:00 2001 From: Emil Kordahl <89079229+emilkor1@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:17:31 +0100 Subject: [PATCH 1/8] Add automount option for service account and pod Signed-off-by: emilkor1 --- charts/promtail/Chart.yaml | 2 +- charts/promtail/templates/_pod.tpl | 1 + charts/promtail/templates/serviceaccount.yaml | 1 + charts/promtail/values.yaml | 5 +++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/promtail/Chart.yaml b/charts/promtail/Chart.yaml index ff14820528..fa9bec5146 100644 --- a/charts/promtail/Chart.yaml +++ b/charts/promtail/Chart.yaml @@ -3,7 +3,7 @@ name: promtail description: Promtail is an agent which ships the contents of local logs to a Loki instance type: application appVersion: 2.9.3 -version: 6.15.5 +version: 6.15.6 home: https://grafana.com/loki sources: - https://github.com/grafana/loki diff --git a/charts/promtail/templates/_pod.tpl b/charts/promtail/templates/_pod.tpl index 3a366a599f..223923fde1 100644 --- a/charts/promtail/templates/_pod.tpl +++ b/charts/promtail/templates/_pod.tpl @@ -17,6 +17,7 @@ metadata: {{- end }} spec: serviceAccountName: {{ include "promtail.serviceAccountName" . }} + automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} {{- include "promtail.enableServiceLinks" . | nindent 2 }} {{- with .Values.hostNetwork }} hostNetwork: {{ . }} diff --git a/charts/promtail/templates/serviceaccount.yaml b/charts/promtail/templates/serviceaccount.yaml index 658c2012f3..8d799ff712 100644 --- a/charts/promtail/templates/serviceaccount.yaml +++ b/charts/promtail/templates/serviceaccount.yaml @@ -10,6 +10,7 @@ metadata: annotations: {{- toYaml . | nindent 4 }} {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- with .Values.serviceAccount.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 2 }} diff --git a/charts/promtail/values.yaml b/charts/promtail/values.yaml index b483599002..dbb0257304 100644 --- a/charts/promtail/values.yaml +++ b/charts/promtail/values.yaml @@ -186,6 +186,11 @@ serviceAccount: imagePullSecrets: [] # -- Annotations for the service account annotations: {} + # -- Automatically mount a ServiceAccount's API credentials + automountServiceAccountToken: true + +# -- Automatically mount API credentials for a particular Pod +automountServiceAccountToken: true # -- Node selector for pods nodeSelector: {} From dfcadd2e3c6a7f01c99142895922faec10f42c59 Mon Sep 17 00:00:00 2001 From: emilkor1 Date: Mon, 26 Feb 2024 12:41:03 +0100 Subject: [PATCH 2/8] [promtail] Update README.md Signed-off-by: emilkor1 --- charts/promtail/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/promtail/README.md b/charts/promtail/README.md index 19b9a14b59..61bc756790 100644 --- a/charts/promtail/README.md +++ b/charts/promtail/README.md @@ -1,6 +1,6 @@ # promtail -![Version: 6.15.5](https://img.shields.io/badge/Version-6.15.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.3](https://img.shields.io/badge/AppVersion-2.9.3-informational?style=flat-square) +![Version: 6.15.6](https://img.shields.io/badge/Version-6.15.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.3](https://img.shields.io/badge/AppVersion-2.9.3-informational?style=flat-square) Promtail is an agent which ships the contents of local logs to a Loki instance @@ -70,6 +70,7 @@ The new release which will pick up again from the existing `positions.yaml`. |-----|------|---------|-------------| | affinity | object | `{}` | Affinity configuration for pods | | annotations | object | `{}` | Annotations for the DaemonSet | +| automountServiceAccountToken | bool | `true` | Automatically mount API credentials for a particular Pod | | config | object | See `values.yaml` | Section for crafting Promtails config file. The only directly relevant value is `config.file` which is a templated string that references the other values and snippets below this key. | | config.clients | list | See `values.yaml` | The config of clients of the Promtail server Must be reference in `config.file` to configure `clients` | | config.enableTracing | bool | `false` | The config to enable tracing | @@ -144,6 +145,7 @@ The new release which will pick up again from the existing `positions.yaml`. | secret.annotations | object | `{}` | Annotations for the Secret | | secret.labels | object | `{}` | Labels for the Secret | | serviceAccount.annotations | object | `{}` | Annotations for the service account | +| serviceAccount.automountServiceAccountToken | bool | `true` | Automatically mount a ServiceAccount's API credentials | | serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created | | serviceAccount.imagePullSecrets | list | `[]` | Image pull secrets for the service account | | serviceAccount.name | string | `nil` | The name of the ServiceAccount to use. If not set and `create` is true, a name is generated using the fullname template | From 323e8436031dbb5f1137ad1e9bd2e741699a4e07 Mon Sep 17 00:00:00 2001 From: Usman Ahmad Date: Sat, 24 Aug 2024 11:06:41 +0200 Subject: [PATCH 3/8] [grafana] fixed url link for persistent volume claim in values.yaml (#2881) Co-authored-by: MH --- charts/grafana/Chart.yaml | 2 +- charts/grafana/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/grafana/Chart.yaml b/charts/grafana/Chart.yaml index 81ccd066da..d463903c3c 100644 --- a/charts/grafana/Chart.yaml +++ b/charts/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: grafana -version: 8.4.7 +version: 8.4.8 appVersion: 11.1.4 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/charts/grafana/values.yaml b/charts/grafana/values.yaml index f1ffc9d928..ba7dd3fd28 100644 --- a/charts/grafana/values.yaml +++ b/charts/grafana/values.yaml @@ -367,7 +367,7 @@ extraContainerVolumes: [] # emptyDir: {} ## Enable persistence using Persistent Volume Claims -## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ +## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ ## persistence: type: pvc From 0af99fac51424d0e5bb19e0da25a7750d3062f42 Mon Sep 17 00:00:00 2001 From: Robert Lankford Date: Mon, 26 Aug 2024 09:11:29 -0700 Subject: [PATCH 4/8] [grafana-sampling] set resource_metrics_key_attributes to match dimensions in spanmetrics connector (#3279) * set resource_metrics_key_attributes to match dimensions in spanmetrics connector --------- Signed-off-by: Robbie Lankford Co-authored-by: MH --- charts/grafana-sampling/Chart.yaml | 2 +- charts/grafana-sampling/README.md | 2 +- .../templates/_otelcol_connector_spanmetrics.alloy.txt | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/charts/grafana-sampling/Chart.yaml b/charts/grafana-sampling/Chart.yaml index 00abebbde7..e6e44c81da 100644 --- a/charts/grafana-sampling/Chart.yaml +++ b/charts/grafana-sampling/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: grafana-sampling description: A Helm chart for a layered OTLP tail sampling and metrics generation pipeline. type: application -version: 1.0.0 +version: 1.0.1 appVersion: "v1.3.0" sources: - https://github.com/grafana/alloy diff --git a/charts/grafana-sampling/README.md b/charts/grafana-sampling/README.md index 3ead959cc8..81e00e5800 100644 --- a/charts/grafana-sampling/README.md +++ b/charts/grafana-sampling/README.md @@ -1,6 +1,6 @@ # grafana-sampling -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.0](https://img.shields.io/badge/AppVersion-v1.3.0-informational?style=flat-square) +![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.0](https://img.shields.io/badge/AppVersion-v1.3.0-informational?style=flat-square) A Helm chart for a layered OTLP tail sampling and metrics generation pipeline. diff --git a/charts/grafana-sampling/templates/_otelcol_connector_spanmetrics.alloy.txt b/charts/grafana-sampling/templates/_otelcol_connector_spanmetrics.alloy.txt index f66f5bd860..29aead33aa 100644 --- a/charts/grafana-sampling/templates/_otelcol_connector_spanmetrics.alloy.txt +++ b/charts/grafana-sampling/templates/_otelcol_connector_spanmetrics.alloy.txt @@ -7,6 +7,16 @@ otelcol.connector.spanmetrics "default" { } {{- end }} + resource_metrics_key_attributes = [ + "service.name", + "span.name", + "span.kind", + "status.code", + {{- range $.Values.metricsGeneration.dimensions }} + {{ . | quote }}, + {{- end }} + ] + {{ if .Values.metricsGeneration.legacy }} namespace = "traces.spanmetrics" {{- end }} From d75b99aa79c11105a702c0a8d4fa3853cb5dad06 Mon Sep 17 00:00:00 2001 From: Jawad S Date: Tue, 27 Aug 2024 15:25:34 +0200 Subject: [PATCH 5/8] feat(grafana): add support for overriding the call back url and server urls This feature allows for running Grafana and remote image renderer in different namespaces. It is especially useful when you have multiple grafana instances in different clusters and namespaces and you want . them to use same remote image renderer. Signed-off-by: Jawad S --- charts/grafana/Chart.yaml | 2 +- charts/grafana/README.md | 2 ++ charts/grafana/templates/_pod.tpl | 8 ++++++++ charts/grafana/values.yaml | 4 ++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/charts/grafana/Chart.yaml b/charts/grafana/Chart.yaml index d463903c3c..80c05b41a8 100644 --- a/charts/grafana/Chart.yaml +++ b/charts/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: grafana -version: 8.4.8 +version: 8.5.0 appVersion: 11.1.4 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/charts/grafana/README.md b/charts/grafana/README.md index 1ce98bfd30..2c9609e122 100644 --- a/charts/grafana/README.md +++ b/charts/grafana/README.md @@ -292,6 +292,8 @@ need to instead set `global.imageRegistry`. | `imageRenderer.service.targetPort` | image-renderer service port used by service | `8081` | | `imageRenderer.appProtocol` | Adds the appProtocol field to the service | `` | | `imageRenderer.grafanaSubPath` | Grafana sub path to use for image renderer callback url | `''` | +| `imageRenderer.serverURL` | Remote image renderer url | `''` | +| `imageRenderer.renderingCallbackURL` | Callback url for the Grafana image renderer | `''` | | `imageRenderer.podPortName` | name of the image-renderer port on the pod | `http` | | `imageRenderer.revisionHistoryLimit` | number of image-renderer replica sets to keep | `10` | | `imageRenderer.networkPolicy.limitIngress` | Enable a NetworkPolicy to limit inbound traffic from only the created grafana pods | `true` | diff --git a/charts/grafana/templates/_pod.tpl b/charts/grafana/templates/_pod.tpl index c74e9ddcac..b3f51ef271 100644 --- a/charts/grafana/templates/_pod.tpl +++ b/charts/grafana/templates/_pod.tpl @@ -1059,9 +1059,17 @@ containers: {{- end }} {{- if .Values.imageRenderer.enabled }} - name: GF_RENDERING_SERVER_URL + {{- if .Values.imageRenderer.serverURL }} + value: {{ .Values.imageRenderer.serverURL | quote }} + {{ else }} value: http://{{ include "grafana.fullname" . }}-image-renderer.{{ include "grafana.namespace" . }}:{{ .Values.imageRenderer.service.port }}/render + {{- end }} - name: GF_RENDERING_CALLBACK_URL + {{- if .Values.imageRenderer.renderingCallbackURL }} + value: {{ .Values.imageRenderer.renderingCallbackURL | quote }} + {{ else }} value: {{ .Values.imageRenderer.grafanaProtocol }}://{{ include "grafana.fullname" . }}.{{ include "grafana.namespace" . }}:{{ .Values.service.port }}/{{ .Values.imageRenderer.grafanaSubPath }} + {{- end }} {{- end }} - name: GF_PATHS_DATA value: {{ (get .Values "grafana.ini").paths.data }} diff --git a/charts/grafana/values.yaml b/charts/grafana/values.yaml index ba7dd3fd28..51e94e01ff 100644 --- a/charts/grafana/values.yaml +++ b/charts/grafana/values.yaml @@ -1160,6 +1160,10 @@ imageRenderer: targetCPU: "60" targetMemory: "" behavior: {} + # The url of remote image renderer if it is not in the same namespace with the grafana instance + serverURL: "" + # The callback url of grafana instances if it is not in the same namespace with the remote image renderer + renderingCallbackURL: "" image: # -- The Docker registry registry: docker.io From 39f0ef0d6b78d09849940de1269df38661edbe1e Mon Sep 17 00:00:00 2001 From: dig-whois <175815684+dig-whois@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:05:50 +0200 Subject: [PATCH 6/8] Update charts/grafana/templates/_pod.tpl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jan-Otto Kröpke Signed-off-by: dig-whois <175815684+dig-whois@users.noreply.github.com> --- charts/grafana/templates/_pod.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/grafana/templates/_pod.tpl b/charts/grafana/templates/_pod.tpl index b3f51ef271..a50368f238 100644 --- a/charts/grafana/templates/_pod.tpl +++ b/charts/grafana/templates/_pod.tpl @@ -1061,7 +1061,7 @@ containers: - name: GF_RENDERING_SERVER_URL {{- if .Values.imageRenderer.serverURL }} value: {{ .Values.imageRenderer.serverURL | quote }} - {{ else }} + {{- else }} value: http://{{ include "grafana.fullname" . }}-image-renderer.{{ include "grafana.namespace" . }}:{{ .Values.imageRenderer.service.port }}/render {{- end }} - name: GF_RENDERING_CALLBACK_URL From 4c984bce220ea557dc2bb31e6046bfdf214677bf Mon Sep 17 00:00:00 2001 From: dig-whois <175815684+dig-whois@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:05:57 +0200 Subject: [PATCH 7/8] Update charts/grafana/templates/_pod.tpl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jan-Otto Kröpke Signed-off-by: dig-whois <175815684+dig-whois@users.noreply.github.com> --- charts/grafana/templates/_pod.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/grafana/templates/_pod.tpl b/charts/grafana/templates/_pod.tpl index a50368f238..716e27d022 100644 --- a/charts/grafana/templates/_pod.tpl +++ b/charts/grafana/templates/_pod.tpl @@ -1067,7 +1067,7 @@ containers: - name: GF_RENDERING_CALLBACK_URL {{- if .Values.imageRenderer.renderingCallbackURL }} value: {{ .Values.imageRenderer.renderingCallbackURL | quote }} - {{ else }} + {{- else }} value: {{ .Values.imageRenderer.grafanaProtocol }}://{{ include "grafana.fullname" . }}.{{ include "grafana.namespace" . }}:{{ .Values.service.port }}/{{ .Values.imageRenderer.grafanaSubPath }} {{- end }} {{- end }} From 90fb6f8d92c64248927777ed04d973315ab472cd Mon Sep 17 00:00:00 2001 From: Tobias Amft Date: Tue, 27 Aug 2024 17:01:52 +0200 Subject: [PATCH 8/8] Update Grafana version to 11.1.5 Signed-off-by: Tobias Amft --- charts/grafana/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/grafana/Chart.yaml b/charts/grafana/Chart.yaml index d463903c3c..42d453caa6 100644 --- a/charts/grafana/Chart.yaml +++ b/charts/grafana/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: grafana -version: 8.4.8 -appVersion: 11.1.4 +version: 8.4.9 +appVersion: 11.1.5 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. home: https://grafana.com