Skip to content

feat: windows-exporter into windows vhd build#8516

Open
chmill-zz wants to merge 6 commits into
mainfrom
exporterWindows
Open

feat: windows-exporter into windows vhd build#8516
chmill-zz wants to merge 6 commits into
mainfrom
exporterWindows

Conversation

@chmill-zz
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

this is adding node-exporter into the vhdbuild by default for windows. At boot CSE will register the service in nssm

Which issue(s) this PR fixes:

Fixes #

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds windows-exporter to the Windows VHD build so nodes can start the aks-windows-exporter service during CSE using VHD-baked assets (with a sentinel to keep aks-vm-extension in no-op mode for these VHDs).

Changes:

  • Bake windows-exporter binaries/config/health script into the Windows VHD and create a sentinel file.
  • Register/start aks-windows-exporter at CSE time via new windowsexporterfunc.ps1, with unit tests and VHD content tests.
  • Add e2e validation ensuring the service is running and serving metrics when the sentinel is present.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vhdbuilder/packer/windows/windows-vhd-builder-sig.json Stages windows-exporter config + health script into c:\k\ during image build.
vhdbuilder/packer/windows/configure-windows-vhd.ps1 Extracts/stages windows-exporter into C:\k\windows-exporter and creates sentinel.
vhdbuilder/packer/test/windows-vhd-content-test.ps1 Validates windows-exporter assets + sentinel exist on the built VHD.
staging/cse/windows/windowsexporterfunc.ps1 New CSE-time installer to register/start aks-windows-exporter via NSSM and health-check it.
staging/cse/windows/windowsexporterfunc.tests.ps1 Adds Pester tests for sentinel/no-op behavior and error code on missing NSSM.
parts/windows/kuberneteswindowssetup.ps1 Dot-sources exporter functions and invokes Install-WindowsExporter during BasePrep.
parts/windows/windowscsehelper.ps1 Adds a new Windows CSE error code for windows-exporter start failure.
staging/cse/windows/kubernetesfunc.ps1 Adds Defender exclusions for windows-exporter log file paths.
parts/windows/windowsexporter/windows-exporter-config.yml New baked config (port 19182, enabled collectors, service include filter, debug logging).
parts/windows/windowsexporter/windows-exporter-health.ps1 New baked health/version helper used by CSE health validation.
parts/common/components.json Adds windows-exporter component download metadata for VHD caching.
e2e/validators.go Adds Windows exporter validator (service + metrics) gated by sentinel presence.
e2e/scenario_win_test.go Runs the new validator across Windows e2e scenarios.
e2e/config/config.go Fixes a formatting issue in panic error rendering (%w -> %v).
staging/cse/windows/README Updates the list of scripts to download, including windowsexporterfunc.ps1.

Comment thread e2e/validators.go Outdated
Comment thread parts/windows/windowsexporter/windows-exporter-config.yml
Comment thread staging/cse/windows/windowsexporterfunc.ps1
Comment thread parts/common/components.json
@github-actions github-actions Bot added the components This pull request updates cached components on Linux or Windows VHDs label May 13, 2026
@chmill-zz chmill-zz changed the title feat: node-exporter into windows vhd build feat: windows-exporter into windows vhd build May 14, 2026
Copilot AI review requested due to automatic review settings May 14, 2026 19:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Comment thread vhdbuilder/packer/windows/configure-windows-vhd.ps1
Comment thread vhdbuilder/packer/windows/configure-windows-vhd.ps1 Outdated
Comment thread parts/windows/windowsexporter/windows-exporter-config.yml
Comment thread parts/windows/windowsexporter/windows-exporter-health.ps1 Outdated
Comment thread e2e/validators.go Outdated
Comment thread e2e/validators.go Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Changes cached containers or packages on windows VHDs

Please get a Windows SIG member to approve.

The following dif file shows any additions or deletions from what will be cached on windows VHDs organised by VHD type.

  • Additions are new things cached.
  • Deletions are things no longer cached.
diff --git a/vhd_files/2022-containerd-gen2.txt b/vhd_files/2022-containerd-gen2.txt
index ce25fa5..83b378c 100644
--- a/vhd_files/2022-containerd-gen2.txt
+++ b/vhd_files/2022-containerd-gen2.txt
@@ -33,0 +34 @@ c:\akse-cache\win-vnet-cni\: https://packages.aks.azure.com/azure-cni/v1.6.21/bi
+c:\akse-cache\windows-exporter\: https://packages.aks.azure.com/dalec-packages/windows-exporter/0.31.2/windows/amd64/windows-exporter_0.31.2-1_amd64.zip
diff --git a/vhd_files/2022-containerd.txt b/vhd_files/2022-containerd.txt
index 620eb5a..0110021 100644
--- a/vhd_files/2022-containerd.txt
+++ b/vhd_files/2022-containerd.txt
@@ -33,0 +34 @@ c:\akse-cache\win-vnet-cni\: https://packages.aks.azure.com/azure-cni/v1.6.21/bi
+c:\akse-cache\windows-exporter\: https://packages.aks.azure.com/dalec-packages/windows-exporter/0.31.2/windows/amd64/windows-exporter_0.31.2-1_amd64.zip
diff --git a/vhd_files/2025-gen2.txt b/vhd_files/2025-gen2.txt
index d5aea5a..d9c995c 100644
--- a/vhd_files/2025-gen2.txt
+++ b/vhd_files/2025-gen2.txt
@@ -31,0 +32 @@ c:\akse-cache\win-vnet-cni\: https://packages.aks.azure.com/azure-cni/v1.6.21/bi
+c:\akse-cache\windows-exporter\: https://packages.aks.azure.com/dalec-packages/windows-exporter/0.31.2/windows/amd64/windows-exporter_0.31.2-1_amd64.zip
diff --git a/vhd_files/2025.txt b/vhd_files/2025.txt
index 7012908..395b4e0 100644
--- a/vhd_files/2025.txt
+++ b/vhd_files/2025.txt
@@ -31,0 +32 @@ c:\akse-cache\win-vnet-cni\: https://packages.aks.azure.com/azure-cni/v1.6.21/bi
+c:\akse-cache\windows-exporter\: https://packages.aks.azure.com/dalec-packages/windows-exporter/0.31.2/windows/amd64/windows-exporter_0.31.2-1_amd64.zip
diff --git a/vhd_files/23H2-gen2.txt b/vhd_files/23H2-gen2.txt
index 41b56d8..2e010f7 100644
--- a/vhd_files/23H2-gen2.txt
+++ b/vhd_files/23H2-gen2.txt
@@ -32,0 +33 @@ c:\akse-cache\win-vnet-cni\: https://packages.aks.azure.com/azure-cni/v1.6.21/bi
+c:\akse-cache\windows-exporter\: https://packages.aks.azure.com/dalec-packages/windows-exporter/0.31.2/windows/amd64/windows-exporter_0.31.2-1_amd64.zip
diff --git a/vhd_files/23H2.txt b/vhd_files/23H2.txt
index efdd638..f8ae8fa 100644
--- a/vhd_files/23H2.txt
+++ b/vhd_files/23H2.txt
@@ -32,0 +33 @@ c:\akse-cache\win-vnet-cni\: https://packages.aks.azure.com/azure-cni/v1.6.21/bi
+c:\akse-cache\windows-exporter\: https://packages.aks.azure.com/dalec-packages/windows-exporter/0.31.2/windows/amd64/windows-exporter_0.31.2-1_amd64.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components This pull request updates cached components on Linux or Windows VHDs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants