Improve error when SCC admission fails to create SecurityContextConstraintsProvider#22724
Conversation
4c4404e to
943f8f6
Compare
| return nil, "", nil, admission.NewForbidden(a, err) | ||
| } | ||
| if len(constraints) == 0 { | ||
| return nil, "", nil, admission.NewForbidden(a, fmt.Errorf("no SecurityContextConstraints found in namespace %s", a.GetNamespace())) |
There was a problem hiding this comment.
wrong spot. YOu can still have a message here about no matching constraints for namespace, but do a separate list above this.
There was a problem hiding this comment.
only list all if didn't find any in the ns?
943f8f6 to
1352136
Compare
|
ok, so now installs are failing, in events I see 21 times: |
1352136 to
863064c
Compare
|
/test e2e-aws |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, sallyom 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 |
@deads2k
So the next person who messes with SCC admission has a better experience.