-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
…thorizationv1client
This pull request has been linked to Clubhouse Story #15968: Checks for RBAC permissions. |
alias: authorization$1 | ||
- pkg: k8s.io/client-go/kubernetes/typed/authorization/(v[\w\d]+) |
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.
Ahh, it's kinda unfortunate that we have to import a bunch of these this way, but makes sense to me!
func (k *KubernetesChecker) CheckRBAC(ctx context.Context) []*api.CheckResult { | ||
const checkName = "kubernetes-rbac" | ||
authClient := k.client.AuthorizationV1() | ||
rbacReqs := findClosestVersionRequirements(k.coderVersion) |
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 important to do now, can do this as another PR -- can we check this in the Validate step, so that these errors are impossible? The idea is that only server errors or genuine failures should cause FAIL results, bad input should be caught before anything runs (calling code should call Validate, check for errors, and then Run)
This PR adds the capability to check if the current cluster context has the required permissions for Coder.
Note: I ran into a strange issue withimportas
alerting forauthorizationv1client
; I disabled this check for the moment.Edit: worked around this.
Basing this PR against a different branch until it is merged, and will then rebase onto main.