feat(diff): Pass namespace to helm-diff

Tested manually by running `helmfile diff` with debug logging:

```yaml
helmDefaults:
  tillerNamespace: foo

charts:
  - name: grafana
    namespace: grafana
    chart: stable/grafana
```

```console
$ ./helmfile --log-level debug diff
Comparing grafana stable/grafana
exec: helm diff upgrade --allow-unreleased grafana stable/grafana --namespace grafana --tiller-namespace=foo
```

Resolves #179
This commit is contained in:
Yusuke KUOKA 2018-08-22 11:20:22 +09:00
parent 545a4a3efa
commit 127dd857df
1 changed files with 4 additions and 2 deletions

View File

@ -271,12 +271,14 @@ func (state *HelmState) DiffReleases(helm helmexec.Interface, additionalValues [
go func() {
for release := range jobQueue {
errs := []error{}
// Plugin command doesn't support explicit namespace
release.Namespace = ""
state.applyDefaultsTo(release)
flags, err := flagsForRelease(helm, state.BaseChartPath, release)
if err != nil {
errs = append(errs, err)
}
for _, value := range additionalValues {
valfile, err := filepath.Abs(value)
if err != nil {