Skip to content

add security context support to binder pod#917

Closed
AdheipSingh wants to merge 1 commit intokai-scheduler:mainfrom
AdheipSingh:main
Closed

add security context support to binder pod#917
AdheipSingh wants to merge 1 commit intokai-scheduler:mainfrom
AdheipSingh:main

Conversation

@AdheipSingh
Copy link
Copy Markdown
Contributor

Description

Related Issues

Fixes #570

Checklist

Note: Ensure your PR title follows the Conventional Commits format (e.g., feat(scheduler): add new feature)

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed)

Breaking Changes

Additional Notes

@AdheipSingh
Copy link
Copy Markdown
Contributor Author

@enoodle - would like some feedback on the approach.

Copy link
Copy Markdown
Contributor

@rich7420 rich7420 left a comment

Choose a reason for hiding this comment

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

thanks for the patch!
A little suggestion: You've better develop on your other branch not main branch.


if config.ResourceReservation.PodSecurityContext != nil {
secCtxJSON, err := json.Marshal(config.ResourceReservation.PodSecurityContext)
if err == nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here should return some error message.

Comment thread cmd/binder/app/options.go
@itsomri
Copy link
Copy Markdown
Collaborator

itsomri commented Jan 22, 2026

The implementation makes sense. I wonder if we can find a more structured way to pass the configuration to the reservation service. What do you think?
Also, please prefix the pr title with "feat:" and add a line in the changelog

Thanks!

@github-actions
Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/cmd/binder/app 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/binder 26.21% (-2.21%) 👎
github.com/NVIDIA/KAI-scheduler/pkg/binder/binding/resourcereservation 93.43% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/binder/controllers 46.85% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/binder/controllers/integration_tests 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder 71.65% (-3.14%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/cmd/binder/app/app.go 0.00% (ø) 80 (+12) 0 80 (+12)
github.com/NVIDIA/KAI-scheduler/cmd/binder/app/options.go 0.00% (ø) 27 (+2) 0 27 (+2)
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/binder/binder.go 100.00% (ø) 27 27 0
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/binder/zz_generated.deepcopy.go 0.00% (ø) 76 (+8) 0 76 (+8)
github.com/NVIDIA/KAI-scheduler/pkg/binder/binding/resourcereservation/resource_reservation.go 93.43% (ø) 213 199 14
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/resources.go 72.22% (-3.78%) 108 (+8) 78 (+2) 30 (+6) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/binder/binding/resourcereservation/resource_reservation_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/binder/controllers/bindrequest_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/binder/controllers/integration_tests/suite_test.go

@davidLif
Copy link
Copy Markdown
Collaborator

@AdheipSingh Do you plan to continue this PR?

@AdheipSingh
Copy link
Copy Markdown
Contributor Author

Hi @davidLif

Yes, i ll be working this, let me send a polished PR this week. I have it running on my custom fork.

@AdheipSingh AdheipSingh closed this Apr 5, 2026
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.

SecurityContext missing from dynamically created pods in v0.6.15

4 participants