Skip to content

fix: Include CNI telemetry sidecar in release archives#4346

Merged
behzad-mir merged 1 commit intomasterfrom
fix/cni-release-sidecar-artifact
Apr 20, 2026
Merged

fix: Include CNI telemetry sidecar in release archives#4346
behzad-mir merged 1 commit intomasterfrom
fix/cni-release-sidecar-artifact

Conversation

@behzad-mir
Copy link
Copy Markdown
Contributor

@behzad-mir behzad-mir commented Apr 10, 2026

Summary

Include azure-cni-telemetry-sidecar in ACN CNI release archives so GitHub release artifacts match the CNI container image contents.

What changed

  • added a Makefile target to build azure-cni-telemetry-sidecar
  • added the sidecar to CNI archive packaging for:
    • base CNI
    • multitenancy transparent vlan
    • swift
    • overlay
    • overlay dualstack

Validation

  • make azure-cni-telemetry-sidecar-binary GOOS=linux GOARCH=amd64

  • dry-run verified archive commands include azure-cni-telemetry-sidecar

  • uses conventional commit messages

  • includes documentation

  • adds unit tests

  • relevant PR labels added

Notes:

@behzad-mir behzad-mir changed the title Include CNI telemetry sidecar in release archives fix: Include CNI telemetry sidecar in release archives Apr 10, 2026
@behzad-mir behzad-mir marked this pull request as ready for review April 10, 2026 22:41
@behzad-mir behzad-mir requested a review from a team as a code owner April 10, 2026 22:41
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

Includes the azure-cni-telemetry-sidecar binary in the ACN CNI release archives so published GitHub release artifacts align with what’s shipped in the CNI container image.

Changes:

  • Added a Makefile target to build azure-cni-telemetry-sidecar.
  • Updated CNI archive packaging to include the sidecar binary across the base and variant CNI archives (transparent-vlan, swift, overlay, overlay dualstack).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
jackieluc
jackieluc previously approved these changes Apr 10, 2026
@behzad-mir behzad-mir force-pushed the fix/cni-release-sidecar-artifact branch from ef0d4e6 to d55424e Compare April 14, 2026 20:50
@behzad-mir behzad-mir requested a review from Copilot April 14, 2026 20:50
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 1 out of 1 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
Comment thread Makefile
Comment thread Makefile
Comment thread Makefile
@behzad-mir behzad-mir enabled auto-merge April 17, 2026 17:29
@behzad-mir
Copy link
Copy Markdown
Contributor Author

@copilot I want you to also look at the pipieline at .devops/github-release-ev2/github-release-stages.yml which is locatet at go/Network-Aquarius locally and see what changes need ed in there for having the telemetry sdecar binary released in github

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

@copilot I want you to also look at the pipieline at .devops/github-release-ev2/github-release-stages.yml which is locatet at go/Network-Aquarius locally and see what changes need ed in there for havi...

The .devops/github-release-ev2/github-release-stages.yml file lives in the private internal "Network-Aquarius" Azure DevOps repository and is not accessible in this environment — I can only make changes to the public azure-container-networking GitHub repo here.

That said, based on how the existing pipeline works:

  • The Makefile changes already bundle azure-cni-telemetry-sidecar inside all the CNI archive files (.tgz/.zip) produced by cni-archive.
  • If github-release-stages.yml uploads those archives as GitHub release assets (which is the typical pattern), no further changes are needed — the binary ships inside the archive automatically.
  • If the file also uploads individual binaries as separate GitHub release assets (i.e., lists them explicitly by filename), you would need to add azure-cni-telemetry-sidecar (and azure-cni-telemetry-sidecar.exe for Windows) to that list in the EV2 pipeline, similar to how other binaries like azure-vnet-telemetry are listed.

You'll need to make that change directly in the Network-Aquarius repo. Happy to provide a code snippet or template if you can share the relevant section of github-release-stages.yml.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

@copilot can you provide a context about changes have been done in ACN github about adding cni telemtry sidecar to the archive so I can us e this context for another AI agent to apply necessary change...

Here is the full context for the AI agent working on the Network-Aquarius pipeline:


Context: ACN CNI Telemetry Sidecar — What Changed and Why

Problem

The azure-cni-telemetry-sidecar binary ships inside the ACN CNI container image, but it was missing from the GitHub release archives (.tgz/.zip files). This caused a mismatch between the image contents and the published release artifacts.

What Changed in ACN (PR: fix/cni-release-sidecar-artifact, commit d55424e)

Only Makefile was changed. Key additions:

1. New source directory variable (line ~61):

CNI_TELEMETRY_SIDECAR_DIR = $(REPO_ROOT)/cns/cni-telemetry-sidecar

2. New build target (line ~234):

azure-cni-telemetry-sidecar-binary:
    $(MKDIR) $(CNI_BUILD_DIR)
    cd $(CNI_TELEMETRY_SIDECAR_DIR) && CGO_ENABLED=0 go build -v \
        -o $(CNI_BUILD_DIR)/azure-cni-telemetry-sidecar$(EXE_EXT) \
        -ldflags "-X main.version=$(CNI_VERSION) -X $(CNI_AI_PATH)=$(CNI_AI_ID) $(LD_BUILD_FLAGS)" \
        -gcflags="-dwarflocationlists=true"
  • Output binary: azure-cni-telemetry-sidecar (Linux) / azure-cni-telemetry-sidecar.exe (Windows)
  • Supports both GOOS=linux and GOOS=windows

3. cni-archive target updated to depend on and include the sidecar in 5 archive variants:

Archive filename pattern Contents (sidecar added)
azure-vnet-cni-{os}-{arch}-{ver}.tgz azure-cni-telemetry-sidecar added
azure-vnet-cni-multitenancy-transparent-vlan-{os}-{arch}-{ver}.tgz azure-cni-telemetry-sidecar added (Linux only)
azure-vnet-cni-swift-{os}-{arch}-{ver}.tgz azure-cni-telemetry-sidecar added
azure-vnet-cni-overlay-{os}-{arch}-{ver}.tgz azure-cni-telemetry-sidecar added
azure-vnet-cni-overlay-dualstack-{os}-{arch}-{ver}.tgz azure-cni-telemetry-sidecar added

The archives are produced by make cni-archive and placed in output/cni/.


What the Network-Aquarius Pipeline Needs to Do

The github-release-stages.yml EV2 pipeline publishes GitHub release assets. Depending on how it currently works:

Case A — If it uploads archives as-is: No changes needed. azure-cni-telemetry-sidecar is already bundled inside all the archive files above.

Case B — If it also publishes individual binaries as standalone GitHub release assets (i.e., lists specific filenames to upload separately, similar to how azure-vnet-telemetry may be listed individually): Add azure-cni-telemetry-sidecar (Linux) and azure-cni-telemetry-sidecar.exe (Windows) to that list.

Case C — If the pipeline builds binaries directly (not via make cni-archive) and then signs/uploads them individually: Add azure-cni-telemetry-sidecar-binary as a build step parallel to the existing azure-vnet-telemetry-binary step, and add the output binary to the signing and upload steps.

The binary source is at cns/cni-telemetry-sidecar/ in the Azure/azure-container-networking repo. The build command mirrors azure-vnet-telemetry exactly but uses a different source directory and output name.

@behzad-mir
Copy link
Copy Markdown
Contributor Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@behzad-mir behzad-mir added this pull request to the merge queue Apr 20, 2026
Merged via the queue into master with commit 9c95db1 Apr 20, 2026
38 of 40 checks passed
@behzad-mir behzad-mir deleted the fix/cni-release-sidecar-artifact branch April 20, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants