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

tidb-scheduler should have events.k8s.io permission #1356

Closed
cofyc opened this issue Dec 18, 2019 · 3 comments
Closed

tidb-scheduler should have events.k8s.io permission #1356

cofyc opened this issue Dec 18, 2019 · 3 comments

Comments

@cofyc
Copy link
Contributor

cofyc commented Dec 18, 2019

Bug Report

What version of Kubernetes are you using?

1.6.0

What version of TiDB Operator are you using?

1.0.5

What did you expect to see?

What did you see instead?

tidb-scheduelr/kube-scheduler has the following error:

E1217 11:04:17.146944       1 event_broadcaster.go:235] Server rejected event '&v1beta1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"tidb-cluster-prod-pd-1.15e123c12cf0373c", GenerateName:"", Namespace:"tidb-cluster-prod", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, EventTime:v1.MicroTime{Time:time.Time{wall:0xbf764b6c48b35899, ext:6478642925306, loc:(*time.Location)(0x2eeb620)}}, Series:(*v1beta1.EventSeries)(nil), ReportingController:"tidb-scheduler", ReportingInstance:"tidb-scheduler-tidb-scheduler-7644b5cb87-rn4fz", Action:"Scheduling", Reason:"FailedScheduling", Regarding:v1.ObjectReference{Kind:"Pod", Namespace:"tidb-cluster-prod", Name:"tidb-cluster-prod-pd-1", UID:"070d83d1-a4a4-4735-8df4-cc7206abebc3", APIVersion:"v1", ResourceVersion:"4500741", FieldPath:""}, Related:(*v1.ObjectReference)(nil), Note:"Failed filter with extender at URL http://127.0.0.1:10262/scheduler/filter, code 500", Type:"Warning", DeprecatedSource:v1.EventSource{Component:"tidb-scheduler", Host:""}, DeprecatedFirstTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeprecatedLastTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeprecatedCount:0}': 'events.events.k8s.io is forbidden: User "system:serviceaccount:tidb-admin:tidb-scheduler" cannot create resource "events" in API group "events.k8s.io" in the namespace "tidb-cluster-prod"' (will not retry!)

This is because kube-scheduler use events v1beta API (if enabled) since v1.16.

xref: kubernetes/kubernetes#78447, kubernetes/kubernetes#83692

@cofyc
Copy link
Contributor Author

cofyc commented Dec 23, 2019

closed via #1355
tidb-scheduler/kube-scheduler will use the same clusterroles as kube-system/kube-scheduler does.

@cofyc cofyc closed this as completed Dec 23, 2019
@cofyc cofyc reopened this Dec 23, 2019
@cofyc
Copy link
Contributor Author

cofyc commented Dec 23, 2019

#1355 needs to be cherry-picked into release-1.0.

@cofyc
Copy link
Contributor Author

cofyc commented Dec 30, 2019

closed via #1423.

@cofyc cofyc closed this as completed Dec 30, 2019
yahonda pushed a commit that referenced this issue Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant