Shorten generated RBAC names and fail if names are too long#44
Merged
Conversation
4 tasks
|
🚀 This PR has been released as Triggering workflows 🛠️ Auto tagging enabled with label |
bastjan
approved these changes
May 26, 2026
2ab0b63 to
2cbb312
Compare
This commit adds assertions for generated role/clusterrole names that fail if a generated name is longer than 63 characters. Note that we don't need to do this for rolebindings/clusterrolebindings. Additionally, the commit reduces excessive prefix/segment length (`esp:x:` instead of `espejote:supplemental:`, `esp:mr:` instead of `espejote:managedresource:`, `ctx` instead of `context` and `trg` instead of `trigger`) for generated RBAC names to leave a bit more room for the segments derived from the user-selected namespace and managedresource name.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The PR adds assertions for generated role/clusterrole names that fail if a generated name is longer than 63 characters. Note that we don't need to do this for rolebindings/clusterrolebindings.
Additionally, the PR reduces excessive prefix/segment length (
esp:x:instead ofespejote:supplemental:,esp:mr:instead ofespejote:managedresource:,ctxinstead ofcontextandtrginstead oftrigger) for generated RBAC names to leave a bit more room for the segments derived from the user-selected namespace and managedresourcename.
TODO
Checklist
changelog.
The PR has a meaningful description that sums up the change. It will be
linked in the changelog.
bug,enhancement,documentation,change,breaking,dependencyas they show up in the changelog.