Skip to content
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

Fail when package architecture doesn't match cluster architecture #1495

Merged
merged 86 commits into from
May 8, 2023

Conversation

lucasrod16
Copy link
Member

@lucasrod16 lucasrod16 commented Mar 28, 2023

Description

Fail zarf init and zarf package deploy when package architecture doesn't match cluster architecture

Deployment scenarios that this PR covers:

  • If zarf init is ran in appliance mode(deploying k3s), verify that the package architecture matches the machine that zarf is attempting to initialize with a k3s cluster

  • If zarf init or zarf package deploy is ran, verify that the package architecture matches the target cluster architecture

Related Issue

Fixes #1491

Relates to #955

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist before merging

Add e2e test for verify this check works
@netlify
Copy link

netlify bot commented Mar 28, 2023

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit abaeaa1
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/6459790375ce4300086e7bb7

@lucasrod16 lucasrod16 marked this pull request as draft March 28, 2023 08:56
@lucasrod16 lucasrod16 marked this pull request as ready for review March 30, 2023 01:49
@lucasrod16
Copy link
Member Author

This PR is ready for review whenever somebody gets the chance to take a look.

src/cmd/initialize.go Outdated Show resolved Hide resolved
@lucasrod16 lucasrod16 requested a review from Racer159 May 4, 2023 20:14
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

sorry that took so long

packages/distros/k3s/zarf.yaml Outdated Show resolved Hide resolved
packages/distros/k3s/zarf.yaml Outdated Show resolved Hide resolved
src/test/common.go Outdated Show resolved Hide resolved
src/test/common.go Outdated Show resolved Hide resolved
src/test/e2e/20_zarf_init_test.go Outdated Show resolved Hide resolved
src/test/e2e/29_mismatched_architectures_test.go Outdated Show resolved Hide resolved
src/pkg/packager/common.go Outdated Show resolved Hide resolved
src/test/e2e/20_zarf_init_test.go Outdated Show resolved Hide resolved
src/test/e2e/20_zarf_init_test.go Show resolved Hide resolved
lucasrod16 and others added 11 commits May 8, 2023 11:04
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Use switch statement instead of if statement and return the opposite arch string

Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lgtm!

@Racer159 Racer159 merged commit 84fb520 into main May 8, 2023
21 checks passed
@Racer159 Racer159 deleted the zarf-init-arch branch May 8, 2023 23:04
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.

Zarf silently fails when init package architecture doesn't match cluster architecture
3 participants