mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-28 06:08:50 +00:00
fix: use HelmRelease namespace for HelmChart lookup in reconcile --with-source
Signed-off-by: Aman-Cool <aman017102007@gmail.com>
This commit is contained in:
parent
4c79a76e94
commit
4bd4aa6f3a
1 changed files with 4 additions and 6 deletions
|
|
@ -98,11 +98,9 @@ func (obj helmReleaseAdapter) getSource() (reconcileSource, sourceReference) {
|
||||||
return nil, srcRef
|
return nil, srcRef
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
// default case assumes the HelmRelease is using a HelmChartTemplate
|
// default case assumes the HelmRelease is using a HelmChartTemplate.
|
||||||
ns = obj.Spec.Chart.Spec.SourceRef.Namespace
|
// The HelmChart is always created in the same namespace as the HelmRelease,
|
||||||
if ns == "" {
|
// regardless of where the HelmRepository source lives.
|
||||||
ns = obj.Namespace
|
|
||||||
}
|
|
||||||
name = fmt.Sprintf("%s-%s", obj.Namespace, obj.Name)
|
name = fmt.Sprintf("%s-%s", obj.Namespace, obj.Name)
|
||||||
return reconcileWithSourceCommand{
|
return reconcileWithSourceCommand{
|
||||||
apiType: helmChartType,
|
apiType: helmChartType,
|
||||||
|
|
@ -111,7 +109,7 @@ func (obj helmReleaseAdapter) getSource() (reconcileSource, sourceReference) {
|
||||||
}, sourceReference{
|
}, sourceReference{
|
||||||
kind: sourcev1.HelmChartKind,
|
kind: sourcev1.HelmChartKind,
|
||||||
name: name,
|
name: name,
|
||||||
namespace: ns,
|
namespace: obj.Namespace,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue