Skip to content

Commit

Permalink
Remove deprecated .status.lastAppliedRevision from v1 API
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed May 4, 2024
1 parent 8dc3836 commit a087c78
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 38 deletions.
16 changes: 2 additions & 14 deletions api/v2/helmrelease_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -991,12 +991,6 @@ type HelmReleaseStatus struct {
// +optional
UpgradeFailures int64 `json:"upgradeFailures,omitempty"`

// LastAppliedRevision is the revision of the last successfully applied
// source.
// Deprecated: the revision can now be found in the History.
// +optional
LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`

// LastAttemptedRevision is the Source revision of the last reconciliation
// attempt. For OCIRepository sources, the 12 first characters of the digest are
// appended to the chart version e.g. "1.2.3+1234567890ab".
Expand Down Expand Up @@ -1247,18 +1241,12 @@ func (in *HelmRelease) SetConditions(conditions []metav1.Condition) {
in.Status.Conditions = conditions
}

// GetStatusConditions returns a pointer to the Status.Conditions slice.
// Deprecated: use GetConditions instead.
func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition {
return &in.Status.Conditions
}

// IsChartRefPresent returns true if the HelmRelease has a ChartRef.
// HasChartRef returns true if the HelmRelease has a ChartRef.
func (in *HelmRelease) HasChartRef() bool {
return in.Spec.ChartRef != nil
}

// IsChartTemplatePresent returns true if the HelmRelease has a ChartTemplate.
// HasChartTemplate returns true if the HelmRelease has a ChartTemplate.
func (in *HelmRelease) HasChartTemplate() bool {
return in.Spec.Chart.Spec.Chart != ""
}
Expand Down
6 changes: 0 additions & 6 deletions config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1198,12 +1198,6 @@ spec:
state. It is reset after a successful reconciliation.
format: int64
type: integer
lastAppliedRevision:
description: |-
LastAppliedRevision is the revision of the last successfully applied
source.
Deprecated: the revision can now be found in the History.
type: string
lastAttemptedConfigDigest:
description: |-
LastAttemptedConfigDigest is the digest for the config (better known as
Expand Down
14 changes: 0 additions & 14 deletions docs/api/v2/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -1556,20 +1556,6 @@ state. It is reset after a successful reconciliation.</p>
</tr>
<tr>
<td>
<code>lastAppliedRevision</code><br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>LastAppliedRevision is the revision of the last successfully applied
source.
Deprecated: the revision can now be found in the History.</p>
</td>
</tr>
<tr>
<td>
<code>lastAttemptedRevision</code><br>
<em>
string
Expand Down
4 changes: 0 additions & 4 deletions internal/reconcile/atomic_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,6 @@ func (r *AtomicRelease) actionForState(ctx context.Context, req *Request, state
}
req.Object.Status.History.Truncate(ignoreFailures)

// TODO(hidde): this allows existing UIs to continue to display this
// field, but should be removed in a future release.
req.Object.Status.LastAppliedRevision = req.Object.Status.History.Latest().ChartVersion

if forceRequested {
log.Info(msgWithReason("forcing upgrade for in-sync release", "force requested through annotation"))
return NewUpgrade(r.configFactory, r.eventRecorder), nil
Expand Down

0 comments on commit a087c78

Please sign in to comment.