Files
helmfile/pkg/app/context.go
T
KUOKA Yusuke 1e260e4a5e Fix and enhancement to repository update (#1383)
Changes:

- Prevent Helmfile from unnecessarily running `helm repo add` and `helm repo up` against repositories for unused repositories(repositories of releases filtered out by selector)
- Fixes #1330
2020-07-28 10:17:43 +09:00

26 lines
423 B
Go

package app
import (
"github.com/roboll/helmfile/pkg/state"
)
type Context struct {
updatedRepos map[string]bool
}
func NewContext() Context {
return Context{
updatedRepos: map[string]bool{},
}
}
func (ctx Context) SyncReposOnce(st *state.HelmState, helm state.RepoUpdater) error {
updated, err := st.SyncRepos(helm, ctx.updatedRepos)
for _, r := range updated {
ctx.updatedRepos[r] = true
}
return err
}