From ea4465d95ac2c7db24e1dcb6ac9d3f0c4d909fb2 Mon Sep 17 00:00:00 2001 From: Craig Peterson <192540+captncraig@users.noreply.github.com> Date: Fri, 2 Jun 2023 13:09:26 -0400 Subject: [PATCH] Cherry Pick bugfix into 0.34 (#4046) * Fix issue where the in-memory dialer was not being passed to modules. (#4044) * Fix issue where the in-memory dialer was not being passed to modules. * Fix type * Fix location of changelog * update references for v0.34.0-rc.1 (#4047) * fix changelog for 0.34.0-rc.1 --------- Co-authored-by: mattdurham --- CHANGELOG.md | 7 +++++++ component/module/module.go | 1 + docs/sources/operator/deploy-agent-operator-resources.md | 4 ++-- docs/sources/operator/getting-started.md | 2 +- .../configuration/integrations/node-exporter-config.md | 4 ++-- .../configuration/integrations/process-exporter-config.md | 4 ++-- docs/sources/static/set-up/install-agent-docker.md | 4 ++-- pkg/operator/defaults.go | 2 +- production/kubernetes/agent-bare.yaml | 2 +- production/kubernetes/agent-loki.yaml | 2 +- production/kubernetes/agent-traces.yaml | 2 +- production/kubernetes/build/lib/version.libsonnet | 2 +- .../kubernetes/build/templates/operator/main.jsonnet | 4 ++-- production/kubernetes/install-bare.sh | 2 +- production/operator/templates/agent-operator.yaml | 4 ++-- production/tanka/grafana-agent/v1/main.libsonnet | 4 ++-- production/tanka/grafana-agent/v2/internal/base.libsonnet | 4 ++-- .../tanka/grafana-agent/v2/internal/syncer.libsonnet | 2 +- 18 files changed, 32 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e9423bc2e9d..63006baf965c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ This document contains a historical list of changes between releases. Only changes that impact end-user behavior are listed; changes to documentation or internal API changes are not present. +v0.34.0-rc.1 (2023-06-02) +-------------------- + +### Bugs + +- Fix issue where using exporters inside modules failed due to not passing the in-memory address dialer. (@mattdurham) + v0.34.0-rc.0 (2023-06-01) ------------------------- diff --git a/component/module/module.go b/component/module/module.go index 95b094e505af..d9fb4bf3713e 100644 --- a/component/module/module.go +++ b/component/module/module.go @@ -55,6 +55,7 @@ func NewModuleComponent(o component.Options) *ModuleComponent { OnExportsChange: func(exports map[string]any) { o.OnStateChange(Exports{Exports: exports}) }, + DialFunc: o.DialFunc, }), } } diff --git a/docs/sources/operator/deploy-agent-operator-resources.md b/docs/sources/operator/deploy-agent-operator-resources.md index 3c8f061feea3..19598b5f884d 100644 --- a/docs/sources/operator/deploy-agent-operator-resources.md +++ b/docs/sources/operator/deploy-agent-operator-resources.md @@ -53,12 +53,12 @@ To deploy the `GrafanaAgent` resource: labels: app: grafana-agent spec: - image: grafana/agent:v0.34.0-rc.0 + image: grafana/agent:v0.34.0-rc.1 integrations: selector: matchLabels: agent: grafana-agent-integrations - image: grafana/agent:v0.34.0-rc.0 + image: grafana/agent:v0.34.0-rc.1 logLevel: info serviceAccountName: grafana-agent metrics: diff --git a/docs/sources/operator/getting-started.md b/docs/sources/operator/getting-started.md index 4d629614e6cf..42521fd15458 100644 --- a/docs/sources/operator/getting-started.md +++ b/docs/sources/operator/getting-started.md @@ -73,7 +73,7 @@ To install Agent Operator: serviceAccountName: grafana-agent-operator containers: - name: operator - image: grafana/agent-operator:v0.34.0-rc.0 + image: grafana/agent-operator:v0.34.0-rc.1 args: - --kubelet-service=default/kubelet --- diff --git a/docs/sources/static/configuration/integrations/node-exporter-config.md b/docs/sources/static/configuration/integrations/node-exporter-config.md index 4bd61ba6e483..ccb9306df786 100644 --- a/docs/sources/static/configuration/integrations/node-exporter-config.md +++ b/docs/sources/static/configuration/integrations/node-exporter-config.md @@ -28,7 +28,7 @@ docker run \ -v "/proc:/host/proc:ro,rslave" \ -v /tmp/agent:/etc/agent \ -v /path/to/config.yaml:/etc/agent-config/agent.yaml \ - grafana/agent:v0.34.0-rc.0 \ + grafana/agent:v0.34.0-rc.1 \ --config.file=/etc/agent-config/agent.yaml ``` @@ -67,7 +67,7 @@ metadata: name: agent spec: containers: - - image: grafana/agent:v0.34.0-rc.0 + - image: grafana/agent:v0.34.0-rc.1 name: agent args: - --config.file=/etc/agent-config/agent.yaml diff --git a/docs/sources/static/configuration/integrations/process-exporter-config.md b/docs/sources/static/configuration/integrations/process-exporter-config.md index 899ea8509699..da9aa27bc0cc 100644 --- a/docs/sources/static/configuration/integrations/process-exporter-config.md +++ b/docs/sources/static/configuration/integrations/process-exporter-config.md @@ -20,7 +20,7 @@ docker run \ -v "/proc:/proc:ro" \ -v /tmp/agent:/etc/agent \ -v /path/to/config.yaml:/etc/agent-config/agent.yaml \ - grafana/agent:v0.34.0-rc.0 \ + grafana/agent:v0.34.0-rc.1 \ --config.file=/etc/agent-config/agent.yaml ``` @@ -37,7 +37,7 @@ metadata: name: agent spec: containers: - - image: grafana/agent:v0.34.0-rc.0 + - image: grafana/agent:v0.34.0-rc.1 name: agent args: - --config.file=/etc/agent-config/agent.yaml diff --git a/docs/sources/static/set-up/install-agent-docker.md b/docs/sources/static/set-up/install-agent-docker.md index bbf08d1fa8ef..0a59aa573532 100644 --- a/docs/sources/static/set-up/install-agent-docker.md +++ b/docs/sources/static/set-up/install-agent-docker.md @@ -29,7 +29,7 @@ Grafana Agent is available as a Docker container image on the following platform docker run \ -v WAL_DATA_DIRECTORY:/etc/agent/data \ -v CONFIG_FILE_PATH:/etc/agent/agent.yaml \ - grafana/agent:v0.34.0-rc.0 + grafana/agent:v0.34.0-rc.1 ``` - Replace `CONFIG_FILE_PATH` with the configuration file path on your Linux host system. @@ -47,7 +47,7 @@ Grafana Agent is available as a Docker container image on the following platform docker run ^ -v WAL_DATA_DIRECTORY:c:\etc\grafana-agent\data ^ -v CONFIG_FILE_PATH:c:\etc\grafana-agent ^ - grafana/agent:v0.34.0-rc.0-windows + grafana/agent:v0.34.0-rc.1-windows ``` - Replace `CONFIG_FILE_PATH` with the configuration file path on your Windows host system. diff --git a/pkg/operator/defaults.go b/pkg/operator/defaults.go index cc3d52dd2acb..b4e71f5dc585 100644 --- a/pkg/operator/defaults.go +++ b/pkg/operator/defaults.go @@ -2,7 +2,7 @@ package operator // Supported versions of the Grafana Agent. var ( - DefaultAgentVersion = "v0.34.0-rc.0" + DefaultAgentVersion = "v0.34.0-rc.1" DefaultAgentBaseImage = "grafana/agent" DefaultAgentImage = DefaultAgentBaseImage + ":" + DefaultAgentVersion ) diff --git a/production/kubernetes/agent-bare.yaml b/production/kubernetes/agent-bare.yaml index 1ef51afb7f27..23eb858932fe 100644 --- a/production/kubernetes/agent-bare.yaml +++ b/production/kubernetes/agent-bare.yaml @@ -83,7 +83,7 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName - image: grafana/agent:v0.34.0-rc.0 + image: grafana/agent:v0.34.0-rc.1 imagePullPolicy: IfNotPresent name: grafana-agent ports: diff --git a/production/kubernetes/agent-loki.yaml b/production/kubernetes/agent-loki.yaml index 054db621a1a2..9a04452e21b8 100644 --- a/production/kubernetes/agent-loki.yaml +++ b/production/kubernetes/agent-loki.yaml @@ -65,7 +65,7 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName - image: grafana/agent:v0.34.0-rc.0 + image: grafana/agent:v0.34.0-rc.1 imagePullPolicy: IfNotPresent name: grafana-agent-logs ports: diff --git a/production/kubernetes/agent-traces.yaml b/production/kubernetes/agent-traces.yaml index fff6632aa0d1..913bf539c1c0 100644 --- a/production/kubernetes/agent-traces.yaml +++ b/production/kubernetes/agent-traces.yaml @@ -114,7 +114,7 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName - image: grafana/agent:v0.34.0-rc.0 + image: grafana/agent:v0.34.0-rc.1 imagePullPolicy: IfNotPresent name: grafana-agent-traces ports: diff --git a/production/kubernetes/build/lib/version.libsonnet b/production/kubernetes/build/lib/version.libsonnet index 1ffafbe8b287..710485ee904d 100644 --- a/production/kubernetes/build/lib/version.libsonnet +++ b/production/kubernetes/build/lib/version.libsonnet @@ -1 +1 @@ -'grafana/agent:v0.34.0-rc.0' +'grafana/agent:v0.34.0-rc.1' diff --git a/production/kubernetes/build/templates/operator/main.jsonnet b/production/kubernetes/build/templates/operator/main.jsonnet index 1f91f779d910..73e8976bc615 100644 --- a/production/kubernetes/build/templates/operator/main.jsonnet +++ b/production/kubernetes/build/templates/operator/main.jsonnet @@ -23,8 +23,8 @@ local ksm = import 'kube-state-metrics/kube-state-metrics.libsonnet'; local this = self, _images:: { - agent: 'grafana/agent:v0.34.0-rc.0', - agent_operator: 'grafana/agent-operator:v0.34.0-rc.0', + agent: 'grafana/agent:v0.34.0-rc.1', + agent_operator: 'grafana/agent-operator:v0.34.0-rc.1', ksm: 'registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.5.0', }, diff --git a/production/kubernetes/install-bare.sh b/production/kubernetes/install-bare.sh index 1c1108db1da2..a8a988564b97 100644 --- a/production/kubernetes/install-bare.sh +++ b/production/kubernetes/install-bare.sh @@ -25,7 +25,7 @@ check_installed() { check_installed curl check_installed envsubst -MANIFEST_BRANCH=v0.34.0-rc.0 +MANIFEST_BRANCH=v0.34.0-rc.1 MANIFEST_URL=${MANIFEST_URL:-https://raw.githubusercontent.com/grafana/agent/${MANIFEST_BRANCH}/production/kubernetes/agent-bare.yaml} NAMESPACE=${NAMESPACE:-default} diff --git a/production/operator/templates/agent-operator.yaml b/production/operator/templates/agent-operator.yaml index f07b73c7f663..2f2741c9f3c1 100644 --- a/production/operator/templates/agent-operator.yaml +++ b/production/operator/templates/agent-operator.yaml @@ -372,7 +372,7 @@ spec: containers: - args: - --kubelet-service=default/kubelet - image: grafana/agent-operator:v0.34.0-rc.0 + image: grafana/agent-operator:v0.34.0-rc.1 imagePullPolicy: IfNotPresent name: grafana-agent-operator serviceAccount: grafana-agent-operator @@ -436,7 +436,7 @@ metadata: name: grafana-agent namespace: ${NAMESPACE} spec: - image: grafana/agent:v0.34.0-rc.0 + image: grafana/agent:v0.34.0-rc.1 integrations: selector: matchLabels: diff --git a/production/tanka/grafana-agent/v1/main.libsonnet b/production/tanka/grafana-agent/v1/main.libsonnet index 97eb424f60ce..1668d54a90cd 100644 --- a/production/tanka/grafana-agent/v1/main.libsonnet +++ b/production/tanka/grafana-agent/v1/main.libsonnet @@ -15,8 +15,8 @@ local service = k.core.v1.service; (import './lib/traces.libsonnet') + { _images:: { - agent: 'grafana/agent:v0.34.0-rc.0', - agentctl: 'grafana/agentctl:v0.34.0-rc.0', + agent: 'grafana/agent:v0.34.0-rc.1', + agentctl: 'grafana/agentctl:v0.34.0-rc.1', }, // new creates a new DaemonSet deployment of the grafana-agent. By default, diff --git a/production/tanka/grafana-agent/v2/internal/base.libsonnet b/production/tanka/grafana-agent/v2/internal/base.libsonnet index de4192ffe81f..d7a58edc908d 100644 --- a/production/tanka/grafana-agent/v2/internal/base.libsonnet +++ b/production/tanka/grafana-agent/v2/internal/base.libsonnet @@ -11,8 +11,8 @@ function(name='grafana-agent', namespace='') { local this = self, _images:: { - agent: 'grafana/agent:v0.34.0-rc.0', - agentctl: 'grafana/agentctl:v0.34.0-rc.0', + agent: 'grafana/agent:v0.34.0-rc.1', + agentctl: 'grafana/agentctl:v0.34.0-rc.1', }, _config:: { name: name, diff --git a/production/tanka/grafana-agent/v2/internal/syncer.libsonnet b/production/tanka/grafana-agent/v2/internal/syncer.libsonnet index 43d204b14ddf..0e76a7cb29e3 100644 --- a/production/tanka/grafana-agent/v2/internal/syncer.libsonnet +++ b/production/tanka/grafana-agent/v2/internal/syncer.libsonnet @@ -14,7 +14,7 @@ function( ) { local _config = { api: error 'api must be set', - image: 'grafana/agentctl:v0.34.0-rc.0', + image: 'grafana/agentctl:v0.34.0-rc.1', schedule: '*/5 * * * *', configs: [], } + config,