mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-22 09:54:07 +02:00
feat: fix needs error with context that includes slash
Signed-off-by: Sergii Iefremov <sergii.iefremov@axios.com>
This commit is contained in:
+3
-1
@@ -399,7 +399,9 @@ func (st *HelmState) ApplyOverrides(spec *ReleaseSpec) {
|
||||
}
|
||||
|
||||
if len(components) > 2 {
|
||||
kubecontext = components[len(components)-3]
|
||||
// Join all ID components except last 2 (namespace and name) into kubecontext.
|
||||
// Should be safe because resource names do not contain slashes.
|
||||
kubecontext = strings.Join(components[:len(components)-2], "/")
|
||||
} else {
|
||||
kubecontext = spec.KubeContext
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user