Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YUNIKORN-2636] Admission Controller ignores existing Queue/ApplicationID annotations #848

Closed
wants to merge 2 commits into from

Conversation

chenyulin0719
Copy link
Contributor

What is this PR for?

  • Also check below annotations in updatePodLabel

    1. yunikorn.apache.org/app-id (Annotation)
    2. yunikorn.apache.org/queue (Annotation)
  • Remove magic number. (use constants.LabelApplicationID, constants.LabelQueueName...)

What type of PR is it?

  • - Bug Fix

Todos

NA

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-2636

How should this be tested?

  1. make test.
  2. Follow the reproduce steps in the Jira description

Screenshots (if appropriate)

  • No applicationId/queue lable added by admission controller
image
  • The pod is placed to the correct queue. 'root.sandbox'
image

Questions:

NA

@chia7712
Copy link
Contributor

For other reviewers, this bug is related to previous comment (#843 (comment))

@chia7712
Copy link
Contributor

nit: the existingLabels variable is unused now, so we do a bit refactor for the deep copy.

	result := make(map[string]string)
	for k, v := range pod.Labels {
		result[k] = v
	}

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.21%. Comparing base (5f80f49) to head (6f3849f).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #848      +/-   ##
==========================================
- Coverage   67.33%   67.21%   -0.13%     
==========================================
  Files          70       70              
  Lines        7598     7600       +2     
==========================================
- Hits         5116     5108       -8     
- Misses       2271     2279       +8     
- Partials      211      213       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants