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

feat: package generation ALPHA #2269

Merged
merged 61 commits into from Mar 13, 2024
Merged

feat: package generation ALPHA #2269

merged 61 commits into from Mar 13, 2024

Conversation

andrewg-xyz
Copy link
Contributor

@andrewg-xyz andrewg-xyz commented Jan 30, 2024

Description

Introduce Zarf package generation from a source

Related Issue

Fixes #821

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Copy link

netlify bot commented Jan 30, 2024

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit c2d07d0
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/65f1a807690aa20008adc30f

@andrewg-xyz andrewg-xyz marked this pull request as draft January 30, 2024 03:32
@andrewg-xyz
Copy link
Contributor Author

I was able to smoke test function pre and post rebase via:

mkdir tmp-gen && cd tmp-gen
helm pull oci://ghcr.io/stefanprodan/charts/podinfo && tar -xf podinfo-6.5.4.tgz
../build/zarf-mac-apple package generate my-podinfo --from ./podinfo

Both produced zarf.yaml

kind: ZarfPackageConfig
metadata:
  name: my-podinfo
components:
- name: component-local-chart-podinfo-87f03f37-b831-4968-8b5b-acf0a54530b6
  charts:
  - name: podinfo
    version: 6.5.4
    localPath: ./podinfo
    namespace: zarf-generated-local-chart-podinfo

@andrewg-xyz
Copy link
Contributor Author

a few things to chase down/confirm:

  • ZarfCreateOptions.{CachePath,Insecure} moved to ZarfCommonOptions.{CachePath,Insecure}
  • ZarfCreateOptions.OutputDirectory >> move to? maybe ZarfPullOptions.OutputDirectory
  • a few merge conflicts were due to functionality partially ported to pkg, need to confirm no more internal functionality exists that has been moved

a few things I know can be improved:

  • switch blocks in package Generate command
  • check implementation for new package structure in zarf

@Noxsios Noxsios changed the title feat: package generation (#821) feat: package generation Feb 23, 2024
@andrewg-xyz andrewg-xyz force-pushed the 821-package-generation branch 2 times, most recently from 1ea909d to bf8b450 Compare February 26, 2024 23:22
src/cmd/dev.go Outdated Show resolved Hide resolved
src/config/config.go Outdated Show resolved Hide resolved
src/cmd/dev.go Show resolved Hide resolved
src/pkg/packager/generate.go Outdated Show resolved Hide resolved
src/pkg/packager/generate.go Outdated Show resolved Hide resolved
src/test/e2e/13_zarf_package_generate_test.go Outdated Show resolved Hide resolved
src/config/config.go Outdated Show resolved Hide resolved
src/pkg/packager/generate.go Outdated Show resolved Hide resolved
src/pkg/packager/prepare.go Outdated Show resolved Hide resolved
src/types/runtime.go Outdated Show resolved Hide resolved
src/config/lang/english.go Outdated Show resolved Hide resolved
AustinAbro321
AustinAbro321 previously approved these changes Mar 1, 2024
@AustinAbro321
Copy link
Contributor

LGTM, we will need approval from someone else on the zarf team

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.

Adding comments, mostly cleaning up string building, but there are a few things that could make this more generally useful and one issue with garbled text.

src/cmd/dev.go Outdated Show resolved Hide resolved
src/pkg/packager/generate.go Outdated Show resolved Hide resolved
src/cmd/dev.go Outdated Show resolved Hide resolved
src/pkg/packager/generate.go Outdated Show resolved Hide resolved
src/pkg/packager/generate.go Outdated Show resolved Hide resolved
src/pkg/packager/generate.go Outdated Show resolved Hide resolved
andrewg-xyz and others added 7 commits March 7, 2024 21:16
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
@Noxsios Noxsios changed the title feat: package generation feat: package generation **ALPHA** Mar 13, 2024
@Noxsios Noxsios changed the title feat: package generation **ALPHA** feat: package generation ALPHA Mar 13, 2024
@Noxsios Noxsios merged commit 9608731 into main Mar 13, 2024
29 checks passed
@Noxsios Noxsios deleted the 821-package-generation branch March 13, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

Package Generation for projects
6 participants