-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: override state(former "enviroment") values via command-line args (
#644) The addition of `--set k1=v1,k2=v2` and `--values file1 --values file2` was originally planned in #361. But it turned out we already had `--values` for existing helmfile commands like `sync`. Duplicated flags doesn't work, obviously. So this actually add `--state-values-set k1=v1,k2=v2` and `--set-values-file file1 --set-values-file file2`. They are called "state" values according to the discussion we had at #640 Resolves #361
- Loading branch information
Showing
8 changed files
with
191 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/roboll/helmfile/pkg/state" | ||
"gopkg.in/yaml.v2" | ||
) | ||
|
||
type LoadOpts struct { | ||
Selectors []string | ||
Environment state.SubhelmfileEnvironmentSpec | ||
|
||
// CalleePath is the absolute path to the file being loaded | ||
CalleePath string | ||
} | ||
|
||
func (o LoadOpts) DeepCopy() LoadOpts { | ||
bytes, err := yaml.Marshal(o) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
new := LoadOpts{} | ||
if err := yaml.Unmarshal(bytes, &new); err != nil { | ||
panic(err) | ||
} | ||
|
||
return new | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters