generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 271
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.service/s3Indicates issues or PRs that are related to s3-controller.Indicates issues or PRs that are related to s3-controller.
Description
Describe the bug
When attempting to adopt an S3 Bucket resource if the bucket name is not found no error is reported in the Status of the Bucket.
Steps to reproduce
- Create a new Bucket resource with adoption policy
adoptand adoption field using a non-existent bucket name.
apiVersion: s3.services.k8s.aws/v1alpha1
kind: Bucket
metadata:
annotations:
services.k8s.aws/adoption-policy: "adopt"
services.k8s.aws/adoption-fields: |
{
"name": "name-not-matching-a-bucket"
}
services.k8s.aws/deletion-policy: retain
name: my-sample-bucket- Describe the Bucket resource and see that no status has been applied.
apiVersion: s3.services.k8s.aws/v1alpha1
kind: Bucket
metadata:
annotations:
services.k8s.aws/adoption-fields: |
{
"name": "name-not-matching-a-bucket"
}
services.k8s.aws/adoption-policy: adopt
services.k8s.aws/deletion-policy: retain
creationTimestamp: "2025-11-04T22:12:33Z"
generation: 1
name: my-sample-bucket
namespace: default
resourceVersion: "297959"
uid: 5937c40b-6d7d-4465-9663-89ed48516b8aIn the controller logs we can also see that a ReconcileError is being reported, but not surfaced in the resource's Status.
{"level":"error","ts":"2025-11-04T14:15:22.042-0800","msg":"Reconciler error","controller":"bucket","controllerGroup":"s3.services.k8s.aws","controllerKind":"Bucket","Bucket":{"name":"my-sample-bucket","namespace":"default"},"namespace":"default","name":"my-sample-bucket","reconcileID":"5210391e-d139-488c-9b0f-65854bbac193","error":"adopted resource not found","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:347\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:294\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:255"}
Expected outcome
The error is surfaced through a Status condition to inform the user that the Bucket with the specified name cannot be found.
Environment
- Kubernetes version: 1.32
- Using EKS: No
- AWS service targeted: S3
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.service/s3Indicates issues or PRs that are related to s3-controller.Indicates issues or PRs that are related to s3-controller.