Skip to content

Conversation

@a1994sc
Copy link
Contributor

@a1994sc a1994sc commented Nov 23, 2025

Description

This is PR adds checks during the scheduling of the injector pod to match the architecture of the package; e.i. if you have an amd64 zarf init package, then the injector will only be scheduled on a node of amd64.

A chunk of the work for this PR came from PR #3935 but I felt it was better to focus on the injector part in this PR and open a second PR for scheduling the agent/registry.

Related Issue

Relates to #3817

Checklist before merging

@a1994sc a1994sc requested review from a team as code owners November 23, 2025 23:03
@netlify
Copy link

netlify bot commented Nov 23, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 200e9bd
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/69285baecdae8f000857ce8f

@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

❌ Patch coverage is 56.45161% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/packager/deploy.go 0.00% 15 Missing ⚠️
src/pkg/cluster/injector.go 74.46% 7 Missing and 5 partials ⚠️
Files with missing lines Coverage Δ
src/pkg/cluster/injector.go 71.34% <74.46%> (+0.12%) ⬆️
src/pkg/packager/deploy.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@a1994sc a1994sc force-pushed the feature/allen/node-arch branch from 68fdec5 to b5f89b1 Compare November 23, 2025 23:41
@a1994sc
Copy link
Contributor Author

a1994sc commented Nov 24, 2025

This PR does also include a new workflow, provided by Austin, to test some level of multi-arch workflows.

@a1994sc a1994sc changed the title feat!: update injector to use Opt Struct feat!: update injector to respect arch of package Nov 24, 2025
Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

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

Passing comment for thoughts and opinions.

var zarfImageRegex = regexp.MustCompile(`(?m)^(127\.0\.0\.1|\[::1\]):`)

// InjectorOpts represents the config for the injector pod
type InjectorOpts struct {
Copy link
Member

Choose a reason for hiding this comment

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

Layout of the structure looks good. Quick passing thought of ensuring these items are indeed optional?

Ideally required items are function parameters and optional are in the options struct.

Another overlay may be deciding if we can set sane defaults.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, gotcha, I think that makes sense too me... I will have to look up some examples on how to enforce certain fields are populated verses optional...

Thank you Brandt!

(P.S. If you have a more meaningful name for this struct feel free to drop it, I'm crap at naming stuff)

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants