Skip to content

Commit

Permalink
fix overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
danj-replicated committed Jan 10, 2024
1 parent 4ff8bc6 commit 2341490
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions cmd/embedded-cluster/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ var configCommand = &cli.Command{
if err != nil {
return fmt.Errorf("unable to render config: %w", err)
}

if c.String("overrides") != "" {
eucfg, err := parseEndUserConfig(c.String("overrides"))
if err != nil {
return fmt.Errorf("unable to process overrides file: %w", err)
}
if err := config.ApplyEmbeddedUnsupportedOverrides(
cfg, eucfg.Spec.UnsupportedOverrides.K0s,
); err != nil {
return fmt.Errorf("unable to apply overrides: %w", err)
}
}
opts := []addons.Option{}
if c.Bool("no-prompt") {
opts = append(opts, addons.WithoutPrompt())
Expand All @@ -55,7 +43,9 @@ var configCommand = &cli.Command{
if err := config.UpdateHelmConfigs(cfg, opts...); err != nil {
return fmt.Errorf("unable to update helm configs: %w", err)
}

if err := applyUnsupportedOverrides(c, cfg); err != nil {
return fmt.Errorf("unable to apply unsupported overrides: %w", err)
}
if err := yaml.NewEncoder(os.Stdout).Encode(cfg); err != nil {
return fmt.Errorf("unable to write config file: %w", err)
}
Expand Down

0 comments on commit 2341490

Please sign in to comment.