wilfred-s commented on code in PR #628:
URL: https://github.com/apache/yunikorn-k8shim/pull/628#discussion_r1266375538
##########
pkg/appmgmt/general/podevent_handler.go:
##########
@@ -127,6 +128,13 @@ func (p *PodEventHandler) addPod(pod *v1.Pod, eventSource
EventSource) interface
Metadata: appMeta,
})
} else {
+ if
conf.GetSchedulerConf().GetAllowSimilarAppIdsByDifferentUsers() &&
app.GetApplicationState() == "Running" && app.GetUser() != appMeta.User {
+
log.Log(log.ShimAppMgmtGeneral).Warn("application has been submitted by
different user",
+ zap.String("app id ",
appMeta.ApplicationID),
+ zap.String("app user", app.GetUser()),
+ zap.String("submitted by",
appMeta.User))
+ return nil
Review Comment:
We should write out an event on the pod using the
`events.GetRecorder().Eventf(...)`
We do that in other places in our code that makes it traceable from the K8s
API on the pod.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]