Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Move successful chart fetch signal to reconcile #2316

Merged
merged 1 commit into from
Aug 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions integrations/helm/chartsync/chartsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,13 @@ func (chs *ChartChangeSync) ReconcileReleaseDef(fhr fluxv1beta1.HelmRelease) {
if !ok {
return
}
chs.setCondition(fhr, fluxv1beta1.HelmReleaseChartFetched, v1.ConditionTrue, ReasonCloned, "successfully cloned git repo")
} else if fhr.Spec.ChartSource.RepoChartSource != nil {
chartPath, chartRevision, ok = chs.getRepoChartSource(fhr)
if !ok {
return
}
chs.setCondition(fhr, fluxv1beta1.HelmReleaseChartFetched, v1.ConditionTrue, ReasonDownloaded, "chart fetched: "+filepath.Base(chartPath))
}

if rel == nil {
Expand Down Expand Up @@ -535,7 +537,6 @@ func (chs *ChartChangeSync) getGitChartSource(fhr v1beta1.HelmRelease) (string,
}
return chartPath, chartRevision, false
}
chs.setCondition(fhr, fluxv1beta1.HelmReleaseChartFetched, v1.ConditionTrue, ReasonCloned, "successfully cloned git repo")
chartPath = filepath.Join(chartClone.export.Dir(), chartSource.Path)
chartRevision = chartClone.head

Expand Down Expand Up @@ -564,7 +565,6 @@ func (chs *ChartChangeSync) getRepoChartSource(fhr v1beta1.HelmRelease) (string,
return chartPath, chartRevision, false
}

chs.setCondition(fhr, fluxv1beta1.HelmReleaseChartFetched, v1.ConditionTrue, ReasonDownloaded, "chart fetched: "+filepath.Base(path))
chartPath = path
chartRevision = chartSource.Version

Expand Down