-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
PodSecurity: return namespace validation errors in standard field.ErrorList format #105959
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
/lgtm
var labelsPath = field.NewPath("metadata", "labels") | ||
|
||
// appendErr is a helper function to collect label-specific errors. | ||
func appendErr(errs field.ErrorList, err error, label, value string) field.ErrorList { |
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.
nit
func appendErr(errs field.ErrorList, err error, label, value string) field.ErrorList { | |
func appendLabelValidationErr(errs field.ErrorList, err error, label, value string) field.ErrorList { |
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.
sorry, didn't make it here before merge
/triage accepted |
What type of PR is this?
/kind bug
/kind feature
Which issue(s) this PR fixes:
Fixes the returned error for namespace label validation so that kubectl displays the error details (it only displays detail messages for "invalid request" errors)
Does this PR introduce a user-facing change?
/assign @tallclair
/sig auth
/milestone v1.23