Admission control attributes has access to resource name

This commit is contained in:
derekwaynecarr
2015-06-17 16:40:36 -04:00
parent 5e25827919
commit f6fb72ec51
12 changed files with 71 additions and 56 deletions

View File

@@ -24,6 +24,7 @@ import (
type attributesRecord struct {
kind string
namespace string
name string
resource string
subresource string
operation Operation
@@ -31,10 +32,11 @@ type attributesRecord struct {
userInfo user.Info
}
func NewAttributesRecord(object runtime.Object, kind, namespace, resource, subresource string, operation Operation, userInfo user.Info) Attributes {
func NewAttributesRecord(object runtime.Object, kind, namespace, name, resource, subresource string, operation Operation, userInfo user.Info) Attributes {
return &attributesRecord{
kind: kind,
namespace: namespace,
name: name,
resource: resource,
subresource: subresource,
operation: operation,
@@ -51,6 +53,10 @@ func (record *attributesRecord) GetNamespace() string {
return record.namespace
}
func (record *attributesRecord) GetName() string {
return record.name
}
func (record *attributesRecord) GetResource() string {
return record.resource
}