-
Notifications
You must be signed in to change notification settings - Fork 199
feat: add arch variable to variables #3935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for zarf-docs canceled.
|
Added injector logic |
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
c715385
to
238956a
Compare
Hm, so I after reviewing the logs from the last e2e test I see that for the arch value was not being passed along correctly. I updated the logic such that the injector, docker registry, and gitea all get deployed.... however the agent gets deployed fine once, however during part of the |
I updated this PR so now Edit: Though, I am getting the following error when doing an end-2-end test:
|
This seems like it'll be a huge value add for Zarf, thanks for the PR. Once CI is passing, I'll try to test locally and send you an updated eks.yaml which would let us spin up a multi-arch cluster so we can have a proper e2e test. |
Yea no problem! This does not fully address having a truly multi-arch support, but is a step in that direction. (A bit selfishly I would love to see zarf running a multi-arch cluster at home, RPI and intel NUC) |
Todo: update the variable to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small notes, I will make it an action item on my side to get you a new eks.yaml that can properly test a multi-node cluster with Zarf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realized something after https://github.com/zarf-dev/zarf/actions/runs/16351367206/job/46203688496 failed
@AustinAbro321 is there anything else I can do for this PR? |
@a1994sc Apology for the delay, I realized there was a gap in how our AWS infra was setup that required some changes to allow PRs to make EKS clusters. I have a workflow in .github/workflows/nightly-eks-multi-arch.yml that should run through and do a multi arch test. Could you copy that file, minus line 6 that makes it run on pull requests. Workflow is running now, it's passed before I just made some small changes to the structure of the file. |
src/pkg/cluster/injector.go
Outdated
if nodeDetails.Status.NodeInfo.Architecture == "" || nodeDetails.Status.NodeInfo.Architecture != architecture { | ||
continue | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if nodeDetails.Status.NodeInfo.Architecture == "" || nodeDetails.Status.NodeInfo.Architecture != architecture { | |
continue | |
} | |
if nodeDetails.Status.NodeInfo.Architecture != "" && nodeDetails.Status.NodeInfo.Architecture != architecture { | |
continue | |
} |
Suggestion to change the behavior to not continue if architecture is empty. That way on the off chance there's some distro or version that doesn't fill in this value, nothing breaks for existing users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to review, but I think that there was an issue with the injector logic not finding the right node with the suggested config.... but I will review and see if I had some bad logic before
Confirmed locally the test-upgrade failure is not a flake. If we go from an older |
I got bogged down by org stuff, so I will see about identifying the upgrade issues this week |
c80e615
to
a12deb9
Compare
@AustinAbro321 would expanding Lines 269 to 277 in b337191
|
@a1994sc Since state.Merge essentially exists for update-creds we shouldn't make an update there. In that case we can assume the architecture in state will be the same as before since a new package is not being deployed. Only time it'd ever change is if someone in a multi architecture cluster deploys one version of the init package with one architecture then deploys another version of the init packager with a different architecture. The reason the upgrade test is failing currently is because architecture is only set when state is nil. We need to set architecture outside of the nil check so that is always set even on subsequent init calls. Otherwise we will see this in the podspec which will never match to a node. nodeSelector:
kubernetes.io/arch: "" |
Ah ok, well is there an existing way to write the architecture of the package to the state? And have it persist? I have tried: if d.s.Architecture == "" {
d.s.Architecture = pkgLayout.Pkg.Build.Architecture
} But that does not persist in the edit: add "real" code example |
9ed22e2
to
e890c3b
Compare
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
e890c3b
to
d155b10
Compare
@AustinAbro321 I believe that I fixed the issue with this PR. Can you, or another maintainer, run the tests to verify? |
I'm thinking about the complexity of this PR, and also about a recent issue we got #4168 which would somewhat conflict with this PR as written. I would recommend taking a simpler approach here and adding a Zarf variable called NODE_SELECTOR to each of our init package charts. Zarf would no longer automatically set the node selector, the user would need to use the |
Description
This PR adds in the zarf variable
ZARF_ARCHITECTURE
, this helps with deploying the zarf package into a multi-arch cluster.Related Issue
Relates to #3817
Checklist before merging