// GetNamespace is the namespace associated with the request (if any)
// GetNamespace is the namespace associated with the request (if any)
GetNamespace()string
GetNamespace()string
// GetResource is the name of the resource being requested. This is not the kind. For example: pods
// GetResource is the name of the resource being requested. This is not the kind. For example: pods
GetResource()string
GetResource()unversioned.GroupResource
// GetSubresource is the name of the subresource being requested. This is a different resource, scoped to the parent resource, but it may have a different kind.
// GetSubresource is the name of the subresource being requested. This is a different resource, scoped to the parent resource, but it may have a different kind.
// For instance, /pods has the resource "pods" and the kind "Pod", while /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod"
// For instance, /pods has the resource "pods" and the kind "Pod", while /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod"
// (because status operates on pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource "binding", and kind "Binding".
// (because status operates on pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource "binding", and kind "Binding".
...
@@ -41,7 +42,7 @@ type Attributes interface {
...
@@ -41,7 +42,7 @@ type Attributes interface {
// GetObject is the object from the incoming request prior to default values being applied
// GetObject is the object from the incoming request prior to default values being applied
GetObject()runtime.Object
GetObject()runtime.Object
// GetKind is the type of object being manipulated. For example: Pod
// GetKind is the type of object being manipulated. For example: Pod
GetKind()string
GetKind()unversioned.GroupKind
// GetUserInfo is information about the requesting user
// GetUserInfo is information about the requesting user
returnadmission.NewForbidden(a,fmt.Errorf("Unable to %s %s at this time because there was an error enforcing limit ranges",a.GetOperation(),resource))
returnadmission.NewForbidden(a,fmt.Errorf("Unable to %s %v at this time because there was an error enforcing limit ranges",a.GetOperation(),a.GetResource()))