Admission control attributes has access to resource name
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user