Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: RealAnna <anna.reale@dynatrace.com>
  • Loading branch information
RealAnna committed Mar 13, 2023
1 parent 44599c8 commit 0dee285
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/helmify/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func ReadFlags() config.Config {
flag.BoolVar(&result.VeryVerbose, "vv", false, "Enable very verbose output. Same as verbose but with DEBUG. Example: helmify -vv")
flag.BoolVar(&crd, "crd-dir", false, "Enable crd install into 'crds' directory.\nWarning: CRDs placed in 'crds' directory will not be templated by Helm.\nSee https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations\nExample: helmify -crd-dir")
flag.BoolVar(&result.ImagePullSecrets, "image-pull-secrets", false, "Allows the user to use existing secrets as imagePullSecrets in values.yaml")
flag.BoolVar(&result.GenerateDefault, "default", false, "Allows the user to add empty placeholders for tipical customization options in values.yaml. Currently covers: topology constraints, node selectors, tolerances")
flag.BoolVar(&result.GenerateDefaults, "generate-defaults", false, "Allows the user to add empty placeholders for tipical customization options in values.yaml. Currently covers: topology constraints, node selectors, tolerances")

flag.Parse()
if h || help {
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ type Config struct {
Crd bool
// ImagePullSecrets flag
ImagePullSecrets bool
// GenerateDefault enables the generation of empty values placeholders for common customization options of helm chart
// GenerateDefaults enables the generation of empty values placeholders for common customization options of helm chart
// current generated values: tolerances, node selectors, topology constraints
GenerateDefault bool
GenerateDefaults bool
}

func (c *Config) Validate() error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (d deployment) Process(appMeta helmify.AppMetadata, obj *unstructured.Unstr
imagePullSecrets.ProcessSpecMap(specMap, &values)
}

spec := constraints.ProcessSpecMap(nameCamel, specMap, &values, appMeta.Config().GenerateDefault)
spec := constraints.ProcessSpecMap(nameCamel, specMap, &values, appMeta.Config().GenerateDefaults)
spec = strings.ReplaceAll(spec, "'", "")

return true, &result{
Expand Down

0 comments on commit 0dee285

Please sign in to comment.