Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Dev Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ More advanced information needed to develop or build the docker provider will li

## Windows Telegraf dependency

`kubernetes/windows/setup.ps1` installs the official Telegraf 1.40.0 Windows AMD64
`kubernetes/windows/setup.ps1` installs the official Telegraf 1.40.1 Windows AMD64
ZIP and verifies its pinned SHA256 before extraction. The package corresponds to
upstream commit `e9017dc3266369d6fa185e0e130af1d1d4021ce9`. The existing Windows
upstream commit `26b8f4478b676f4f5e5d8ce1622cdf4f6c273bda`. The existing Windows
pipeline continues to sign `C:\opt\telegraf\telegraf.exe` as an OSS dependency.

The official binary is built with Go 1.27.0 for `windows/amd64`, `GOAMD64=v1`.
The official binary is built with Go 1.27.1 for `windows/amd64`, `GOAMD64=v1`.
Go's [Windows OS floor](https://go.dev/wiki/MinimumRequirements#windows) is Windows
10 or Windows Server 2016 and newer. Both repository image targets, LTSC2019 and
LTSC2022, meet that floor; this does not replace validation inside those images
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/linux/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ sudo tdnf install jq-1.7.1-1.azl3 -y
#used to setcaps for ruby process to read /proc/env
sudo tdnf install libcap -y

sudo tdnf install telegraf-agent-1.39.3 -y
sudo tdnf install telegraf-agent-1.40.1 -y
telegraf_version=$(sudo tdnf list installed | grep telegraf | awk '{print $2}')
echo "telegraf $telegraf_version" >> packages_version.txt
mv /usr/bin/telegraf-agent /opt/telegraf
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/windows/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ Write-Host ('Finished Installing Fluentbit')
Write-Host ('Installing Telegraf');
try {
# Update the Windows Telegraf configs and tomlparser-prom-customconfig.rb together with this package.
$telegrafUri='https://dl.influxdata.com/telegraf/releases/telegraf-1.40.0_windows_amd64.zip'
$telegrafSha256='9d85e3fa89d99e4b0e53e4aa40f069e828204cf5548ede9b9b7c95c31fe869dd' # DevSkim: ignore DS173237 -- Public archive SHA256, not a credential.
$telegrafUri='https://dl.influxdata.com/telegraf/releases/telegraf-1.40.1_windows_amd64.zip'
$telegrafSha256='cabe07907628afc17ce8c58a1c27b3a55a838b1fb9418b2c05e9342e6e8af8d9' # DevSkim: ignore DS173237 -- Public archive SHA256, not a credential.
Invoke-WebRequest -Uri $telegrafUri -OutFile \installation\telegraf.zip -ErrorAction Stop
if ((Get-FileHash -Path \installation\telegraf.zip -Algorithm SHA256 -ErrorAction Stop).Hash -ne $telegrafSha256) {
throw "SHA256 mismatch for Telegraf Windows package"
}
Expand-Archive -Path \installation\telegraf.zip -Destination \installation\telegraf -ErrorAction Stop
Move-Item -Path \installation\telegraf\telegraf-1.40.0\* -Destination \opt\telegraf\ -ErrorAction Stop
Move-Item -Path \installation\telegraf\telegraf-1.40.1\* -Destination \opt\telegraf\ -ErrorAction Stop
}
catch {
$ex = $_.Exception
Expand Down
6 changes: 3 additions & 3 deletions test/unit-tests/test_cases/Test-TelegrafPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $installTelegraf = [scriptblock]::Create($body.Substring(1, $body.Length - 2))

function Invoke-WebRequest($Uri, $OutFile, $ErrorAction) {
Record-Operation 'download' $ErrorAction
Assert-Equals 'https://dl.influxdata.com/telegraf/releases/telegraf-1.40.0_windows_amd64.zip' $Uri 'official versioned ZIP' | Out-Null
Assert-Equals 'https://dl.influxdata.com/telegraf/releases/telegraf-1.40.1_windows_amd64.zip' $Uri 'official versioned ZIP' | Out-Null
Assert-Equals '\installation\telegraf.zip' $OutFile 'download destination' | Out-Null
}

Expand All @@ -54,7 +54,7 @@ $installTelegraf = [scriptblock]::Create($body.Substring(1, $body.Length - 2))

function Move-Item($Path, $Destination, $ErrorAction) {
Record-Operation 'move' $ErrorAction
Assert-Equals '\installation\telegraf\telegraf-1.40.0\*' $Path 'versioned archive layout' | Out-Null
Assert-Equals '\installation\telegraf\telegraf-1.40.1\*' $Path 'versioned archive layout' | Out-Null
Assert-Equals '\opt\telegraf\' $Destination 'existing runtime and signing path' | Out-Null
}

Expand All @@ -69,7 +69,7 @@ $installTelegraf = [scriptblock]::Create($body.Substring(1, $body.Length - 2))
foreach ($case in $cases) {
$script:operations = @()
$script:failureAt = $case.FailureAt
$script:archiveHash = '9D85E3FA89D99E4B0E53E4AA40F069E828204CF5548EDE9B9B7C95C31FE869DD'
$script:archiveHash = 'CABE07907628AFC17CE8C58A1C27B3A55A838B1FB9418B2C05E9342E6E8AF8D9'
if ($case.Name -eq 'hash mismatch') {
$script:archiveHash = '0' * 64
}
Expand Down
Loading