Pass an atomic_upgrade setting to the Upgrade step [#64]

This commit is contained in:
Erin Call 2020-01-07 12:21:55 -08:00
parent 971e3f17cb
commit c8b4ad4c46
No known key found for this signature in database
GPG key ID: 4071FF6C15B8DAD1
4 changed files with 16 additions and 11 deletions

View file

@ -38,6 +38,7 @@ Installations are triggered when the `helm_command` setting is "upgrade." They c
| wait | boolean | | Wait until kubernetes resources are in a ready state before marking the installation successful. |
| timeout | duration | | Timeout for any *individual* Kubernetes operation. The installation's full runtime may exceed this duration. |
| force | boolean | | Pass `--force` to `helm upgrade`. |
| atomic_upgrade | boolean | | Pass `--atomic` to `helm upgrade`. |
| values | list\<string\> | | Chart values to use as the `--set` argument to `helm upgrade`. |
| string_values | list\<string\> | | Chart values to use as the `--set-string` argument to `helm upgrade`. |
| values_files | list\<string\> | | Values to use as `--values` arguments to `helm upgrade`. |

View file

@ -43,6 +43,7 @@ type Config struct {
Chart string `` // Chart argument to use in applicable helm commands
Release string `` // Release argument to use in applicable helm commands
Force bool `` // Pass --force to applicable helm commands
AtomicUpgrade bool `split_words:"true"` // Pass --atomic to `helm upgrade`
LintStrictly bool `split_words:"true"` // Pass --strict to `helm lint`
Stdout io.Writer `ignored:"true"`

View file

@ -109,6 +109,7 @@ var upgrade = func(cfg Config) []Step {
ReuseValues: cfg.ReuseValues,
Timeout: cfg.Timeout,
Force: cfg.Force,
Atomic: cfg.AtomicUpgrade,
})
return steps

View file

@ -141,6 +141,7 @@ func (suite *PlanTestSuite) TestUpgrade() {
Chart: "billboard_top_100",
Release: "post_malone_circles",
Force: true,
AtomicUpgrade: true,
}
steps := upgrade(cfg)
@ -162,6 +163,7 @@ func (suite *PlanTestSuite) TestUpgrade() {
ReuseValues: cfg.ReuseValues,
Timeout: cfg.Timeout,
Force: cfg.Force,
Atomic: true,
}
suite.Equal(expected, upgrade)