Skip to content

fix(manifests): Add missing permissions for the RuntimeClass and LimitRange#2787

Merged
google-oss-prow[bot] merged 1 commit into
kubeflow:masterfrom
tenzen-y:fix-permissions
Aug 13, 2025
Merged

fix(manifests): Add missing permissions for the RuntimeClass and LimitRange#2787
google-oss-prow[bot] merged 1 commit into
kubeflow:masterfrom
tenzen-y:fix-permissions

Conversation

@tenzen-y
Copy link
Copy Markdown
Member

@tenzen-y tenzen-y commented Aug 13, 2025

What this PR does / why we need it:

Even though podgroup plugin needs to operate LimitRange and RuntimeClass, the trainer does not have proper permissions.

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #

Checklist:

  • Docs included if any changes are user facing

…tRange

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 16942765844

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 47.791%

Totals Coverage Status
Change from base Build 16940641662: 0.0%
Covered Lines: 941
Relevant Lines: 1969

💛 - Coveralls

@astefanutti
Copy link
Copy Markdown
Contributor

/lgtm

Thanks!

Comment on lines +72 to +73
// +kubebuilder:rbac:groups=node.k8s.io,resources=runtimeclasses,verbs=get;list;watch
// +kubebuilder:rbac:groups="",resources=limitranges,verbs=get;list;watch
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does the plugin also create/delete the resources ?

func (h *PodGroupLimitRangeHandler) Create(ctx context.Context, e event.TypedCreateEvent[*corev1.LimitRange], q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
limitRange := e.Object
log := ctrl.LoggerFrom(ctx).WithValues("limitRange", klog.KObj(limitRange))
if err := h.queueSuspendedTrainJob(ctx, limitRange.Namespace, q); err != nil {
log.Error(err, "could not queue suspended TrainJob to reconcile queue")
}
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That is write operation for TrainJob.
The missing permissions are for LimitRange and RuntimeClass.

Copy link
Copy Markdown
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

/approve

@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot merged commit f12a6d3 into kubeflow:master Aug 13, 2025
21 checks passed
@google-oss-prow google-oss-prow Bot added this to the v2.1 milestone Aug 13, 2025
@tenzen-y tenzen-y deleted the fix-permissions branch August 13, 2025 17:56
alexxfan pushed a commit to red-hat-data-services/trainer that referenced this pull request Nov 24, 2025
…tRange (kubeflow#2787)

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants