mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 15:27:03 +02:00
Support for createNamespace (#1226)
- createNamespace is a new attribute that can be added to helmDefaults or an individual release to enforce the creation of a release namespace during sync if the namespace does not exist. This leverages helm's (3.2+) --create-namespace flag for the install/upgrade command. If running helm < 3.2, the createNamespace attribute has no effect. Resolves #891 Resolves #1140
This commit is contained in:
@@ -2168,6 +2168,14 @@ func (helm *mockHelmExec) IsHelm3() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (helm *mockHelmExec) GetVersion() helmexec.Version {
|
||||
return helmexec.Version{}
|
||||
}
|
||||
|
||||
func (helm *mockHelmExec) IsVersionAtLeast(major int, minor int) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func TestTemplate_SingleStateFile(t *testing.T) {
|
||||
files := map[string]string{
|
||||
"/path/to/helmfile.yaml": `
|
||||
|
||||
@@ -82,3 +82,13 @@ func (helm *noCallHelmExec) IsHelm3() bool {
|
||||
helm.doPanic()
|
||||
return false
|
||||
}
|
||||
|
||||
func (helm *noCallHelmExec) GetVersion() helmexec.Version {
|
||||
helm.doPanic()
|
||||
return helmexec.Version{}
|
||||
}
|
||||
|
||||
func (helm *noCallHelmExec) IsVersionAtLeast(major int, minor int) bool {
|
||||
helm.doPanic()
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user