Skip to content

Commit

Permalink
feat: adds retries flag
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGedd committed Mar 28, 2024
1 parent 0d030d4 commit 3e93ee6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cmd/uds.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ func init() {
deployCmd.Flags().BoolVarP(&config.CommonOptions.Confirm, "confirm", "c", false, lang.CmdBundleDeployFlagConfirm)
deployCmd.Flags().StringArrayVarP(&bundleCfg.DeployOpts.Packages, "packages", "p", []string{}, lang.CmdBundleDeployFlagPackages)
deployCmd.Flags().BoolVarP(&bundleCfg.DeployOpts.Resume, "resume", "r", false, lang.CmdBundleDeployFlagResume)
deployCmd.Flags().IntVar(&bundleCfg.DeployOpts.Retries, "retries", 1, lang.CmdBundleDeployFlagRetries)

// inspect cmd flags
rootCmd.AddCommand(inspectCmd)
Expand Down
1 change: 1 addition & 0 deletions src/config/lang/lang.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const (
CmdBundleDeployFlagPackages = "Specify which zarf packages you would like to deploy from the bundle. By default all zarf packages in the bundle are deployed."
CmdBundleDeployFlagResume = "Only deploys packages from the bundle which haven't already been deployed"
CmdBundleDeployFlagSet = "Specify deployment variables to set on the command line (KEY=value)"
CmdBundleDeployFlagRetries = "Specify the number of retries for package deployments (applies to all pkgs in a bundle)"

// bundle inspect
CmdBundleInspectShort = "Display the metadata of a bundle"
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/bundle/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func deployPackages(packages []types.Package, resume bool, b *Bundle) error {
OptionalComponents: strings.Join(pkg.OptionalComponents, ","),
PublicKeyPath: publicKeyPath,
SetVariables: pkgVars,
Retries: 1,
Retries: b.cfg.DeployOpts.Retries,
}

valuesOverrides, err := b.loadChartOverrides(pkg, pkgVars)
Expand Down
1 change: 1 addition & 0 deletions src/types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type BundleDeployOptions struct {
Variables map[string]map[string]interface{} `yaml:"variables,omitempty"`
SharedVariables map[string]interface{} `yaml:"shared,omitempty"`
ZarfPackageNameMap map[string]string `yaml:"-" json:"-"`
Retries int `yaml:"retries"`
}

// BundleInspectOptions is the options for the bundler.Inspect() function
Expand Down

0 comments on commit 3e93ee6

Please sign in to comment.