diff --git a/api/v2beta1/helmrelease_types.go b/api/v2beta1/helmrelease_types.go index 68fc26ac2..3dca93e34 100644 --- a/api/v2beta1/helmrelease_types.go +++ b/api/v2beta1/helmrelease_types.go @@ -246,6 +246,15 @@ type HelmChartTemplateSpec struct { // +optional Interval *metav1.Duration `json:"interval,omitempty"` + // Determines what enables the creation of a new artifact. Valid values are + // ('ChartVersion', 'Revision'). + // See the documentation of the values for an explanation on their behavior. + // Defaults to ChartVersion when omitted. + // +kubebuilder:validation:Enum=ChartVersion;Revision + // +kubebuilder:default:=ChartVersion + // +optional + ReconcileStrategy string `json:"reconcileStrategy,omitempty"` + // Alternative list of values files to use as the chart values (values.yaml // is not included by default), expected to be a relative path in the SourceRef. // Values files are merged in the order of this list with the last file overriding diff --git a/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml b/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml index c25dc2750..067a70d48 100644 --- a/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml +++ b/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml @@ -56,6 +56,13 @@ spec: interval: description: Interval at which to check the v1beta1.Source for updates. Defaults to 'HelmReleaseSpec.Interval'. type: string + reconcileStrategy: + default: ChartVersion + description: Determines what enables the creation of a new artifact. Valid values are ('ChartVersion', 'Revision'). See the documentation of the values for an explanation on their behavior. Defaults to ChartVersion when omitted. + enum: + - ChartVersion + - Revision + type: string sourceRef: description: The name and namespace of the v1beta1.Source the chart is available at. properties: diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index cf7e43483..f6fe7ccd6 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -2,8 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: helm-system resources: -- https://github.com/fluxcd/source-controller/releases/download/v0.15.4/source-controller.crds.yaml -- https://github.com/fluxcd/source-controller/releases/download/v0.15.4/source-controller.deployment.yaml +- https://github.com/fluxcd/source-controller/releases/download/v0.16.0/source-controller.crds.yaml +- https://github.com/fluxcd/source-controller/releases/download/v0.16.0/source-controller.deployment.yaml - ../crd - ../rbac - ../manager diff --git a/controllers/helmrelease_controller_chart.go b/controllers/helmrelease_controller_chart.go index acdf81ba7..a9b93343e 100644 --- a/controllers/helmrelease_controller_chart.go +++ b/controllers/helmrelease_controller_chart.go @@ -174,9 +174,10 @@ func buildHelmChartFromTemplate(hr *v2.HelmRelease) *sourcev1.HelmChart { Name: template.Spec.SourceRef.Name, Kind: template.Spec.SourceRef.Kind, }, - Interval: template.GetInterval(hr.Spec.Interval), - ValuesFiles: template.Spec.ValuesFiles, - ValuesFile: template.Spec.ValuesFile, + Interval: template.GetInterval(hr.Spec.Interval), + ReconcileStrategy: template.Spec.ReconcileStrategy, + ValuesFiles: template.Spec.ValuesFiles, + ValuesFile: template.Spec.ValuesFile, }, } } diff --git a/docs/api/helmrelease.md b/docs/api/helmrelease.md index d3e516549..121942186 100644 --- a/docs/api/helmrelease.md +++ b/docs/api/helmrelease.md @@ -518,6 +518,21 @@ Kubernetes meta/v1.Duration
reconcileStrategy
Determines what enables the creation of a new artifact. Valid values are +(‘ChartVersion’, ‘Revision’). +See the documentation of the values for an explanation on their behavior. +Defaults to ChartVersion when omitted.
+valuesFiles
reconcileStrategy
Determines what enables the creation of a new artifact. Valid values are +(‘ChartVersion’, ‘Revision’). +See the documentation of the values for an explanation on their behavior. +Defaults to ChartVersion when omitted.
+valuesFiles