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

Template files #1171

Merged
merged 16 commits into from
Jan 10, 2023
Merged

Template files #1171

merged 16 commits into from
Jan 10, 2023

Conversation

jeff-mccoy
Copy link
Contributor

@jeff-mccoy jeff-mccoy commented Jan 7, 2023

This PR adds variable templating to text files included under the files key in a Zarf Package. This mirrors the existing behavior of Kustomizations, charts, and manifests, except for the case of files called before the Zarf package needs a cluster. In this case, some special variables, such as ###ZARF_REGISTRY### will not be available. This was needed because some components with files will be called before a cluster is created, such as in the K3s package.

This PR also fixes a typo with the data-injection marker and permits the use of 0-9 for variable/constant names in addition to A-Z_.

Related to #1129
Related to #1141

@jeff-mccoy jeff-mccoy marked this pull request as ready for review January 8, 2023 22:07
@Racer159
Copy link
Contributor

Racer159 commented Jan 9, 2023

Added breaking change since the DATA_INJECTION_MARKER change will break any existing data injection packages.

EDIT: Nevermind 😅

src/pkg/utils/io.go Outdated Show resolved Hide resolved
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.

Approving for now since the mimetype stuff can be figured out later

src/pkg/utils/io.go Show resolved Hide resolved
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!

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.

2 participants