Skip to content

Commit

Permalink
[YUNIKORN-2711] Shim: Skip setting the queue name to default queue (#874
Browse files Browse the repository at this point in the history
)

Closes: #874

Signed-off-by: Craig Condit <[email protected]>
  • Loading branch information
mitdesai authored and craigcondit committed Jul 11, 2024
1 parent 8105123 commit 085edca
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 126 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module github.com/apache/yunikorn-k8shim
go 1.21

require (
github.com/apache/yunikorn-core v0.0.0-20240705110923-108ed0d25768
github.com/apache/yunikorn-core v0.0.0-20240711165824-d96cd583305b
github.com/apache/yunikorn-scheduler-interface v0.0.0-20240425182941-07f5695119a1
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
github.com/apache/yunikorn-core v0.0.0-20240705110923-108ed0d25768 h1:RYjrRqr8rumlEAbYRh5Z88FsJe+8LQ4c1mzjNJoSk70=
github.com/apache/yunikorn-core v0.0.0-20240705110923-108ed0d25768/go.mod h1:pSi7AFBRiGCGQ7RwQffpD4m6dvA5lc1HuCrg7LpJJqs=
github.com/apache/yunikorn-core v0.0.0-20240711165824-d96cd583305b h1:GDizY3dcE+hkfik/+NY3Zdw71A/V4dWGp9Pl6k5Ii2M=
github.com/apache/yunikorn-core v0.0.0-20240711165824-d96cd583305b/go.mod h1:pSi7AFBRiGCGQ7RwQffpD4m6dvA5lc1HuCrg7LpJJqs=
github.com/apache/yunikorn-scheduler-interface v0.0.0-20240425182941-07f5695119a1 h1:v4J9L3MlW8BQfYnbq6FV2l3uyay3SqMS2Ffpo+SFat4=
github.com/apache/yunikorn-scheduler-interface v0.0.0-20240425182941-07f5695119a1/go.mod h1:WuHJpVk34t8N5+1ErYGj/5Qq33/cRzL4YtuoAsbMtWc=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
Expand Down
2 changes: 1 addition & 1 deletion pkg/admission/admission_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func (c *AdmissionController) updateLabels(namespace string, pod *v1.Pod, patch
zap.String("namespace", namespace),
zap.Any("labels", pod.Labels))

result := updatePodLabel(pod, namespace, c.conf.GetGenerateUniqueAppIds(), c.conf.GetDefaultQueueName())
result := updatePodLabel(pod, namespace, c.conf.GetGenerateUniqueAppIds())

patch = append(patch, common.PatchOperation{
Op: "add",
Expand Down
22 changes: 6 additions & 16 deletions pkg/admission/admission_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ func TestUpdateLabels(t *testing.T) {
assert.Equal(t, patch[0].Op, "add")
assert.Equal(t, patch[0].Path, "/metadata/labels")
if updatedMap, ok := patch[0].Value.(map[string]string); ok {
assert.Equal(t, len(updatedMap), 5)
assert.Equal(t, len(updatedMap), 3)
assert.Equal(t, updatedMap["random"], "random")
assert.Equal(t, updatedMap[constants.CanonicalLabelQueueName], "root.default")
assert.Equal(t, updatedMap[constants.LabelQueueName], "root.default")
assert.Equal(t, strings.HasPrefix(updatedMap[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(updatedMap[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
} else {
Expand Down Expand Up @@ -119,10 +117,8 @@ func TestUpdateLabels(t *testing.T) {
assert.Equal(t, patch[0].Op, "add")
assert.Equal(t, patch[0].Path, "/metadata/labels")
if updatedMap, ok := patch[0].Value.(map[string]string); ok {
assert.Equal(t, len(updatedMap), 5)
assert.Equal(t, len(updatedMap), 3)
assert.Equal(t, updatedMap["random"], "random")
assert.Equal(t, updatedMap[constants.CanonicalLabelQueueName], "root.default")
assert.Equal(t, updatedMap[constants.LabelQueueName], "root.default")
assert.Equal(t, updatedMap[constants.CanonicalLabelApplicationID], "app-0001")
assert.Equal(t, updatedMap[constants.LabelApplicationID], "app-0001")
} else {
Expand Down Expand Up @@ -192,9 +188,7 @@ func TestUpdateLabels(t *testing.T) {
assert.Equal(t, patch[0].Op, "add")
assert.Equal(t, patch[0].Path, "/metadata/labels")
if updatedMap, ok := patch[0].Value.(map[string]string); ok {
assert.Equal(t, len(updatedMap), 4)
assert.Equal(t, updatedMap[constants.CanonicalLabelQueueName], "root.default")
assert.Equal(t, updatedMap[constants.LabelQueueName], "root.default")
assert.Equal(t, len(updatedMap), 2)
assert.Equal(t, strings.HasPrefix(updatedMap[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(updatedMap[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
} else {
Expand Down Expand Up @@ -222,9 +216,7 @@ func TestUpdateLabels(t *testing.T) {
assert.Equal(t, patch[0].Op, "add")
assert.Equal(t, patch[0].Path, "/metadata/labels")
if updatedMap, ok := patch[0].Value.(map[string]string); ok {
assert.Equal(t, len(updatedMap), 4)
assert.Equal(t, updatedMap[constants.CanonicalLabelQueueName], "root.default")
assert.Equal(t, updatedMap[constants.LabelQueueName], "root.default")
assert.Equal(t, len(updatedMap), 2)
assert.Equal(t, strings.HasPrefix(updatedMap[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(updatedMap[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
} else {
Expand All @@ -250,9 +242,7 @@ func TestUpdateLabels(t *testing.T) {
assert.Equal(t, patch[0].Op, "add")
assert.Equal(t, patch[0].Path, "/metadata/labels")
if updatedMap, ok := patch[0].Value.(map[string]string); ok {
assert.Equal(t, len(updatedMap), 4)
assert.Equal(t, updatedMap[constants.CanonicalLabelQueueName], "root.default")
assert.Equal(t, updatedMap[constants.LabelQueueName], "root.default")
assert.Equal(t, len(updatedMap), 2)
assert.Equal(t, strings.HasPrefix(updatedMap[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(updatedMap[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
} else {
Expand Down Expand Up @@ -462,7 +452,7 @@ func TestMutate(t *testing.T) {
assert.Check(t, resp.Allowed, "response not allowed for pod")
assert.Equal(t, schedulerName(t, resp.Patch), "yunikorn", "yunikorn not set as scheduler for pod")
assert.Equal(t, labels(t, resp.Patch)[constants.LabelApplicationID], "yunikorn-default-autogen", "wrong applicationId label")
assert.Equal(t, labels(t, resp.Patch)[constants.LabelQueueName], "root.default", "incorrect queue name")
assert.Equal(t, labels(t, resp.Patch)[constants.LabelQueueName], nil, "incorrect queue name")

// pod without applicationID
pod = v1.Pod{ObjectMeta: metav1.ObjectMeta{
Expand Down
17 changes: 0 additions & 17 deletions pkg/admission/conf/am_conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const (
AMFilteringLabelNamespaces = FilteringPrefix + "labelNamespaces"
AMFilteringNoLabelNamespaces = FilteringPrefix + "noLabelNamespaces"
AMFilteringGenerateUniqueAppIds = FilteringPrefix + "generateUniqueAppId"
AMFilteringDefaultQueueName = FilteringPrefix + "defaultQueue"

// access control configuration
AMAccessControlBypassAuth = AccessControlPrefix + "bypassAuth"
Expand All @@ -73,7 +72,6 @@ const (
DefaultFilteringLabelNamespaces = ""
DefaultFilteringNoLabelNamespaces = ""
DefaultFilteringGenerateUniqueAppIds = false
DefaultFilteringQueueName = constants.ApplicationDefaultQueue

// access control defaults
DefaultAccessControlBypassAuth = false
Expand Down Expand Up @@ -102,7 +100,6 @@ type AdmissionControllerConf struct {
systemUsers []*regexp.Regexp
externalUsers []*regexp.Regexp
externalGroups []*regexp.Regexp
defaultQueueName string
configMaps []*v1.ConfigMap

lock locking.RWMutex
Expand Down Expand Up @@ -222,12 +219,6 @@ func (acc *AdmissionControllerConf) GetExternalGroups() []*regexp.Regexp {
return acc.externalGroups
}

func (acc *AdmissionControllerConf) GetDefaultQueueName() string {
acc.lock.RLock()
defer acc.lock.RUnlock()
return acc.defaultQueueName
}

type configMapUpdateHandler struct {
conf *AdmissionControllerConf
}
Expand Down Expand Up @@ -331,14 +322,6 @@ func (acc *AdmissionControllerConf) updateConfigMaps(configMaps []*v1.ConfigMap,
acc.externalUsers = parseConfigRegexps(configs, AMAccessControlExternalUsers, DefaultAccessControlExternalUsers)
acc.externalGroups = parseConfigRegexps(configs, AMAccessControlExternalGroups, DefaultAccessControlExternalGroups)

// labeling
acc.defaultQueueName = parseConfigString(configs, AMFilteringDefaultQueueName, DefaultFilteringQueueName)
if acc.defaultQueueName != "" && !strings.HasPrefix(acc.defaultQueueName, constants.RootQueue) {
log.Log(log.AdmissionConf).Warn("invalid default queue. defaultQueue must be fully qualified. Resetting to "+DefaultFilteringQueueName,
zap.String(AMFilteringDefaultQueueName, acc.defaultQueueName))
acc.defaultQueueName = DefaultFilteringQueueName
}

// logging
log.UpdateLoggingConfig(configs)

Expand Down
9 changes: 0 additions & 9 deletions pkg/admission/conf/am_conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func TestConfigMapVars(t *testing.T) {
AMAccessControlExternalUsers: "^yunikorn$",
AMAccessControlExternalGroups: "^devs$",
AMAccessControlTrustControllers: "false",
AMFilteringDefaultQueueName: "root.default.queue",
}}})
assert.Equal(t, conf.GetPolicyGroup(), "testPolicyGroup")
assert.Equal(t, conf.GetAmServiceName(), "testYunikornService")
Expand All @@ -58,7 +57,6 @@ func TestConfigMapVars(t *testing.T) {
assert.Equal(t, conf.GetExternalUsers()[0].String(), "^yunikorn$")
assert.Equal(t, conf.GetExternalGroups()[0].String(), "^devs$")
assert.Equal(t, conf.GetTrustControllers(), false)
assert.Equal(t, conf.GetDefaultQueueName(), "root.default.queue")

// test missing settings
conf = NewAdmissionControllerConf([]*v1.ConfigMap{nil, nil})
Expand All @@ -75,7 +73,6 @@ func TestConfigMapVars(t *testing.T) {
assert.Equal(t, 0, len(conf.GetExternalUsers()))
assert.Equal(t, 0, len(conf.GetExternalGroups()))
assert.Equal(t, conf.GetTrustControllers(), DefaultAccessControlTrustControllers)
assert.Equal(t, conf.GetDefaultQueueName(), DefaultFilteringQueueName)

// test faulty settings for boolean values
conf = NewAdmissionControllerConf([]*v1.ConfigMap{nil, {Data: map[string]string{
Expand All @@ -93,12 +90,6 @@ func TestConfigMapVars(t *testing.T) {
}}})
assert.Equal(t, len(conf.GetProcessNamespaces()), 0)

// test invalid defaultQueue name
conf = NewAdmissionControllerConf([]*v1.ConfigMap{nil, {Data: map[string]string{
AMFilteringDefaultQueueName: "default.queue",
}}})
assert.Equal(t, conf.GetDefaultQueueName(), DefaultFilteringQueueName)

// test disable / enable of config hot refresh
conf = NewAdmissionControllerConf([]*v1.ConfigMap{nil, nil})

Expand Down
16 changes: 2 additions & 14 deletions pkg/admission/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/apache/yunikorn-k8shim/pkg/log"
)

func updatePodLabel(pod *v1.Pod, namespace string, generateUniqueAppIds bool, defaultQueueName string) map[string]string {
func updatePodLabel(pod *v1.Pod, namespace string, generateUniqueAppIds bool) map[string]string {
result := make(map[string]string)
for k, v := range pod.Labels {
result[k] = v
Expand Down Expand Up @@ -57,19 +57,7 @@ func updatePodLabel(pod *v1.Pod, namespace string, generateUniqueAppIds bool, de
}

canonicalQueueName := utils.GetPodLabelValue(pod, constants.CanonicalLabelQueueName)
labelQueueName := utils.GetPodLabelValue(pod, constants.LabelQueueName)
annotationQueueName := utils.GetPodAnnotationValue(pod, constants.AnnotationQueueName)
if canonicalQueueName == "" && labelQueueName == "" && annotationQueueName == "" {
// if queueName not exist, generate one
// if defaultQueueName is "", skip adding default queue name to the pod labels
if defaultQueueName != "" {
// for undefined configuration, am_conf will add 'root.default' to retain existing behavior
// if a custom name is configured for default queue, it will be used instead of root.default
result[constants.CanonicalLabelQueueName] = defaultQueueName
// Deprecated: After 1.7.0, admission controller will only add canonical label if queue was not set
result[constants.LabelQueueName] = defaultQueueName
}
} else if canonicalQueueName != "" {
if canonicalQueueName != "" {
// Deprecated: Added in 1.6.0 for backward compatibility, in case the prior shim version can't handle canonical label
result[constants.LabelQueueName] = canonicalQueueName
}
Expand Down
74 changes: 11 additions & 63 deletions pkg/admission/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,23 @@ func createTestingPodNoNamespaceAndLabels() *v1.Pod {
func TestUpdatePodLabelForAdmissionController(t *testing.T) {
dummyAppId := "app-0001"
dummyQueueName := "root.abc"
defaultQueueName := "root.default"

// verify when appId/queue are not given,
// we generate new appId/queue labels
pod := createTestingPodWithMeta()
if result := updatePodLabel(pod, "default", false, defaultQueueName); result != nil {
assert.Equal(t, len(result), 5)
if result := updatePodLabel(pod, "default", false); result != nil {
assert.Equal(t, len(result), 3)
assert.Equal(t, result["random"], "random")
assert.Equal(t, strings.HasPrefix(result[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(result[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, result[constants.CanonicalLabelQueueName], defaultQueueName)
assert.Equal(t, result[constants.LabelQueueName], defaultQueueName)
} else {
t.Fatal("UpdatePodLabelForAdmissionController is not as expected")
}

// verify if appId/queue is given in the canonical labels
// we won't modify the value and will add it to non-canonical label for backward compatibility
pod = createTestingPodWithLabels(dummyAppId, dummyQueueName)
if result := updatePodLabel(pod, "default", false, defaultQueueName); result != nil {
if result := updatePodLabel(pod, "default", false); result != nil {
assert.Equal(t, len(result), 5)
assert.Equal(t, result["random"], "random")
assert.Equal(t, result[constants.CanonicalLabelApplicationID], dummyAppId)
Expand All @@ -138,7 +135,7 @@ func TestUpdatePodLabelForAdmissionController(t *testing.T) {
// verify if applicationId and queue is given in the annotations,
// we won't generate new labels
pod = createTestingPodWithAnnotations(dummyAppId, dummyQueueName)
if result := updatePodLabel(pod, "default", false, defaultQueueName); result != nil {
if result := updatePodLabel(pod, "default", false); result != nil {
t.Log(result)
assert.Equal(t, len(result), 1)
assert.Equal(t, result["random"], "random")
Expand All @@ -150,10 +147,8 @@ func TestUpdatePodLabelForAdmissionController(t *testing.T) {
// labels might be empty
pod = createTestingPodNoNamespaceAndLabels()

if result := updatePodLabel(pod, "default", false, defaultQueueName); result != nil {
assert.Equal(t, len(result), 4)
assert.Equal(t, result[constants.CanonicalLabelQueueName], defaultQueueName)
assert.Equal(t, result[constants.LabelQueueName], defaultQueueName)
if result := updatePodLabel(pod, "default", false); result != nil {
assert.Equal(t, len(result), 2)
assert.Equal(t, strings.HasPrefix(result[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(result[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
} else {
Expand All @@ -162,21 +157,17 @@ func TestUpdatePodLabelForAdmissionController(t *testing.T) {

// pod name might be empty, it can comes from generatedName
pod = createTestingPodWithGenerateName()
if result := updatePodLabel(pod, "default", false, defaultQueueName); result != nil {
assert.Equal(t, len(result), 4)
assert.Equal(t, result[constants.CanonicalLabelQueueName], defaultQueueName)
assert.Equal(t, result[constants.LabelQueueName], defaultQueueName)
if result := updatePodLabel(pod, "default", false); result != nil {
assert.Equal(t, len(result), 2)
assert.Equal(t, strings.HasPrefix(result[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(result[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
} else {
t.Fatal("UpdatePodLabelForAdmissionController is not as expected")
}

pod = createMinimalTestingPod()
if result := updatePodLabel(pod, "default", false, defaultQueueName); result != nil {
assert.Equal(t, len(result), 4)
assert.Equal(t, result[constants.CanonicalLabelQueueName], defaultQueueName)
assert.Equal(t, result[constants.LabelQueueName], defaultQueueName)
if result := updatePodLabel(pod, "default", false); result != nil {
assert.Equal(t, len(result), 2)
assert.Equal(t, strings.HasPrefix(result[constants.CanonicalLabelApplicationID], constants.AutoGenAppPrefix), true)
assert.Equal(t, strings.HasPrefix(result[constants.LabelApplicationID], constants.AutoGenAppPrefix), true)
} else {
Expand All @@ -187,21 +178,7 @@ func TestUpdatePodLabelForAdmissionController(t *testing.T) {
func TestDefaultQueueName(t *testing.T) {
defaultConf := createConfig()
pod := createTestingPodWithMeta()
if result := updatePodLabel(pod, defaultConf.GetNamespace(), defaultConf.GetGenerateUniqueAppIds(), defaultConf.GetDefaultQueueName()); result != nil {
assert.Equal(t, len(result), 5)
assert.Equal(t, result["random"], "random")
assert.Equal(t, result[constants.CanonicalLabelApplicationID], "yunikorn-default-autogen")
assert.Equal(t, result[constants.LabelApplicationID], "yunikorn-default-autogen")
assert.Equal(t, result[constants.CanonicalLabelQueueName], "root.default")
assert.Equal(t, result[constants.LabelQueueName], "root.default")
} else {
t.Fatal("UpdatePodLabelForAdmissionController is not as expected")
}

queueNameEmptyConf := createConfigWithOverrides(map[string]string{
conf.AMFilteringDefaultQueueName: "",
})
if result := updatePodLabel(pod, queueNameEmptyConf.GetNamespace(), queueNameEmptyConf.GetGenerateUniqueAppIds(), queueNameEmptyConf.GetDefaultQueueName()); result != nil {
if result := updatePodLabel(pod, defaultConf.GetNamespace(), defaultConf.GetGenerateUniqueAppIds()); result != nil {
assert.Equal(t, len(result), 3)
assert.Equal(t, result["random"], "random")
assert.Equal(t, result[constants.CanonicalLabelApplicationID], "yunikorn-default-autogen")
Expand All @@ -211,33 +188,4 @@ func TestDefaultQueueName(t *testing.T) {
} else {
t.Fatal("UpdatePodLabelForAdmissionController is not as expected")
}

customQueueNameConf := createConfigWithOverrides(map[string]string{
conf.AMFilteringDefaultQueueName: "yunikorn",
})
if result := updatePodLabel(pod, customQueueNameConf.GetNamespace(), customQueueNameConf.GetGenerateUniqueAppIds(), customQueueNameConf.GetDefaultQueueName()); result != nil {
assert.Equal(t, len(result), 5)
assert.Equal(t, result["random"], "random")
assert.Equal(t, result[constants.CanonicalLabelApplicationID], "yunikorn-default-autogen")
assert.Equal(t, result[constants.LabelApplicationID], "yunikorn-default-autogen")
assert.Assert(t, result[constants.CanonicalLabelQueueName] != "yunikorn")
assert.Assert(t, result[constants.LabelQueueName] != "yunikorn")
} else {
t.Fatal("UpdatePodLabelForAdmissionController is not as expected")
}

customValidQueueNameConf := createConfigWithOverrides(map[string]string{
conf.AMFilteringDefaultQueueName: "root.yunikorn",
})
if result := updatePodLabel(pod, customValidQueueNameConf.GetNamespace(),
customValidQueueNameConf.GetGenerateUniqueAppIds(), customValidQueueNameConf.GetDefaultQueueName()); result != nil {
assert.Equal(t, len(result), 5)
assert.Equal(t, result["random"], "random")
assert.Equal(t, result[constants.CanonicalLabelApplicationID], "yunikorn-default-autogen")
assert.Equal(t, result[constants.LabelApplicationID], "yunikorn-default-autogen")
assert.Equal(t, result[constants.CanonicalLabelQueueName], "root.yunikorn")
assert.Equal(t, result[constants.LabelQueueName], "root.yunikorn")
} else {
t.Fatal("UpdatePodLabelForAdmissionController is not as expected")
}
}
1 change: 0 additions & 1 deletion pkg/common/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const RootQueue = "root"
const AnnotationQueueName = DomainYuniKorn + "queue"
const CanonicalLabelQueueName = DomainYuniKorn + "queue"
const AnnotationParentQueue = DomainYuniKorn + "parentqueue"
const ApplicationDefaultQueue = "root.default"
const DefaultPartition = "default"
const AppTagNamespace = "namespace"
const AppTagNamespaceParentQueue = "namespace.parentqueue"
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func IsAssignedPod(pod *v1.Pod) bool {
}

func GetQueueNameFromPod(pod *v1.Pod) string {
queueName := constants.ApplicationDefaultQueue
queueName := ""
if an := GetPodLabelValue(pod, constants.LabelQueueName); an != "" {
queueName = an
} else if qu := GetPodAnnotationValue(pod, constants.AnnotationQueueName); qu != "" {
Expand Down
Loading

0 comments on commit 085edca

Please sign in to comment.