-
Notifications
You must be signed in to change notification settings - Fork 773
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
Add cluster role section to a module #668
base: main
Are you sure you want to change the base?
Conversation
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.
@nikonhub thanks for the PR, looks awesome! I left one comment on one edge case.
{apiGroups.map((group) => ( | ||
<Tag key={group} color="blue"> | ||
{group || "*"} | ||
</Tag> | ||
))} |
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.
Not all rules will have apiGroups
. With cluster roles, you can have a rule that has a nonResourceURLs
field, and those rules will not have the apiGroups
property.
You can create a Module from the Prometheus bitnami helm chart and you will get one such cluster role which has a single rule without apiGroups
.
Because of that, the apiGroups
here will be null and calling .map
will break the UI
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.
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.
It might be a bit confusing if you see a rule without any resources and just the verbs.
Can we conditionally add a column to this table? I was thinking of adding a nonResourceURLs column if there is at least one rule with the property. If not, I would leave those three columns. In that case, I would put the verbs as the first column, followed by APIGroups and resources and, if needed, nonREsourceURLs.
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.
@nikonhub, can you check my comment above and add a column for nonResourceURLs if possible
closes #436
π Description
Add ClusterRole section to module resources
β Checks
βΉ Additional context