mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
update StatusDetails to handle Groups
This commit is contained in:
@@ -50,7 +50,7 @@ type lifecycle struct {
|
||||
func (l *lifecycle) Admit(a admission.Attributes) (err error) {
|
||||
// prevent deletion of immortal namespaces
|
||||
if a.GetOperation() == admission.Delete && a.GetKind() == api.Kind("Namespace") && l.immortalNamespaces.Has(a.GetName()) {
|
||||
return errors.NewForbidden(a.GetKind().Kind, a.GetName(), fmt.Errorf("this namespace may not be deleted"))
|
||||
return errors.NewForbidden(a.GetResource(), a.GetName(), fmt.Errorf("this namespace may not be deleted"))
|
||||
}
|
||||
|
||||
kind, err := api.RESTMapper.KindFor(a.GetResource().WithVersion(""))
|
||||
|
||||
Reference in New Issue
Block a user