chenyulin0719 commented on code in PR #843:
URL: https://github.com/apache/yunikorn-k8shim/pull/843#discussion_r1605985721
##########
pkg/admission/util.go:
##########
@@ -37,26 +37,40 @@ func updatePodLabel(pod *v1.Pod, namespace string,
generateUniqueAppIds bool, de
}
sparkAppID := utils.GetPodLabelValue(pod, constants.SparkLabelAppID)
+ canonicalAppID := utils.GetPodLabelValue(pod,
constants.CanonicalLabelApplicationID)
appID := utils.GetPodLabelValue(pod, constants.LabelApplicationID)
- if sparkAppID == "" && appID == "" {
+ if canonicalAppID == "" && sparkAppID == "" && appID == "" {
// if app id not exist, generate one
// for each namespace, we group unnamed pods to one single app
- if GenerateUniqueAppId is not set
// if GenerateUniqueAppId:
// application ID convention:
${NAMESPACE}-${POD_UID}
// else
// application ID convention:
${AUTO_GEN_PREFIX}-${NAMESPACE}-${AUTO_GEN_SUFFIX}
generatedID := utils.GenerateApplicationID(namespace,
generateUniqueAppIds, string(pod.UID))
+
+ result[constants.CanonicalLabelApplicationID] = generatedID
Review Comment:
Base on your feedback. I think there have a bug in current Admission
Controller and I believe it should be fixed in another PR.
-[ [YUNIKORN-2636] Admission Controller ignores existing Queue/ApplicationID
annotations ](https://issues.apache.org/jira/browse/YUNIKORN-2636)
--
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]