mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Fix PodSecurity forbidden response reason
This commit is contained in:
parent
bf77f8ff43
commit
4633670153
@ -475,7 +475,7 @@ func failureResponse(msg string, reason metav1.StatusReason, code int32) *admiss
|
|||||||
|
|
||||||
// forbiddenResponse is the response used when the admission decision is deny for policy violations.
|
// forbiddenResponse is the response used when the admission decision is deny for policy violations.
|
||||||
func forbiddenResponse(msg string) *admissionv1.AdmissionResponse {
|
func forbiddenResponse(msg string) *admissionv1.AdmissionResponse {
|
||||||
return failureResponse(msg, metav1.StatusFailure, http.StatusForbidden)
|
return failureResponse(msg, metav1.StatusReasonForbidden, http.StatusForbidden)
|
||||||
}
|
}
|
||||||
|
|
||||||
// invalidResponse is the response used for namespace requests when namespace labels are invalid.
|
// invalidResponse is the response used for namespace requests when namespace labels are invalid.
|
||||||
|
Loading…
Reference in New Issue
Block a user