Skip to content

Commit

Permalink
docs: remove order and post hook templating (#3338)
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 authored Jan 6, 2025
1 parent 2494c5d commit d6e00af
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions site/src/content/docs/commands/zarf_package_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ tableOfContents: false

Removes a Zarf package that has been deployed already (runs offline)

### Synopsis

Removes a Zarf package that has been deployed already (runs offline). Remove reverses the deployment order, the last component is removed first.

```
zarf package remove { PACKAGE_SOURCE | PACKAGE_NAME } --confirm [flags]
```
Expand Down
8 changes: 7 additions & 1 deletion site/src/content/docs/ref/values.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Deploy time values are used throughout the Zarf deployment process to template `

### Value Templates

Values can be templated into `manifests`, `files`, and `charts` using a unique `###ZARF_<VALUE_KEY>###` syntax anywhere in the file, where `<VALUE_KEY>` is the name of the value along with any associated prefix in ALL_CAPS (see [Setting Values](#setting-values) below). This allows you to punch through other templating engines to place values precisely where you want in a given file. You can also control how this templating happens when defining a value such as with the `autoIndent` key on `constants` and `variables`. A simple value template for a [Zarf Variable](#variables-zarf_var_) named `DATABASE_USERNAME` would look like the following:
Values can be templated into `manifests`, `files`, and `charts` using a unique `###ZARF_VAR_<VALUE_KEY>###` syntax anywhere in the file, where `<VALUE_KEY>` is the name of the value along with any associated prefix in ALL_CAPS (see [Setting Values](#setting-values) below). This allows you to punch through other templating engines to place values precisely where you want in a given file. You can also control how this templating happens when defining a value such as with the `autoIndent` key on `constants` and `variables`. A simple value template for a [Zarf Variable](#variables-zarf_var_) named `DATABASE_USERNAME` would look like the following:

```yaml
apiVersion: v1
Expand All @@ -24,6 +24,12 @@ data:
username: ###ZARF_VAR_DATABASE_USERNAME###
```
:::note
Helm [chart hooks](https://helm.sh/docs/topics/charts_hooks/) are not templated by Zarf
:::
### Helm Chart Mapping
[Zarf Variables](#variables-zarf_var_) can also be mapped directly to Helm values within a given `charts` definition. This is done with the `variables` key within a chart that allows you to take a Zarf Variable `name` and map it to a YAML path within that chart's Helm values. This chart's Helm value will then be set to the current value of the Zarf Variable at the time of it's installation.
Expand Down
1 change: 1 addition & 0 deletions src/cmd/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ func NewPackageRemoveCommand(v *viper.Viper) *cobra.Command {
Aliases: []string{"u", "rm"},
Args: cobra.MaximumNArgs(1),
Short: lang.CmdPackageRemoveShort,
Long: lang.CmdPackageRemoveLong,
PreRun: o.PreRun,
RunE: o.Run,
ValidArgsFunction: getPackageCompletionArgs,
Expand Down
1 change: 1 addition & 0 deletions src/config/lang/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ $ zarf package mirror-resources <your-package.tar.zst> \
CmdPackageInspectFlagListImages = "List images in the package (prints to stdout)"

CmdPackageRemoveShort = "Removes a Zarf package that has been deployed already (runs offline)"
CmdPackageRemoveLong = "Removes a Zarf package that has been deployed already (runs offline). Remove reverses the deployment order, the last component is removed first."
CmdPackageRemoveFlagConfirm = "REQUIRED. Confirm the removal action to prevent accidental deletions"
CmdPackageRemoveFlagComponents = "Comma-separated list of components to remove. This list will be respected regardless of a component's 'required' or 'default' status. Globbing component names with '*' and deselecting components with a leading '-' are also supported."

Expand Down

0 comments on commit d6e00af

Please sign in to comment.