Skip to content

Commit

Permalink
Merge pull request #281 from medzin/issue-280
Browse files Browse the repository at this point in the history
Add ability to disable environment substitution in values files
  • Loading branch information
Sami Alajrami authored Aug 13, 2019
2 parents 5b7c034 + 6cd9252 commit b4cf229
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func init() {
flag.BoolVar(&suppressDiffSecrets, "suppress-diff-secrets", false, "don't show secrets in helm diff output.")
flag.IntVar(&diffContext, "diff-context", -1, "number of lines of context to show around changes in helm diff output")
flag.BoolVar(&noEnvSubst, "no-env-subst", false, "turn off environment substitution globally")
flag.BoolVar(&noEnvValuesSubst, "no-env-values-subst", false, "turn off environment substitution in values files")
flag.BoolVar(&updateDeps, "update-deps", false, "run 'helm dep up' for local chart")
flag.BoolVar(&forceUpgrades, "force-upgrades", false, "use --force when upgrading helm releases. May cause resources to be recreated.")

Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var showDiff bool
var suppressDiffSecrets bool
var diffContext int
var noEnvSubst bool
var noEnvValuesSubst bool
var updateDeps bool
var forceUpgrades bool

Expand Down
4 changes: 2 additions & 2 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func fromTOML(file string, s *state) (bool, string) {
}
addDefaultHelmRepos(s)
resolvePaths(file, s)
if !noEnvSubst {
if !noEnvSubst && !noEnvValuesSubst {
substituteEnvInValuesFiles(s)
}

Expand Down Expand Up @@ -107,7 +107,7 @@ func fromYAML(file string, s *state) (bool, string) {
addDefaultHelmRepos(s)
resolvePaths(file, s)

if !noEnvSubst {
if !noEnvSubst && !noEnvValuesSubst {
substituteEnvInValuesFiles(s)
}

Expand Down

0 comments on commit b4cf229

Please sign in to comment.