Repository navigation
chore(manifests): generate the Helm manager ClusterRole rules from the kustomize role - #4291
Conversation
|
🎉 Welcome to the Kubeflow Trainer! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
|
Thanks @ganeshmshetty, |
…e kustomize role Signed-off-by: Ganesh M <ganeshmshetty@users.noreply.github.com>
0f1f45d to
400671a
Compare
|
Rebased on master (kept the new notContains check from #4271), thanks @andreyvelich 🙏 |
andreyvelich
left a comment
There was a problem hiding this comment.
Thanks @ganeshmshetty!
/lgtm
/approve
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Thanks for the review and merge @andreyvelich 🙏 |
What this PR does / why we need it:
make manifestsnow writes the rules of the Helm chart's manager ClusterRole (charts/kubeflow-trainer/templates/rbac/clusterrole.yaml) from the controller-gen output inmanifests/base/rbac/role.yaml. It already does the same for the CRDs. Only themetadatablock stays chart-specific. Becausetest-go.yamlrunsmake generateand fails on a dirty tree, RBAC drift like the one fixed in #4271 now fails CI instead of slipping through.After regenerating, the chart has the same rules as the kustomize role. That removes the extra
createon runtimes and OptimizationJobs (the same change as #4271) and moves theapps/deploymentsrule to controller-gen's order. The license header becomes the year-less Helm boilerplate, which the CRD templates already use. I updated theclusterrole_test.yamlassertion to match. If #4271 lands first, I'll merge master in.Checked locally:
make manifestsis idempotent. If the chart template is edited by hand, it gets rewritten back, andrules:is identical tomanifests/base/rbac/role.yaml.make helm-unittest: 22 suites / 98 tests passhelm lint charts/kubeflow-trainerpassesNot run: full
make generate/test-go(Python API codegen needs a container runtime) andhelm-lintvia chart-testing (needs Docker).Written with AI assistance and reviewed by me, per the Kubeflow AI policy.
Which issue(s) this PR fixes:
Fixes #4290
Checklist: