PaddleFlow / paddle-operator

Elastic Deep Learning Training based on Kubernetes by Leveraging EDL and Volcano
Apache License 2.0
31 stars 15 forks source link

cannot create resource "events" #63

Closed kuizhiqing closed 3 years ago

kuizhiqing commented 3 years ago

If deploy controller in different ns from paddlejob, then controller may report error as follows,

E0728 06:06:57.755801 1 event.go:264] Server rejected event '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"wide-ande-deep-4.1695df59ee88b737", GenerateName:"", Namespace:"default", 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)}, InvolvedObject:v1.ObjectReference{Kind:"PaddleJob", Namespace:"default", Name:"wide-ande-deep-4", UID:"5591db87-b7e6-43c3-85a7-cd55ed3c7d53", APIVersion:"batch.paddlepaddle.org/v1", ResourceVersion:"40492057", FieldPath:""}, Reason:"Created", Message:"created wide-ande-deep-4", Source:v1.EventSource{Component:"paddlejob-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc0385ae06a65ed37, ext:1276552532527, loc:(*time.Location)(0x22e1d60)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc0385ae06a65ed37, ext:1276552532527, loc:(*time.Location)(0x22e1d60)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'events is forbidden: User "system:serviceaccount:paddle-system:default" cannot create resource "events" in API group "" in the namespace "default"' (will not retry!)