chore: Switch to hostprocess base image and add support for Windows Server 2025 on Kubernetes (click PR number for more information) #1731
+75
−104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Standard Windows Containers always require a extact version match between Container OS and Host OS. This requires multiple images flavors, e.g. one for Windows Server 2019 and one for Windows Server 2022. With Windows Server 2025 release, we have now the 3rd flavor which needs to be supported.
However, this constraint may not exists, if a Windows container runs as a hostprocess. Running as hostprocess is nessesary for windows_exporter to gain all necessary information. A dedicate image for each Windows OS isn't technically nessary.
For this use-case, Microsoft create a scratch like Docker Images, which is designed for that use-case:
https://github.com/microsoft/windows-host-process-containers-base-image
It's has no contraints against the host OS and the image size is reduced to few MBs. However, it must be build in a buildkit environment on a Linux system.
The noticeable breaking change is that the official docker image not longer support to run a non-hostprocess container.