Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f2ad1e3
add CI for windows dev branch
matmerr May 27, 2025
72cb766
ci: rename images workflow (#1627)
matmerr May 28, 2025
5accf00
feat(ebpfwindows-Plugin): ebpf Windows Plugin using a custom parser (…
kumarvin123 Jun 2, 2025
8d9684e
ci: windows image workqueue dispatch (#1670)
matmerr Jun 9, 2025
e3789d1
update retinaebpfapi version (#1683)
lakshk98 Jun 16, 2025
bd5efe5
ci: update ci for dev/v0.0.33-windows (#1687)
matmerr Jun 16, 2025
e3cc215
Added handling for CiliumOnWindows Registry Values in Hns and EbpfWin…
kumarvin123 Jun 18, 2025
0b24729
(test): Retina Windows eBPF e2e Tests (#1721)
kumarvin123 Jul 2, 2025
98fdb28
Consume latest RetinaEbpfApi; Add lost events API; Update struct proc…
matthewige Jul 28, 2025
100db4a
fix enable annotation (#1818)
lakshk98 Aug 14, 2025
32ed3ac
[SFI - Service Tags] Retina Virtual Tags (#1819)
lakshk98 Aug 14, 2025
8f401b1
Revert sfi changes (#1840)
lakshk98 Aug 26, 2025
29a35bb
Add pktmon parsing (#1875)
lakshk98 Sep 18, 2025
776fc33
Update windows base image (#1883)
lakshk98 Sep 23, 2025
5ac0a64
fix(pipeline): Add space character to create fresh commit hash (#1911)
BeegiiK Oct 15, 2025
e6095dd
Return error when ip is nil (#1908)
lakshk98 Oct 15, 2025
27752fd
latest windows base image (#1931)
lakshk98 Nov 13, 2025
0caa49f
fix windows build timeout (#1935)
matmerr Nov 18, 2025
81ead86
latest windows base image (01/13/26) (#1998)
lakshk98 Jan 21, 2026
28f456e
Gracefully Handle the abscence of retinaebpfapi.dll (#2143)
kumarvin123 Apr 21, 2026
835ef9a
ebpf xdp version bump (#2267)
lakshk98 Apr 30, 2026
72359a9
Fix xdp install in retina test (#2283)
lakshk98 May 5, 2026
9f40c8a
Bump retinaebpfapi version (#2358)
lakshk98 May 20, 2026
aa0b4e1
ci: remove krew-index update step on dev/v0.0.33-windows (#2390)
matmerr May 27, 2026
a60b557
Laksh/cherry pick specific (#2425)
lakshk98 Jun 9, 2026
35b8187
Removed usage of the hubble parser options
kumarvin123 Jul 21, 2026
0d06f15
Fixed the merge markers
kumarvin123 Jul 21, 2026
989889d
Fixed jobs.go
kumarvin123 Jul 21, 2026
baf3abd
Merge branch 'main' into user/vinodko/rebase-main
kumarvin123 Jul 21, 2026
f5b98ed
Merge branch 'main' into user/vinodko/rebase-main
kumarvin123 Jul 22, 2026
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
102 changes: 102 additions & 0 deletions .github/workflows/e2e-test-event-writer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ permissions:

env:
EVENT_WRITER_PATH: "${{ github.workspace }}/test/e2e/tools/event-writer/"
EBPF_VERSION: "1.1.0"
XDP_SDK_VERSION: "1.3.0"

jobs:
retina-win-e2e-bpf-images:
Expand All @@ -33,3 +35,103 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Azure Login
uses: azure/login@v2
if: ${{ env.IS_MERGE_GROUP == 'true' }}
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}

- name: Ensure Docker daemon is running
shell: pwsh
run: |
$timeout = 120
$timer = [Diagnostics.Stopwatch]::StartNew()
while ($timer.Elapsed.TotalSeconds -lt $timeout) {
$svc = Get-Service docker -ErrorAction SilentlyContinue
if ($svc -and $svc.Status -ne 'Running') {
Start-Service docker -ErrorAction SilentlyContinue
}
$result = docker info 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Host "Docker daemon is ready"
return
}
Write-Host "Waiting for Docker daemon to start..."
Start-Sleep -Seconds 5
}
throw "Docker daemon failed to start within $timeout seconds"

- name: Docker Login to ghcr.io
uses: docker/login-action@v3
if: ${{ env.IS_MERGE_GROUP != 'true' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set MSBuild path
run: |
echo "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install LLVM 18.1.8
shell: pwsh
run: |
# Install LLVM 18.1.8 to ensure consistent version across runners
try {
choco install llvm --version=18.1.8 --allow-downgrade -y --force
# Add installed LLVM to PATH first so it takes precedence
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Write-Host "Successfully installed LLVM 18.1.8"
} catch {
Write-Warning "Failed to install LLVM 18.1.8 via chocolatey: $($_.Exception.Message)"
Write-Host "Continuing with pre-installed LLVM version"
}

- name: Nuget Restore
shell: cmd
run: |
nuget restore .\event_writer.sln
working-directory: ${{ env.EVENT_WRITER_PATH }}

- name: Configure eBPF store
shell: cmd
run: |
.\export_program_info.exe --clear
.\export_program_info.exe
working-directory: ${{ env.EVENT_WRITER_PATH }}\packages\eBPF-for-Windows.x64.${{ env.EBPF_VERSION }}\build\native\bin

- name: Build Event-Writer
shell: cmd
run: |
msbuild /m /t:Clean /p:Configuration=Release /p:Platform=x64 /restore event_writer.sln
msbuild /m /p:Configuration=Release /p:Platform=x64 /restore /v:detailed event_writer.sln
working-directory: ${{ env.EVENT_WRITER_PATH }}

- name: Determine Docker tag
id: tag
shell: pwsh
run: |
$TAG = $(git tag --points-at HEAD)
if (-not $TAG) {
$TAG = $(git rev-parse --short HEAD)
}
echo "tag=$TAG" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append

- name: Build and push images
shell: pwsh
working-directory: ${{ env.EVENT_WRITER_PATH }}
run: |
$isMergeGroup = "${{ env.IS_MERGE_GROUP }}" -eq "true"
if (-not $isMergeGroup) {
$image = "ghcr.io/${{ github.repository }}/test/e2e-test-event-writer".ToLower()
} else {
$image = "${{ vars.ACR_NAME }}/${{ github.repository }}/test/e2e-test-event-writer".ToLower()
}

$tag = "${{ steps.tag.outputs.tag }}"
docker build -f "./Dockerfile" -t "${image}:${tag}" -t "${image}:latest" .
docker push "${image}:${tag}"
docker push "${image}:latest"
31 changes: 17 additions & 14 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Build Images

on:
pull_request:
branches: [main]
branches:
- main
- "dev/**"
merge_group:
types: [checks_requested]
workflow_dispatch:
Expand All @@ -18,6 +20,8 @@ concurrency:
jobs:
get-tag:
name: Get Image Tag
retina-images:
name: Build Agent Images - Linux
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
Expand Down Expand Up @@ -66,7 +70,7 @@ jobs:
run: |
set -euo pipefail
echo "TAG=$(make version)" >> $GITHUB_ENV
if [ "$IS_MERGE_GROUP" == "true" ]; then
if [ "$SHOULD_PUSH_IMAGE" == "true" ]; then
az acr login -n ${{ vars.ACR_NAME }}
make retina-image \
IMAGE_NAMESPACE=${{ github.repository }} \
Expand All @@ -80,7 +84,7 @@ jobs:
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }}
fi
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}
SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'merge_group') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev/v0.0.33-windows' && github.repository == 'microsoft/retina') }}

build-windows-binaries:
name: Build Windows Binaries
Expand Down Expand Up @@ -165,7 +169,6 @@ jobs:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }}

- name: Build Images
shell: bash
run: |
Expand All @@ -192,7 +195,7 @@ jobs:
REPO_PATH=.
fi
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}
SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'merge_group') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev/v0.0.33-windows' && github.repository == 'microsoft/retina') }}

operator-images:
name: Build Operator Images
Expand Down Expand Up @@ -231,7 +234,7 @@ jobs:
run: |
set -euo pipefail
echo "TAG=$(make version)" >> $GITHUB_ENV
if [ "$IS_MERGE_GROUP" == "true" ]; then
if [ "$SHOULD_PUSH_IMAGE" == "true" ]; then
az acr login -n ${{ vars.ACR_NAME }}
make retina-operator-image \
IMAGE_NAMESPACE=${{ github.repository }} \
Expand All @@ -245,7 +248,7 @@ jobs:
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }}
fi
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}
SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'merge_group') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev/v0.0.33-windows' && github.repository == 'microsoft/retina') }}

retina-shell-images:
name: Build Retina Shell Images (${{ matrix.platform }}, ${{ matrix.arch }})
Expand Down Expand Up @@ -284,7 +287,7 @@ jobs:
run: |
set -euo pipefail
echo "TAG=$(make version)" >> $GITHUB_ENV
if [ "$IS_MERGE_GROUP" == "true" ]; then
if [ "$SHOULD_PUSH_IMAGE" == "true" ]; then
az acr login -n ${{ vars.ACR_NAME }}
make retina-shell-image \
IMAGE_NAMESPACE=${{ github.repository }} \
Expand All @@ -297,7 +300,7 @@ jobs:
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }}
fi
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}
SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'merge_group') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev/v0.0.33-windows' && github.repository == 'microsoft/retina') }}

kubectl-retina-images:
name: Build Kubectl Retina Images
Expand Down Expand Up @@ -336,7 +339,7 @@ jobs:
run: |
set -euo pipefail
echo "TAG=$(make version)" >> $GITHUB_ENV
if [ "$IS_MERGE_GROUP" == "true" ]; then
if [ "$SHOULD_PUSH_IMAGE" == "true" ]; then
az acr login -n ${{ vars.ACR_NAME }}
make kubectl-retina-image \
IMAGE_NAMESPACE=${{ github.repository }} \
Expand All @@ -349,11 +352,11 @@ jobs:
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }}
fi
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}
SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'merge_group') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev/v0.0.33-windows' && github.repository == 'microsoft/retina') }}

manifests:
name: Generate Manifests
if: ${{ github.event_name == 'merge_group' }}
if: ${{ (github.event_name == 'merge_group') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev/v0.0.33-windows' && github.repository == 'microsoft/retina') }}
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
Expand Down Expand Up @@ -393,7 +396,7 @@ jobs:

e2e:
name: Run E2E Tests
if: ${{ github.event_name == 'merge_group' }}
if: ${{ (github.event_name == 'merge_group') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev/v0.0.33-windows' && github.repository == 'microsoft/retina') }}
needs: [manifests]
runs-on: ubuntu-latest
timeout-minutes: 90
Expand Down Expand Up @@ -457,7 +460,7 @@ jobs:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-app-insights-key: ${{ secrets.AZURE_APP_INSIGHTS_KEY }}

perf-test-advanced:
if: ${{ github.event_name == 'merge_group'}}
needs: [manifests, get-tag, e2e]
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
matrix:
platform: ["windows"]
arch: ["amd64"]
year: ["2022"]

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/release-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,6 @@ jobs:
- name: Setup kind cluster
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0

# krew does not support installing a specific verison
# so if this step fails it means there was something wrong
# with the krew index update as part of the release
- name: Test krew install retina
run: |
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
kubectl krew install retina
)

- name: Check Go package version
run: |
TAG=${{ env.TAG }}
Expand Down
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL := help

# Default platform commands
# Default platform commands
RMDIR := rm -rf

## Globals
Expand Down Expand Up @@ -361,6 +361,20 @@ kubectl-retina-shell-image:
TARGET=shell-target \
EXTRA_BUILD_ARGS=$(EXTRA_BUILD_ARGS)

kubectl-retina-shell-image:
echo "Building shell-enabled kubectl-retina for $(PLATFORM)"
set -e ; \
$(MAKE) container-$(CONTAINER_BUILDER) \
PLATFORM=$(PLATFORM) \
DOCKERFILE=cli/Dockerfile \
REGISTRY=$(IMAGE_REGISTRY) \
IMAGE=$(KUBECTL_RETINA_SHELL_IMAGE) \
VERSION=$(TAG) \
TAG=$(RETINA_PLATFORM_TAG) \
CONTEXT_DIR=$(REPO_ROOT) \
TARGET=shell-target \
EXTRA_BUILD_ARGS=$(EXTRA_BUILD_ARGS)

kapinger-image:
docker buildx build --builder retina --platform windows/amd64 --target windows-amd64 -t $(IMAGE_REGISTRY)/$(KAPINGER_IMAGE):$(TAG)-windows-amd64 ./hack/tools/kapinger/ --push
docker buildx build --builder retina --platform linux/amd64 --target linux-amd64 -t $(IMAGE_REGISTRY)/$(KAPINGER_IMAGE):$(TAG)-linux-amd64 ./hack/tools/kapinger/ --push
Expand Down
1 change: 1 addition & 0 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ WORKDIR /
COPY --from=builder /workspace/kubectl-retina .

# Target 2: Shell-enabled (operational, init container support)

# skopeo inspect docker://mcr.microsoft.com/azurelinux/base/core:3.0 --format "{{.Name}}@{{.Digest}}"
# Final image must be $TARGETPLATFORM (default), not $BUILDPLATFORM — the
# kubectl-retina binary is cross-compiled for the target arch and would fail
Expand Down
1 change: 0 additions & 1 deletion cli/cmd/capture/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,6 @@ func resetDownloadGlobals(t *testing.T) {

func TestDownloadAllCapturesGracefulErrorHandling(t *testing.T) {
resetDownloadGlobals(t)

// Test the graceful error handling by testing individual components
// that are used in downloadAllCaptures

Expand Down
33 changes: 31 additions & 2 deletions controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-azurelinux3.0@sha256:1c77c1cbb5de52db3f119fe2efe7a938e734c08196bbe3ad94b3bdadbab926f9 AS golang

# skopeo inspect docker://mcr.microsoft.com/azurelinux/base/core:3.0 --format "{{.Name}}@{{.Digest}}"
<<<<<<< HEAD
FROM mcr.microsoft.com/azurelinux/base/core:3.0.20260711@sha256:4d0522bb656cfe2bc567c254bb87c2b086a002db6cba51f71870eb5c6630195c AS azurelinux-core
# skopeo inspect docker://mcr.microsoft.com/windows/servercore:ltsc2019 --override-os windows --format "{{.Name}}@{{.Digest}}"
FROM mcr.microsoft.com/windows/servercore@sha256:cd96c9b4873aba2f63716934ed5e535ec21c8d3dc32d29d9bc778be28f19cbfa AS ltsc2019

# skopeo inspect docker://mcr.microsoft.com/windows/servercore:ltsc2022 --override-os windows --format "{{.Name}}@{{.Digest}}"
FROM mcr.microsoft.com/windows/servercore@sha256:86da395cfd2b35dbfc2e9d08719550c51b0570c394bff8f92622a19234766185 AS ltsc2022

# skopeo inspect docker://mcr.microsoft.com/azurelinux/distroless/minimal:3.0 --format "{{.Name}}@{{.Digest}}"
FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0.20260706@sha256:576d9769c0146cbf0cf7946bacf536c5758464c29eadfa03ef5090ae708e641f AS azurelinux-distroless
=======
FROM mcr.microsoft.com/azurelinux/base/core:3.0@sha256:35149ae8dd179684f969944f54a337c665a64e702486154eb44253fb39c2505b AS azurelinux-core

# skopeo inspect docker://mcr.microsoft.com/azurelinux/distroless/minimal:3.0 --format "{{.Name}}@{{.Digest}}"
FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0@sha256:5a66f9f16ac675db2a8229dac72d83811b73b502d6ad192d8b374c7f3be498af AS azurelinux-distroless
>>>>>>> dc127f0e (Laksh/cherry pick specific (#2425))

# build stages

Expand Down Expand Up @@ -50,6 +62,10 @@ ARG GOARCH=amd64 # default to amd64
ARG GOOS=linux # default to linux
ENV GOARCH=${GOARCH}
ENV GOOS=${GOOS}
RUN if [ "$GOOS" = "linux" ] ; then \
tdnf install -y clang lld bpftool libbpf-devel; \
fi
COPY ./pkg/plugin /go/src/github.com/microsoft/retina/pkg/plugin
WORKDIR /go/src/github.com/microsoft/retina
# eBPF .o files were built in the bpf-gen stage (at $TARGETPLATFORM). Import
# the tarball here and extract after `COPY . .` so bpf-gen's outputs replace
Expand All @@ -62,6 +78,7 @@ RUN if [ "$GOOS" = "linux" ] ; then \
rm -rf ./pkg/plugin && tar xvf /gen.tar.gz ./pkg/plugin; \
fi


# capture binary
FROM intermediate AS capture-bin
ARG APP_INSIGHTS_ID # set to enable AI telemetry
Expand All @@ -80,7 +97,7 @@ ARG GOOS=linux # default to linux
ARG VERSION
ENV GOARCH=${GOARCH}
ENV GOOS=${GOOS}
RUN --mount=type=cache,target="/root/.cache/go-build" go build -x -v -o /go/bin/retina/controller -ldflags "-X github.com/microsoft/retina/internal/buildinfo.Version="$VERSION" -X github.com/microsoft/retina/internal/buildinfo.ApplicationInsightsID="$APP_INSIGHTS_ID"" controller/main.go
RUN --mount=type=cache,target="/root/.cache/go-build" go build -x -v -o /go/bin/retina/controller -ldflags "-X github.com/microsoft/retina/internal/buildinfo.Version="$VERSION" -X github.com/microsoft/retina/internal/buildinfo.ApplicationInsightsID="$APP_INSIGHTS_ID"" controller/main.go

# init binary
FROM intermediate AS init-bin
Expand Down Expand Up @@ -149,4 +166,16 @@ COPY --from=capture-bin /go/bin/retina/captureworkload /retina/captureworkload
COPY --from=tools /usr/local/hubble /bin/hubble
# Set Hubble server.
ENV HUBBLE_SERVER=unix:///var/run/cilium/hubble.sock
ENTRYPOINT ["./retina/controller"]
ENTRYPOINT ["./retina/controller"]
<<<<<<< HEAD

# agent final image for windows
FROM ${OS_VERSION} AS agent-win
COPY --from=controller-bin /go/src/github.com/microsoft/retina/windows/kubeconfigtemplate.yaml kubeconfigtemplate.yaml
COPY --from=controller-bin /go/src/github.com/microsoft/retina/windows/setkubeconfigpath.ps1 setkubeconfigpath.ps1
COPY --from=controller-bin /go/bin/retina/controller controller.exe
COPY --from=capture-bin /go/bin/retina/captureworkload captureworkload.exe
ADD https://github.com/microsoft/etl2pcapng/releases/download/v1.10.0/etl2pcapng.exe /etl2pcapng.exe
CMD ["controller.exe", "start", "--kubeconfig=.\\kubeconfig"]
=======
>>>>>>> dc127f0e (Laksh/cherry pick specific (#2425))
Loading
Loading