mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 19:01:50 +02:00
Adding in diff plugin execution
- Simple copy-paste for the most part from sync job. I had started down the path of adding in a meta PluginCommand directive and trying to make it more modular, but in the end there are some small differences between the execution that were a bit difficult to model and it just got ugly. Figured keeping it simple would be easier to manage
This commit is contained in:
@@ -76,6 +76,18 @@ func (helm *execer) SyncChart(name, chart string, flags ...string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (helm *execer) DiffChart(name, chart string, flags ...string) error {
|
||||
chart, err := normalizeChart(chart)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out, err := helm.exec(append([]string{"diff", name, chart}, flags...)...)
|
||||
if helm.writer != nil {
|
||||
helm.writer.Write(out)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (helm *execer) DeleteChart(name string) error {
|
||||
out, err := helm.exec("delete", name)
|
||||
if helm.writer != nil {
|
||||
|
||||
@@ -7,5 +7,6 @@ type Interface interface {
|
||||
UpdateRepo() error
|
||||
|
||||
SyncChart(name, chart string, flags ...string) error
|
||||
DiffChart(name, chart string, flags ...string) error
|
||||
DeleteChart(name string) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user