Add cross-platform aks-flex-config binaries - #284
Add cross-platform aks-flex-config binaries#284Julien Stroheker (julienstroheker) wants to merge 2 commits into
aks-flex-config binaries#284Conversation
|
Thanks for the contribution! This pull request comes from a fork, so the Azure E2E workflow is intentionally skipped for security reasons. Merge will remain blocked until the E2E tests have been run from a branch in the Maintainer options:
We do not run Azure E2E directly from fork PR code because it requires Azure OIDC access. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a native Go aks-flex-config CLI to generate AKS Flex Node configuration from workstation-side AKS metadata, adds cross-platform release artifacts (Windows/macOS), and updates documentation + CI to validate parity with the existing Python helper.
Changes:
- Added a new Go-based
aks-flex-configcommand (Cobra) with RBAC setup and config generation modes, plus unit tests. - Expanded build/release automation to produce raw Windows/macOS helper binaries alongside existing Linux agent tarballs.
- Updated docs/quickstart with Windows PowerShell and macOS native-binary onboarding, and added an E2E parity check script.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds platform-specific workstation instructions (PowerShell/macOS native helper). |
| pkg/cmd/config/config.go | Implements the Go aks-flex-config command logic (RBAC + config generation). |
| pkg/cmd/config/config_test.go | Adds unit tests for command wiring, auth-mode validation, bootstrap-token generation, and file writing. |
| Makefile | Adds build targets for config helper cross-platform binaries and cleans helper artifacts. |
| hack/e2e/config-helper-parity.sh | Adds deterministic parity test comparing Python helper output vs native binary output. |
| docs/usages/aks-flex-config.md | Documents Python + native helper usage and platform-specific prerequisites/steps. |
| cmd/aks-flex-config/main.go | Adds the standalone aks-flex-config binary entry point. |
| .github/workflows/release.yml | Extends release matrix to build/publish helper binaries (raw) plus existing Linux tarballs (packaged). |
| .github/workflows/e2e-tests.yml | Runs the new parity validation before Azure login in E2E workflow. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| func (runner execRunner) Run(ctx context.Context, name string, args []string, input string) (string, error) { | ||
| cmd := exec.CommandContext(ctx, name, args...) // #nosec G204 -- executable names are fixed to az and kubectl | ||
| if input != "" { | ||
| cmd.Stdin = strings.NewReader(input) | ||
| } | ||
| cmd.Stderr = runner.stderr | ||
| output, err := cmd.Output() | ||
| if err != nil { | ||
| return "", err | ||
| } | ||
| return strings.TrimSpace(string(output)), nil | ||
| } |
| import ( | ||
| "context" | ||
| "fmt" | ||
| "os" | ||
| "os/signal" | ||
| "syscall" | ||
|
|
||
| configcmd "github.com/Azure/AKSFlexNode/pkg/cmd/config" | ||
| ) | ||
|
|
||
| func main() { | ||
| ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) | ||
| defer stop() |
This PR adds a native, cross-platform aks-flex-config CLI and documents a Windows/PowerShell onboarding path for AKS Flex Node.
The existing Python helper remains available for compatibility with current labs and automation.
Changes
setup-node-rbacgenerate-node-configRelease artifacts
Integrated the config helper into the existing release build matrix and added these raw release assets:
aks-flex-config-windows-amd64.exeaks-flex-config-darwin-amd64aks-flex-config-darwin-arm64The Linux
aks-flex-nodeagent continues to be released as amd64 and arm64 tarballs. All artifacts are included in release checksums.Documentation
Updated the quickstart and config-helper guide with collapsible platform-specific instructions:
E2E coverage
Added a deterministic parity test that:
The parity check runs before Azure login and does not mutate cloud or Kubernetes resources.