Skip to content

Commit f4d9809

Browse files
committed
Minor comment updates
- Update the comments around artifact retention fields in Storage. - Update the comments around reconcileStorage regarding artifact retention and garbage collection. Signed-off-by: Sunny <darkowlzz@protonmail.com>
1 parent 665d43c commit f4d9809

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

controllers/bucket_controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,9 @@ func (r *BucketReconciler) notify(ctx context.Context, oldObj, newObj *sourcev1.
417417
// reconcileStorage ensures the current state of the storage matches the
418418
// desired and previously observed state.
419419
//
420-
// All Artifacts for the object except for the current one in the Status are
421-
// garbage collected from the Storage.
420+
// The garbage collection is executed based on the flag based settings and
421+
// may remove files that are beyond their TTL or the maximum number of files
422+
// to survive a collection cycle.
422423
// If the Artifact in the Status of the object disappeared from the Storage,
423424
// it is removed from the object.
424425
// If the object does not have an Artifact in its Status, a Reconciling

controllers/helmchart_controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,9 @@ func (r *HelmChartReconciler) notify(ctx context.Context, oldObj, newObj *source
332332
// reconcileStorage ensures the current state of the storage matches the
333333
// desired and previously observed state.
334334
//
335-
// All Artifacts for the object except for the current one in the Status are
336-
// garbage collected from the Storage.
335+
// The garbage collection is executed based on the flag based settings and
336+
// may remove files that are beyond their TTL or the maximum number of files
337+
// to survive a collection cycle.
337338
// If the Artifact in the Status of the object disappeared from the Storage,
338339
// it is removed from the object.
339340
// If the object does not have an Artifact in its Status, a Reconciling

controllers/helmrepository_controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,9 @@ func (r *HelmRepositoryReconciler) notify(ctx context.Context, oldObj, newObj *s
302302
// reconcileStorage ensures the current state of the storage matches the
303303
// desired and previously observed state.
304304
//
305-
// All Artifacts for the object except for the current one in the Status are
306-
// garbage collected from the Storage.
305+
// The garbage collection is executed based on the flag based settings and
306+
// may remove files that are beyond their TTL or the maximum number of files
307+
// to survive a collection cycle.
307308
// If the Artifact in the Status of the object disappeared from the Storage,
308309
// it is removed from the object.
309310
// If the object does not have an Artifact in its Status, a Reconciling

controllers/storage.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ type Storage struct {
5454
// Hostname is the file server host name used to compose the artifacts URIs.
5555
Hostname string `json:"hostname"`
5656

57-
// ArtifactRetentionTTL is the maximum number of artifacts to be kept in storage
58-
// after a garbage collection.
57+
// ArtifactRetentionTTL is the duration of time that artifacts will be kept
58+
// in storage before being garbage collected.
5959
ArtifactRetentionTTL time.Duration `json:"artifactRetentionTTL"`
6060

61-
// ArtifactRetentionRecords is the duration of time that artifacts will be kept in
62-
// storage before being garbage collected.
61+
// ArtifactRetentionRecords is the maximum number of artifacts to be kept in
62+
// storage after a garbage collection.
6363
ArtifactRetentionRecords int `json:"artifactRetentionRecords"`
6464
}
6565

0 commit comments

Comments
 (0)