Skip to content

Add a command that auto-generates a boilerplate Zarf package #513

@lucasrod16

Description

@lucasrod16

Is your feature request related to a problem? Please describe.
It would be nice to have a zarf command that auto-generates a boilerplate zarf package, similar in behavior to what helm create does.

Describe the solution you'd like
Run this command: zarf package generate

Result: have a boilerplate zarf package created in the directory that you specified

There appears to be many different ways you can structure zarf packages. It can consist of a single zarf.yaml file, or could also contain multiple nested directories. Would love to hear people's thoughts on how complex an auto-generated package should be.

I was thinking something along the lines of:

.
├── README.md
├── <.Chart.Name>-values.yaml
└── zarf.yaml

With the zarf.yaml showing an example of deploying a helm chart with zarf, like the gitea example:

kind: ZarfPackageConfig
metadata:
  name: "init-package-git-server"

components:
  - name: git-server
    description: "Add Gitea for serving gitops-based clusters in an airgap"
    images:
      - gitea/gitea:1.16.8
    charts:
      - name: gitea
        url: https://dl.gitea.io/charts
        version: 5.0.8
        namespace: zarf
        valuesFiles:
          - gitea-values.yaml
    scripts:
      retry: true
      after:
        - "./zarf tools create-read-only-gitea-user"

Maybe worth considering parsing a given helm chart to auto-generate a zarf package from it...a lot more complexity though.

Describe alternatives you've considered
Copy/paste example packages from this repository.

Additional context
Would love to help contribute on this

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions