Skip to content

Commit 1763d68

Browse files
committed
Implement meta.ObjectWithConditions interfaces
Follow up on #421 to fully implement new tooling requirements. By implementing the interfaces, the `conditions` package can now be used. Signed-off-by: Hidde Beydals <hello@hidde.co>
1 parent 04f599c commit 1763d68

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

api/v2beta1/helmrelease_types.go

+18-1
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,12 @@ type HelmRelease struct {
923923
Status HelmReleaseStatus `json:"status,omitempty"`
924924
}
925925

926+
// GetRequeueAfter returns the duration after which the HelmRelease
927+
// must be reconciled again.
928+
func (in HelmRelease) GetRequeueAfter() time.Duration {
929+
return in.Spec.Interval.Duration
930+
}
931+
926932
// GetValues unmarshals the raw values to a map[string]interface{} and returns
927933
// the result.
928934
func (in HelmRelease) GetValues() map[string]interface{} {
@@ -989,7 +995,18 @@ func (in HelmRelease) GetDependsOn() []meta.NamespacedObjectReference {
989995
return in.Spec.DependsOn
990996
}
991997

992-
// GetStatusConditions returns a pointer to the Status.Conditions slice
998+
// GetConditions returns the status conditions of the object.
999+
func (in HelmRelease) GetConditions() []metav1.Condition {
1000+
return in.Status.Conditions
1001+
}
1002+
1003+
// SetConditions sets the status conditions on the object.
1004+
func (in *HelmRelease) SetConditions(conditions []metav1.Condition) {
1005+
in.Status.Conditions = conditions
1006+
}
1007+
1008+
// GetStatusConditions returns a pointer to the Status.Conditions slice.
1009+
// Deprecated: use GetConditions instead.
9931010
func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition {
9941011
return &in.Status.Conditions
9951012
}

0 commit comments

Comments
 (0)