Merge pull request #1887 from fluxcd/external-artifact-conform-runtime

api: Make ExternalArtifact conform to runtime Getter/Setter interface
This commit is contained in:
Stefan Prodan 2025-09-05 23:20:13 +03:00 committed by GitHub
commit eb1ff724ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 4 deletions

View File

@ -46,10 +46,14 @@ type ExternalArtifactStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
// GetRequeueAfter returns the duration after which the ExternalArtifact
// must be reconciled again.
func (in ExternalArtifact) GetRequeueAfter() time.Duration {
return time.Minute
// GetConditions returns the status conditions of the object.
func (in *ExternalArtifact) GetConditions() []metav1.Condition {
return in.Status.Conditions
}
// SetConditions sets the status conditions on the object.
func (in *ExternalArtifact) SetConditions(conditions []metav1.Condition) {
in.Status.Conditions = conditions
}
// GetArtifact returns the latest Artifact from the ExternalArtifact if
@ -58,6 +62,12 @@ func (in *ExternalArtifact) GetArtifact() *meta.Artifact {
return in.Status.Artifact
}
// GetRequeueAfter returns the duration after which the ExternalArtifact
// must be reconciled again.
func (in *ExternalArtifact) GetRequeueAfter() time.Duration {
return time.Minute
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""