Skip to content

Commit

Permalink
Merge pull request kubernetes#15942 from feihujiang/returnClearMessag…
Browse files Browse the repository at this point in the history
…eWhenDeletingImmortalNamespace

Auto commit by PR queue bot
  • Loading branch information
k8s-merge-robot committed Oct 22, 2015
2 parents 407ff58 + c5f7278 commit 53279bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/pkg/admission/namespace/lifecycle/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (l *lifecycle) Admit(a admission.Attributes) (err error) {

// prevent deletion of immortal namespaces
if a.GetOperation() == admission.Delete && a.GetKind() == "Namespace" && l.immortalNamespaces.Has(a.GetName()) {
return errors.NewForbidden(a.GetKind(), a.GetName(), fmt.Errorf("namespace can never be deleted"))
return errors.NewForbidden(a.GetKind(), a.GetName(), fmt.Errorf("this namespace may not be deleted"))
}

defaultVersion, kind, err := api.RESTMapper.VersionAndKindForResource(a.GetResource())
Expand Down

0 comments on commit 53279bc

Please sign in to comment.