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

Commit

Permalink
Move successful chart fetch signal to reconcile (#2316)
Browse files Browse the repository at this point in the history
Move successful chart fetch signal to reconcile
  • Loading branch information
hiddeco authored Aug 1, 2019
2 parents 4b5c78b + 9025aa7 commit fc08156
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit fc08156

Please sign in to comment.