You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2021/07/26 16:28:31 UTC
[GitHub] [incubator-yunikorn-k8shim] yangwwei commented on a change in pull request #286: [YUNIKORN-757] Discover daemonset pods and tag with ignoreUnschedulableNodes attributes
yangwwei commented on a change in pull request #286:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/286#discussion_r676760802
##########
File path: pkg/common/si_helper.go
##########
@@ -30,10 +30,18 @@ import (
func createTagsForTask(pod *v1.Pod) map[string]string {
metaPrefix := common.DomainK8s + common.GroupMeta
tags := map[string]string{
- metaPrefix + common.KeyNamespace: pod.Namespace,
- metaPrefix + common.KeyPodName: pod.Name,
+ metaPrefix + common.KeyNamespace: pod.Namespace,
+ metaPrefix + common.KeyPodName: pod.Name,
+ common.DomainYuniKorn + common.KeyIgnoreUnschedulable: "false",
+ }
+ owners := pod.GetOwnerReferences()
+ if len(owners) > 0 {
+ for _, value := range owners {
+ if value.Kind == "DaemonSet" {
Review comment:
Pls move string "DaemonSet" to `common/constants/constants.go`
##########
File path: pkg/common/si_helper.go
##########
@@ -30,10 +30,18 @@ import (
func createTagsForTask(pod *v1.Pod) map[string]string {
Review comment:
Can we add a UT for this function? To cover the case where the pod has or has not owner references, or different owner references
--
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: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org