mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-01 09:44:07 +02:00
All the dependencies get correctly installed when dealing with remote charts. If there's a local chart that depends on remote dependencies then those don't get automatically installed. See #526. They end up with this error: ``` Error: no cached repository for helm-manager-b6cf96b91af4f01317d185adfbe32610179e5246214be9646a52cb0b86032272 found. (try 'helm repo update'): open /root/.cache/helm/repository/helm-manager-b6cf96b91af4f01317d185adfbe32610179e5246214be9646a52cb0b86032272-index.yaml: no such file or directory ``` One workaround for that would be to add the repositories from the local charts. Something like this: ``` cd local-chart/ && helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done ``` This however is not trivial to parse and implement. An easier fix which I did here is just to not allow doing `--skip-refresh` for local repositories. Fixes #526 Signed-off-by: Indrek Juhkam <indrek@urgas.eu> Signed-off-by: Indrek Juhkam <indrek@urgas.eu> Signed-off-by: yxxhero <aiopsclub@163.com>
47 lines
1.7 KiB
Go
47 lines
1.7 KiB
Go
package helmexec
|
|
|
|
import "helm.sh/helm/v3/pkg/chart"
|
|
|
|
// Version represents the version of helm
|
|
type Version struct {
|
|
Major int
|
|
Minor int
|
|
Patch int
|
|
}
|
|
|
|
// Interface for executing helm commands
|
|
type Interface interface {
|
|
SetExtraArgs(args ...string)
|
|
SetHelmBinary(bin string)
|
|
SetEnableLiveOutput(enableLiveOutput bool)
|
|
SetPostRenderer(postRenderer string)
|
|
GetPostRenderer() string
|
|
|
|
AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials string, skipTLSVerify string) error
|
|
UpdateRepo() error
|
|
RegistryLogin(name string, username string, password string) error
|
|
BuildDeps(name, chart string, flags ...string) error
|
|
UpdateDeps(chart string) error
|
|
SyncRelease(context HelmContext, name, chart string, flags ...string) error
|
|
DiffRelease(context HelmContext, name, chart string, suppressDiff bool, flags ...string) error
|
|
TemplateRelease(name, chart string, flags ...string) error
|
|
Fetch(chart string, flags ...string) error
|
|
ChartPull(chart string, path string, flags ...string) error
|
|
ChartExport(chart string, path string, flags ...string) error
|
|
Lint(name, chart string, flags ...string) error
|
|
ReleaseStatus(context HelmContext, name string, flags ...string) error
|
|
DeleteRelease(context HelmContext, name string, flags ...string) error
|
|
TestRelease(context HelmContext, name string, flags ...string) error
|
|
List(context HelmContext, filter string, flags ...string) (string, error)
|
|
DecryptSecret(context HelmContext, name string, flags ...string) (string, error)
|
|
IsHelm3() bool
|
|
GetVersion() Version
|
|
IsVersionAtLeast(versionStr string) bool
|
|
ShowChart(chart string) (chart.Metadata, error)
|
|
}
|
|
|
|
type DependencyUpdater interface {
|
|
UpdateDeps(chart string) error
|
|
IsHelm3() bool
|
|
}
|