Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events can't be created different namespaces #140

Open
kvaps opened this issue Aug 1, 2024 · 6 comments · May be fixed by #142
Open

Events can't be created different namespaces #140

kvaps opened this issue Aug 1, 2024 · 6 comments · May be fixed by #142
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@kvaps
Copy link
Member

kvaps commented Aug 1, 2024

Bug Report

What happened:

E0801 12:21:30.393983       1 event.go:276] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"test4.17e79a2838dae5ad", GenerateName:"", Namespace:"sample-ns", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"BucketAccess", Namespace:"sample-ns", Name:"test4", UID:"3af47897-7972-47cd-a492-499590a780cc", APIVersion:"objectstorage.k8s.io/v1alpha1", ResourceVersion:"11430237", FieldPath:""}, Reason:"FailedGrantAccess", Message:"failed to grant bucket access: rpc error: code = Internal desc = failed to read S3 configuration", Source:v1.EventSource{Component:"cosi", Host:""}, FirstTimestamp:time.Date(2024, time.August, 1, 12, 21, 20, 35743149, time.Local), LastTimestamp:time.Date(2024, time.August, 1, 12, 21, 20, 35743149, time.Local), Count:1, Type:"Warning", EventTime:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"cosi", ReportingInstance:""}': 'can't create an event with namespace 'sample-ns' in namespace 'tenant-root''(may retry after sleeping)

What you expected to happen:

event created

How to reproduce this bug (as minimally and precisely as possible):

run controller and objects in diferent namespaces

Anything else relevant for this bug report?:

Environment:

  • Kubernetes version (use kubectl version), please list client and server:
  • Sidecar version (provide the release tag or commit hash):
  • Provisoner name and version (provide the release tag or commit hash):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:
@kvaps kvaps changed the title [DATE] - Title Events can't be created different namespaces Aug 1, 2024
@kvaps
Copy link
Member Author

kvaps commented Aug 1, 2024

Shouldn't it use EventBroadcaster instead?

@kvaps kvaps linked a pull request Aug 1, 2024 that will close this issue
@BlaineEXE
Copy link
Contributor

@shanduur do you have insights into this?

@shanduur
Copy link
Member

shanduur commented Aug 1, 2024

Shouldn't it use EventBroadcaster instead?

Broadcaster is/should be created correctly, see https://github.com/kubernetes-sigs/container-object-storage-interface-api/blob/master/controller/controller.go#L153-L162.

Are you sure that's not a RBAC issue? You should have the following in your ClusterRole: https://github.com/s3gw-tech/s3gw-charts/blob/main/charts/s3gw/templates/cosi-rbac.yaml#L36-L44

@kvaps
Copy link
Member Author

kvaps commented Aug 1, 2024

I have it, but still seeing same errors, btw the patch verb is missing but required in RBAC

@shanduur
Copy link
Member

shanduur commented Aug 1, 2024

I see your change, thanks! I don't remember if I actually missed that, or completely didn't know about this option when writing the feature.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants