Skip to content

Commit 72ae7db

Browse files
authored
Merge pull request #1253 from fluxcd/update-bucketv1
Update Bucket API to v1
2 parents 1d1a06b + 3d87349 commit 72ae7db

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/spec/v1/kustomizations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Artifact containing the YAML manifests. It has two required fields:
116116
- `kind`: The Kind of the referred Source object. Supported Source types:
117117
+ [GitRepository](https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1/gitrepositories.md)
118118
+ [OCIRepository](https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1beta2/ocirepositories.md)
119-
+ [Bucket](https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1beta2/buckets.md)
119+
+ [Bucket](https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1/buckets.md)
120120
- `name`: The Name of the referred Source object.
121121

122122
#### Cross-namespace references

internal/controller/kustomization_controller.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (r *KustomizationReconciler) SetupWithManager(ctx context.Context, mgr ctrl
132132

133133
// Index the Kustomizations by the Bucket references they (may) point at.
134134
if err := mgr.GetCache().IndexField(ctx, &kustomizev1.Kustomization{}, bucketIndexKey,
135-
r.indexBy(sourcev1b2.BucketKind)); err != nil {
135+
r.indexBy(sourcev1.BucketKind)); err != nil {
136136
return fmt.Errorf("failed setting index fields: %w", err)
137137
}
138138

@@ -155,7 +155,7 @@ func (r *KustomizationReconciler) SetupWithManager(ctx context.Context, mgr ctrl
155155
builder.WithPredicates(SourceRevisionChangePredicate{}),
156156
).
157157
Watches(
158-
&sourcev1b2.Bucket{},
158+
&sourcev1.Bucket{},
159159
handler.EnqueueRequestsFromMapFunc(r.requestsForRevisionChangeOf(bucketIndexKey)),
160160
builder.WithPredicates(SourceRevisionChangePredicate{}),
161161
).
@@ -561,8 +561,8 @@ func (r *KustomizationReconciler) getSource(ctx context.Context,
561561
return src, fmt.Errorf("unable to get source '%s': %w", namespacedName, err)
562562
}
563563
src = &repository
564-
case sourcev1b2.BucketKind:
565-
var bucket sourcev1b2.Bucket
564+
case sourcev1.BucketKind:
565+
var bucket sourcev1.Bucket
566566
err := r.Client.Get(ctx, namespacedName, &bucket)
567567
if err != nil {
568568
if apierrors.IsNotFound(err) {

0 commit comments

Comments
 (0)