Update the chart if ReconcileStrategy changes
If the ReconcileStrategy is changed (from ChartVersion to Revision for example), we should update the HelmChart. Signed-off-by: Dylan Arbour <arbourd@users.noreply.github.com>
This commit is contained in:
parent
54db7fd1cc
commit
b724dcafbb
|
|
@ -200,6 +200,8 @@ func helmChartRequiresUpdate(hr *v2.HelmRelease, chart *sourcev1.HelmChart) bool
|
|||
return true
|
||||
case template.GetInterval(hr.Spec.Interval) != chart.Spec.Interval:
|
||||
return true
|
||||
case template.Spec.ReconcileStrategy != chart.Spec.ReconcileStrategy:
|
||||
return true
|
||||
case !reflect.DeepEqual(template.Spec.ValuesFiles, chart.Spec.ValuesFiles):
|
||||
return true
|
||||
case template.Spec.ValuesFile != chart.Spec.ValuesFile:
|
||||
|
|
|
|||
|
|
@ -420,6 +420,13 @@ func Test_helmChartRequiresUpdate(t *testing.T) {
|
|||
},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "detects reconcile strategy change",
|
||||
modify: func(hr *v2.HelmRelease, hc *sourcev1.HelmChart) {
|
||||
hr.Spec.Chart.Spec.ReconcileStrategy = "Revision"
|
||||
},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "detects values files change",
|
||||
modify: func(hr *v2.HelmRelease, hc *sourcev1.HelmChart) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue