Skip to content

Commit

Permalink
Update helm release controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Laine committed Oct 27, 2021
1 parent 674ab23 commit e265e9d
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 331 deletions.
13 changes: 2 additions & 11 deletions api/v2beta1/helmrelease_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type HelmReleaseSpec struct {
// references to HelmRelease resources that must be ready before this HelmRelease
// can be reconciled.
// +optional
DependsOn []meta.NamespacedObjectKindReference `json:"dependsOn,omitempty"`
DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty"`

// Timeout is the time to wait for any individual Kubernetes operation (like Jobs
// for hooks) during the performance of a Helm action. Defaults to '5m0s'.
Expand Down Expand Up @@ -245,15 +245,6 @@ 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
Expand Down Expand Up @@ -930,7 +921,7 @@ func (in HelmRelease) GetMaxHistory() int {

// GetDependsOn returns the types.NamespacedName of the HelmRelease, and a
// dependency.CrossNamespaceDependencyReference slice it depends on.
func (in HelmRelease) GetDependsOn() (types.NamespacedName, []meta.NamespacedObjectKindReference) {
func (in HelmRelease) GetDependsOn() (types.NamespacedName, []meta.NamespacedObjectReference) {
return types.NamespacedName{
Namespace: in.Namespace,
Name: in.Namespace,
Expand Down
2 changes: 1 addition & 1 deletion api/v2beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 5 additions & 12 deletions config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ 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:
Expand Down Expand Up @@ -111,13 +104,13 @@ spec:
dependsOn:
description: DependsOn may contain a dependency.CrossNamespaceDependencyReference slice with references to HelmRelease resources that must be ready before this HelmRelease can be reconciled.
items:
description: CrossNamespaceDependencyReference holds the reference to a dependency.
description: NamespacedObjectReference contains enough information to locate the referenced Kubernetes resource object in any namespace.
properties:
name:
description: Name holds the name reference of a dependency.
description: Name of the referent.
type: string
namespace:
description: Namespace holds the namespace reference of a dependency.
description: Namespace of the referent, when not specified it acts as LocalObjectReference.
type: string
required:
- name
Expand Down Expand Up @@ -181,7 +174,7 @@ spec:
description: SecretRef holds the name to a secret that contains a 'value' key with the kubeconfig file as the value. It must be in the same namespace as the HelmRelease. It is recommended that the kubeconfig is self-contained, and the secret is regularly updated if credentials such as a cloud-access-token expire. Cloud specific `cmd-path` auth helpers will not function without adding binaries and credentials to the Pod that is responsible for reconciling the HelmRelease.
properties:
name:
description: Name of the referent
description: Name of the referent.
type: string
required:
- name
Expand Down Expand Up @@ -523,7 +516,7 @@ spec:
description: LastAttemptedValuesChecksum is the SHA1 checksum of the values of the last reconciliation attempt.
type: string
lastHandledReconcileAt:
description: LastHandledReconcileAt holds the value of the most recent reconcile request value, so a change can be detected.
description: LastHandledReconcileAt holds the value of the most recent reconcile request value, so a change of the annotation value can be detected.
type: string
lastReleaseRevision:
description: LastReleaseRevision is the revision of the last successful Helm release.
Expand Down
Loading

0 comments on commit e265e9d

Please sign in to comment.