Skip to content
Snippets Groups Projects
Commit 13cab2b329ba authored by steeve.chailloux's avatar steeve.chailloux
Browse files

can now disable a chart

useful when using inherit
parent d5c75e7ab94a
No related branches found
No related tags found
No related merge requests found
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
} }
type Chart struct { type Chart struct {
Type string Type string
Path string Path string
Name string Name string
Disabled bool
} }
type Arg struct { type Arg struct {
...@@ -347,6 +348,7 @@ ...@@ -347,6 +348,7 @@
Type string Type string
Path string Path string
Name string Name string
Disabled bool
ValuesFileNames []string ValuesFileNames []string
} }
...@@ -386,6 +388,7 @@ ...@@ -386,6 +388,7 @@
Type: c.Type, Type: c.Type,
Path: c.Path, Path: c.Path,
Name: c.Name, Name: c.Name,
Disabled: c.Disabled,
ValuesFileNames: nil, ValuesFileNames: nil,
} }
} }
......
...@@ -197,6 +197,9 @@ ...@@ -197,6 +197,9 @@
// create ytt chart commands // create ytt chart commands
cmds := make(map[string]*cmd.Cmd) cmds := make(map[string]*cmd.Cmd)
for name, chart := range r.config.Spec.Charts { for name, chart := range r.config.Spec.Charts {
if chart.Disabled {
continue
}
args, err := chart.BuildArgs(name, r.config.Namespace) args, err := chart.BuildArgs(name, r.config.Namespace)
if err != nil { if err != nil {
return nil, fmt.Errorf("build: failed to build args %w", err) return nil, fmt.Errorf("build: failed to build args %w", err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment