Skip to content

Commit eb1ff72

Browse files
authored
Merge pull request #1887 from fluxcd/external-artifact-conform-runtime
api: Make ExternalArtifact conform to runtime Getter/Setter interface
2 parents 5f4f360 + 8d7ef1d commit eb1ff72

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

api/v1/externalartifact_types.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ type ExternalArtifactStatus struct {
4646
Conditions []metav1.Condition `json:"conditions,omitempty"`
4747
}
4848

49-
// GetRequeueAfter returns the duration after which the ExternalArtifact
50-
// must be reconciled again.
51-
func (in ExternalArtifact) GetRequeueAfter() time.Duration {
52-
return time.Minute
49+
// GetConditions returns the status conditions of the object.
50+
func (in *ExternalArtifact) GetConditions() []metav1.Condition {
51+
return in.Status.Conditions
52+
}
53+
54+
// SetConditions sets the status conditions on the object.
55+
func (in *ExternalArtifact) SetConditions(conditions []metav1.Condition) {
56+
in.Status.Conditions = conditions
5357
}
5458

5559
// GetArtifact returns the latest Artifact from the ExternalArtifact if
@@ -58,6 +62,12 @@ func (in *ExternalArtifact) GetArtifact() *meta.Artifact {
5862
return in.Status.Artifact
5963
}
6064

65+
// GetRequeueAfter returns the duration after which the ExternalArtifact
66+
// must be reconciled again.
67+
func (in *ExternalArtifact) GetRequeueAfter() time.Duration {
68+
return time.Minute
69+
}
70+
6171
// +kubebuilder:object:root=true
6272
// +kubebuilder:subresource:status
6373
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""

0 commit comments

Comments
 (0)