Remove client from attributes, remove admission control interface, fix-up error codes

This commit is contained in:
derekwaynecarr
2015-01-07 14:33:21 -05:00
parent 2820c2c601
commit a56087cdf8
18 changed files with 84 additions and 130 deletions

View File

@@ -17,14 +17,12 @@ limitations under the License.
package admission
import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
)
// Attributes is an interface used by AdmissionController to get information about a request
// that is used to make an admission decision.
type Attributes interface {
GetClient() client.Interface
GetNamespace() string
GetKind() string
GetOperation() string
@@ -36,8 +34,3 @@ type Interface interface {
// Admit makes an admission decision based on the request attributes
Admit(a Attributes) (err error)
}
// AdmissionControl is responsible for performing Admission control decisions
type AdmissionControl interface {
AdmissionControl(operation, kind, namespace string, object runtime.Object) (err error)
}