do not pass --api-versions to "helm diff" (#1061)
This commit is contained in:
parent
b044820607
commit
fc75f25293
|
|
@ -270,11 +270,11 @@ bases:
|
||||||
#
|
#
|
||||||
# Advanced Configuration: API Capabilities
|
# Advanced Configuration: API Capabilities
|
||||||
#
|
#
|
||||||
# Some helmfile tasks render releases locally without querying an actual cluster (diff, apply, template),
|
# 'helmfile template' renders releases locally without querying an actual cluster,
|
||||||
# and in this case `.Capabilities.APIVersions` cannot be populated.
|
# and in this case `.Capabilities.APIVersions` cannot be populated.
|
||||||
# When a chart queries for a specific CRD, this can lead to unexpected results.
|
# When a chart queries for a specific CRD, this can lead to unexpected results.
|
||||||
#
|
#
|
||||||
# Configure a fixed list of api versions to pass to helm via the --api-versions flag:
|
# Configure a fixed list of api versions to pass to 'helm template' via the --api-versions flag:
|
||||||
apiVersions:
|
apiVersions:
|
||||||
- example/v1
|
- example/v1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3409,25 +3409,6 @@ Affected releases are:
|
||||||
err: "foo" has dependency to inexistent release "bar"
|
err: "foo" has dependency to inexistent release "bar"
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "pass apiVersions to helm diff",
|
|
||||||
loc: location(),
|
|
||||||
files: map[string]string{
|
|
||||||
"/path/to/helmfile.yaml": `
|
|
||||||
apiVersions:
|
|
||||||
- xxx/v1
|
|
||||||
releases:
|
|
||||||
- name: foo
|
|
||||||
chart: mychart1
|
|
||||||
`,
|
|
||||||
},
|
|
||||||
diffs: map[exectest.DiffKey]error{
|
|
||||||
exectest.DiffKey{Name: "foo", Chart: "mychart1", Flags: "--kube-contextdefault--api-versionsxxx/v1--detailed-exitcode"}: helmexec.ExitError{Code: 2},
|
|
||||||
},
|
|
||||||
upgraded: []exectest.Release{
|
|
||||||
{Name: "foo", Flags: []string{"--kube-context", "default"}},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := range testcases {
|
for i := range testcases {
|
||||||
|
|
|
||||||
|
|
@ -1619,8 +1619,6 @@ func (st *HelmState) flagsForDiff(helm helmexec.Interface, release *ReleaseSpec,
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = st.appendApiVersionsFlags(flags)
|
|
||||||
|
|
||||||
common, err := st.namespaceAndValuesFlags(helm, release, workerIndex)
|
common, err := st.namespaceAndValuesFlags(helm, release, workerIndex)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue