diff --git a/CHANGELOG.md b/CHANGELOG.md index e40aa390bb55..760125dcbd1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,21 @@ 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.31.1 (2023-02-06) +-------------------- + +> **BREAKING CHANGES**: This release has breaking changes. Please read entries +> carefully and consult the [upgrade guide][] for specific instructions. + +### Breaking changes + +- All release Windows `.exe` files are now published as a zip archive. + Previously, `grafana-agent-installer.exe` was unzipped. (@rfratto) + +### Other changes + +- Support Go 1.20 for builds. (@rfratto) + v0.31.0 (2023-01-31) -------------------- diff --git a/docs/sources/configuration/integrations/node-exporter-config.md b/docs/sources/configuration/integrations/node-exporter-config.md index 3ef5857b9069..08011470fbcd 100644 --- a/docs/sources/configuration/integrations/node-exporter-config.md +++ b/docs/sources/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.31.0 \ + grafana/agent:v0.31.1 \ --config.file=/etc/agent-config/agent.yaml ``` @@ -67,7 +67,7 @@ metadata: name: agent spec: containers: - - image: grafana/agent:v0.31.0 + - image: grafana/agent:v0.31.1 name: agent args: - --config.file=/etc/agent-config/agent.yaml diff --git a/docs/sources/configuration/integrations/process-exporter-config.md b/docs/sources/configuration/integrations/process-exporter-config.md index aceaf0ac89ff..592f4f9f29e4 100644 --- a/docs/sources/configuration/integrations/process-exporter-config.md +++ b/docs/sources/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.31.0 \ + grafana/agent:v0.31.1 \ --config.file=/etc/agent-config/agent.yaml ``` @@ -37,7 +37,7 @@ metadata: name: agent spec: containers: - - image: grafana/agent:v0.31.0 + - image: grafana/agent:v0.31.1 name: agent args: - --config.file=/etc/agent-config/agent.yaml diff --git a/docs/sources/operator/deploy-agent-operator-resources.md b/docs/sources/operator/deploy-agent-operator-resources.md index f7f4cf78689d..f1036150122e 100644 --- a/docs/sources/operator/deploy-agent-operator-resources.md +++ b/docs/sources/operator/deploy-agent-operator-resources.md @@ -54,7 +54,7 @@ To deploy the `GrafanaAgent` resource: labels: app: grafana-agent spec: - image: grafana/agent:v0.31.0 + image: grafana/agent:v0.31.1 logLevel: info serviceAccountName: grafana-agent metrics: diff --git a/docs/sources/operator/getting-started.md b/docs/sources/operator/getting-started.md index 29885a6a0cfb..a952db0aa3ac 100644 --- a/docs/sources/operator/getting-started.md +++ b/docs/sources/operator/getting-started.md @@ -75,7 +75,7 @@ To install Agent Operator: serviceAccountName: grafana-agent-operator containers: - name: operator - image: grafana/agent-operator:v0.31.0 + image: grafana/agent-operator:v0.31.1 args: - --kubelet-service=default/kubelet --- diff --git a/docs/sources/set-up/install-agent-docker.md b/docs/sources/set-up/install-agent-docker.md index 17be60ae6319..f7d8232423f5 100644 --- a/docs/sources/set-up/install-agent-docker.md +++ b/docs/sources/set-up/install-agent-docker.md @@ -21,7 +21,7 @@ Install Grafana Agent and get it up and running on Docker. docker run \ -v /tmp/agent:/etc/agent/data \ -v /path/to/config.yaml:/etc/agent/agent.yaml \ - grafana/agent:v0.31.0 + grafana/agent:v0.31.1 ``` 2. Replace `/tmp/agent` with the folder you want to store WAL data in. @@ -40,7 +40,7 @@ container through a bind mount for the flags to work properly. docker run ^ -v c:\grafana-agent-data:c:\etc\grafana-agent\data ^ -v c:\workspace\config\grafana-agent:c:\etc\grafana-agent ^ - grafana/agent:v0.31.0-windows + grafana/agent:v0.31.1-windows ``` 2. Replace `c:\grafana-agent-data` with the folder you want to store WAL data in. diff --git a/docs/sources/upgrade-guide/_index.md b/docs/sources/upgrade-guide/_index.md index d29809281705..7a4403cf87d5 100644 --- a/docs/sources/upgrade-guide/_index.md +++ b/docs/sources/upgrade-guide/_index.md @@ -10,7 +10,17 @@ weight: 800 This guide describes all breaking changes that have happened in prior releases and how to migrate to newer versions. -## Unreleased changes +## v0.31.1 + +### Breaking change: all Windows executables are now zipped + +All release Windows `.exe` files are now zipped. Prior to v0.31, only +`grafana-agent-installer.exe` was unzipped. + +This fixes an issue from v0.31.0 where all `.exe` files were accidentally left +unzipped. + +## v0.31.0 These changes will come in a future version. diff --git a/go.mod b/go.mod index c8db091d810f..3524c6512492 100644 --- a/go.mod +++ b/go.mod @@ -525,7 +525,7 @@ require ( go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.4 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4 // indirect go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect - go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect + go4.org/unsafe/assume-no-moving-gc v0.0.0-20230204201903-c31fa085b70e // indirect gocloud.dev v0.24.0 // indirect golang.org/x/mod v0.7.0 // indirect golang.org/x/oauth2 v0.3.0 // indirect diff --git a/go.sum b/go.sum index b15af5655453..dc0c7d72eeeb 100644 --- a/go.sum +++ b/go.sum @@ -3156,8 +3156,8 @@ go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= go4.org/intern v0.0.0-20211027215823-ae77deb06f29 h1:UXLjNohABv4S58tHmeuIZDO6e3mHpW2Dx33gaNt03LE= go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= -go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 h1:FyBZqvoA/jbNzuAWLQE2kG820zMAkcilx6BMjGbL/E4= -go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20230204201903-c31fa085b70e h1:AY/D6WBvaYJLmXK9VTIAX0tokDhrkkqdvIUwOU2nxio= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20230204201903-c31fa085b70e/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= gocloud.dev v0.24.0 h1:cNtHD07zQQiv02OiwwDyVMuHmR7iQt2RLkzoAgz7wBs= gocloud.dev v0.24.0/go.mod h1:uA+als++iBX5ShuG4upQo/3Zoz49iIPlYUWHV5mM8w8= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/pkg/operator/defaults.go b/pkg/operator/defaults.go index 2f4940ff97b4..78c74f3100d3 100644 --- a/pkg/operator/defaults.go +++ b/pkg/operator/defaults.go @@ -37,6 +37,7 @@ var ( "v0.30.1", "v0.30.2", "v0.31.0", + "v0.31.1", // NOTE(rfratto): when performing an upgrade, add the newest version above instead of changing the existing reference. } diff --git a/production/grafanacloud-install.ps1 b/production/grafanacloud-install.ps1 index 5a61623c9e1d..4fb2011ad313 100644 --- a/production/grafanacloud-install.ps1 +++ b/production/grafanacloud-install.ps1 @@ -4,24 +4,24 @@ param ($GCLOUD_STACK_ID, $GCLOUD_API_KEY, $GCLOUD_API_URL) Write-Host "Setting up Grafana agent" if ( -Not [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544") ) { - Write-Host "ERROR: The script needs to be run with Administrator privileges" - exit + Write-Host "ERROR: The script needs to be run with Administrator privileges" + exit } # Check if required parameters are present if ($GCLOUD_STACK_ID -eq "") { - Write-Host "ERROR: Required argument GCLOUD_STACK_ID missing" - exit + Write-Host "ERROR: Required argument GCLOUD_STACK_ID missing" + exit } if ($GCLOUD_API_KEY -eq "") { - Write-Host "ERROR: Required argument GCLOUD_API_KEY missing" - exit + Write-Host "ERROR: Required argument GCLOUD_API_KEY missing" + exit } if ($GCLOUD_API_URL -eq "") { - Write-Host "ERROR: Required argument GCLOUD_API_URL missing" - exit + Write-Host "ERROR: Required argument GCLOUD_API_URL missing" + exit } Write-Host "GCLOUD_STACK_ID:" $GCLOUD_STACK_ID @@ -33,9 +33,11 @@ Write-Host "Checking and installing required Powershell-yaml module" Install-Module PowerShell-yaml Write-Host "Downloading Grafana agent Windows Installer" -$DOWLOAD_URL = "https://github.com/grafana/agent/releases/latest/download/grafana-agent-installer.exe" +$DOWLOAD_URL = "https://github.com/grafana/agent/releases/latest/download/grafana-agent-installer.exe.zip" +$OUTPUT_ZIP_FILE = ".\grafana-agent-installer.exe.zip" $OUTPUT_FILE = ".\grafana-agent-installer.exe" -Invoke-WebRequest -Uri $DOWLOAD_URL -OutFile $OUTPUT_FILE +Invoke-WebRequest -Uri $DOWLOAD_URL -OutFile $OUTPUT_ZIP_FILE +Expand-Archive -LiteralPath $OUTPUT_ZIP_FILE -DestinationPath $OUTPUT_FILE # Install Grafana agent in silent mode Write-Host "Installing Grafana agent for Windows" @@ -53,15 +55,15 @@ $response = Invoke-WebRequest $CONFIG_URI -Method 'GET' -Headers $headers -UseBa $jsonObj = $response | ConvertFrom-Json if ($jsonObj.status -eq "success") { - $config_file = ".\agent-config.yaml" - Write-Host "Saving and updating agent configuration file" - $yamlConfig = $jsonObj.data | ConvertTo-Yaml - Set-Content -Path $config_file -Value ($yamlConfig) + $config_file = ".\agent-config.yaml" + Write-Host "Saving and updating agent configuration file" + $yamlConfig = $jsonObj.data | ConvertTo-Yaml + Set-Content -Path $config_file -Value ($yamlConfig) # Append APPDATA path to bookmark files $line = Get-Content $config_file | Select-String bookmark_path | Select-Object -ExpandProperty Line if ($line -ne $null) { $content = Get-Content $config_file - $line | ForEach-Object { + $line | ForEach-Object { $split_line = $_ -split ": " $prefix = $split_line[0] $bookmark_filename = $split_line[1] -replace "./","" @@ -71,21 +73,21 @@ if ($jsonObj.status -eq "success") { } Move-Item $config_file "C:\Program Files\Grafana Agent\agent-config.yaml" -force - # Wait for service to initialize after first install - Write-Host "Wait for Grafana service to initialize" - Start-Sleep -s 5 + # Wait for service to initialize after first install + Write-Host "Wait for Grafana service to initialize" + Start-Sleep -s 5 - # Restart Grafana agent to load new configuration - Write-Host "Restarting Grafana agent service" - Stop-Service "Grafana Agent" - Start-Service "Grafana Agent" + # Restart Grafana agent to load new configuration + Write-Host "Restarting Grafana agent service" + Stop-Service "Grafana Agent" + Start-Service "Grafana Agent" - # Wait for service to startup after restart - Write-Host "Wait for Grafana service to initialize after restart" - Start-Sleep -s 10 + # Wait for service to startup after restart + Write-Host "Wait for Grafana service to initialize after restart" + Start-Sleep -s 10 - # Show Grafana agent service status - Get-Service "Grafana Agent" + # Show Grafana agent service status + Get-Service "Grafana Agent" } else { - Write-Host "Failed to retrieve config" + Write-Host "Failed to retrieve config" } diff --git a/production/grafanacloud-install.sh b/production/grafanacloud-install.sh index 4f035ba0c78e..95644e33a1d0 100755 --- a/production/grafanacloud-install.sh +++ b/production/grafanacloud-install.sh @@ -50,7 +50,7 @@ PACKAGE_SYSTEM=${PACKAGE_SYSTEM:=} # # Global constants. # -RELEASE_VERSION="v0.31.0" +RELEASE_VERSION="v0.31.1" # The DEB and RPM urls don't include the `v` version prefix in the file names, # so we trim it out using ${RELEASE_VERSION#v} below. diff --git a/production/kubernetes/agent-bare.yaml b/production/kubernetes/agent-bare.yaml index 9e0323e5ea01..43c57851c10e 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.31.0 + image: grafana/agent:v0.31.1 imagePullPolicy: IfNotPresent name: grafana-agent ports: diff --git a/production/kubernetes/agent-loki.yaml b/production/kubernetes/agent-loki.yaml index 3af27141c7ed..7d80072313cb 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.31.0 + image: grafana/agent:v0.31.1 imagePullPolicy: IfNotPresent name: grafana-agent-logs ports: diff --git a/production/kubernetes/agent-traces.yaml b/production/kubernetes/agent-traces.yaml index ff56997aca51..4a10316c5fb9 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.31.0 + image: grafana/agent:v0.31.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 d3dcb59f1dcc..0dae458acd70 100644 --- a/production/kubernetes/build/lib/version.libsonnet +++ b/production/kubernetes/build/lib/version.libsonnet @@ -1 +1 @@ -'grafana/agent:v0.31.0' +'grafana/agent:v0.31.1' diff --git a/production/kubernetes/build/templates/operator/main.jsonnet b/production/kubernetes/build/templates/operator/main.jsonnet index 8c621380f947..17dfff22da6e 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.31.0', - agent_operator: 'grafana/agent-operator:v0.31.0', + agent: 'grafana/agent:v0.31.1', + agent_operator: 'grafana/agent-operator:v0.31.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 057a9c535334..a55ea09ef07c 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.31.0 +MANIFEST_BRANCH=v0.31.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 b0f8ec407d83..dfe4245fed63 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.31.0 + image: grafana/agent-operator:v0.31.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.31.0 + image: grafana/agent:v0.31.1 integrations: selector: matchLabels: diff --git a/production/tanka/grafana-agent/v1/main.libsonnet b/production/tanka/grafana-agent/v1/main.libsonnet index f0e937ba6edb..198752a5c8b6 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.31.0', - agentctl: 'grafana/agentctl:v0.31.0', + agent: 'grafana/agent:v0.31.1', + agentctl: 'grafana/agentctl:v0.31.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 260eb4bbb1c8..ff6986cf5080 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.31.0', - agentctl: 'grafana/agentctl:v0.31.0', + agent: 'grafana/agent:v0.31.1', + agentctl: 'grafana/agentctl:v0.31.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 09cc2438ae46..4f6228946233 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.31.0', + image: 'grafana/agentctl:v0.31.1', schedule: '*/5 * * * *', configs: [], } + config, diff --git a/tools/release b/tools/release index 620e9e1a3d22..2c53b3df4e89 100755 --- a/tools/release +++ b/tools/release @@ -3,10 +3,10 @@ # This script should be run from the root of the repository. set -x -# Zip up all the agent binaries to reduce the download size. DEBs, RPMs, and -# Windows installers aren't included to be easier to work with. +# Zip up all the agent binaries to reduce the download size. DEBs and RPMs +# aren't included to be easier to work with. find dist/ -type f \ - -name 'grafana-agent*' -not -name '*.deb' -not -name '*.rpm' -not -name '*.exe' \ + -name 'grafana-agent*' -not -name '*.deb' -not -name '*.rpm' \ -exec zip -j -m "{}.zip" "{}" \; # Sign the RPM packages. DEB packages aren't signed.