pbacsko commented on code in PR #807:
URL: https://github.com/apache/yunikorn-k8shim/pull/807#discussion_r1541180121
##########
pkg/cache/metadata.go:
##########
@@ -77,6 +78,20 @@ func getAppMetadata(pod *v1.Pod) (ApplicationMetadata, bool)
{
tags[constants.AppTagNamespace] = pod.Namespace
}
+ // Make sure we set the force create flag to true if the pod has been
scheduled already.
+ // When we create and link the metadata to an application the
application does not exist yet.
+ // The force flag prevents rejections during initialisation of already
allocated pods in a changed
+ // queue configuration.
+ // It will also pick up static (mirror) and DaemonSet pods. In certain
circumstances this could cause
+ // pods to be allowed into the recovery queue while they should not. If
this becomes an issue we can
+ // add a filter here.
+ // NOTE: this could fail to set the flag if the oldest pod for the
application is not scheduled and
+ // later pods are.
+ tags[common.AppTagCreateForce] = "false"
Review Comment:
nit: `common.True`
--
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]