generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Propagate job labels and annotations #737
Merged
k8s-ci-robot
merged 21 commits into
kubernetes-sigs:main
from
imreddy13:fix_annotations_and_labels
Jan 7, 2025
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
57c3d66
Propagate job labels and annotations
imreddy13 afe64c0
Modify unit tests
imreddy13 78be53e
Fix formatting
imreddy13 4ead912
Remove unused annotation from test
imreddy13 2006075
Fix unit test
imreddy13 4cf06f0
Separate pod and job labels in tests
imreddy13 16fb6c6
Update pkg/controllers/jobset_controller_test.go
imreddy13 4266677
Update pkg/controllers/jobset_controller_test.go
imreddy13 ab48445
Update pkg/controllers/jobset_controller_test.go
imreddy13 7f19d38
Update pkg/controllers/jobset_controller_test.go
imreddy13 966158b
Update pkg/controllers/jobset_controller_test.go
imreddy13 f72b086
Update pkg/controllers/jobset_controller_test.go
imreddy13 ac94bb4
Update pkg/controllers/jobset_controller_test.go
ahg-g 8e983b7
Update pkg/controllers/jobset_controller_test.go
ahg-g d54d12c
Update pkg/controllers/jobset_controller_test.go
ahg-g e4f0707
Update pkg/controllers/jobset_controller_test.go
ahg-g 8d9d886
Update pkg/controllers/jobset_controller_test.go
ahg-g ca6b6ed
Update pkg/controllers/jobset_controller_test.go
ahg-g ba0068d
Update pkg/controllers/jobset_controller_test.go
ahg-g f680882
Update pkg/controllers/jobset_controller_test.go
ahg-g cb97e1b
Run gofmt
imreddy13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading #729, are we not expecting top level labels/annotations to propagate down into the Jobs/Pods?
We should maybe comment on that ticket that top-level labels/annotations won't be passed down but they should be set on the Job/Pod?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the current implementation, only certain top level labels/annotations are explicitly passed down - see https://github.com/kubernetes-sigs/jobset/blob/main/pkg/controllers/jobset_controller.go#L767
So yes I think by design the user needs to set labels on the ReplicatedJob spec in order to be passed down to the Job/Pod. Is my understanding correct @ahg-g ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct