Skip to content

Commit

Permalink
Merge pull request kubernetes#4665 from ddysher/admission-doc
Browse files Browse the repository at this point in the history
Admission doc cleanup
  • Loading branch information
vmarmol committed Feb 20, 2015
2 parents 54ef88b + a43a039 commit 49e7900
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
6 changes: 3 additions & 3 deletions docs/design/admission_control.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kubernetes Proposal - Admission Control

**Related PR:**
**Related PR:**

| Topic | Link |
| ----- | ---- |
Expand Down Expand Up @@ -35,7 +35,7 @@ The kube-apiserver takes the following OPTIONAL arguments to enable admission co

An **AdmissionControl** plug-in is an implementation of the following interface:

```
```go
package admission

// Attributes is an interface used by a plug-in to make an admission decision on a individual request.
Expand All @@ -57,7 +57,7 @@ type Interface interface {
A **plug-in** must be compiled with the binary, and is registered as an available option by providing a name, and implementation
of admission.Interface.

```
```go
func init() {
admission.RegisterPlugin("AlwaysDeny", func(client client.Interface, config io.Reader) (admission.Interface, error) { return NewAlwaysDeny(), nil })
}
Expand Down
20 changes: 10 additions & 10 deletions docs/design/admission_control_limit_range.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This document proposes a system for enforcing min/max limits per resource as par
A new resource, **LimitRange**, is introduced to enumerate min/max limits for a resource type scoped to a
Kubernetes namespace.

```
```go
const (
// Limit that applies to all pods in a namespace
LimitTypePod string = "Pod"
Expand Down Expand Up @@ -54,7 +54,7 @@ type LimitRangeList struct {

## AdmissionControl plugin: LimitRanger

The **LimitRanger** plug-in introspects all incoming admission requests.
The **LimitRanger** plug-in introspects all incoming admission requests.

It makes decisions by evaluating the incoming object against all defined **LimitRange** objects in the request context namespace.

Expand Down Expand Up @@ -97,20 +97,20 @@ kubectl is modified to support the **LimitRange** resource.

For example,

```
```shell
$ kubectl namespace myspace
$ kubectl create -f examples/limitrange/limit-range.json
$ kubectl get limits
NAME
limits
$ kubectl describe limits limits
Name: limits
Type Resource Min Max
---- -------- --- ---
Pod memory 1Mi 1Gi
Pod cpu 250m 2
Container cpu 250m 2
Container memory 1Mi 1Gi
Name: limits
Type Resource Min Max
---- -------- --- ---
Pod memory 1Mi 1Gi
Pod cpu 250m 2
Container memory 1Mi 1Gi
Container cpu 250m 2
```

## Future Enhancements: Define limits for a particular pod or container.
Expand Down
25 changes: 13 additions & 12 deletions docs/design/admission_control_resource_quota.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A new resource, **ResourceQuota**, is introduced to enumerate hard resource limi

A new resource, **ResourceQuotaUsage**, is introduced to support atomic updates of a **ResourceQuota** status.

```
```go
// The following identify resource constants for Kubernetes object types
const (
// Pods, number
Expand Down Expand Up @@ -139,14 +139,15 @@ $ kubectl namespace myspace
$ kubectl create -f examples/resourcequota/resource-quota.json
$ kubectl get quota
NAME
myquota
$ kubectl describe quota myquota
Name: myquota
Resource Used Hard
-------- ---- ----
cpu 100m 20
memory 0 1.5Gb
pods 1 10
replicationControllers 1 10
services 2 3
```
quota
$ kubectl describe quota quota
Name: quota
Resource Used Hard
-------- ---- ----
cpu 0m 20
memory 0 1Gi
pods 5 10
replicationcontrollers 5 20
resourcequotas 1 1
services 3 5
```

0 comments on commit 49e7900

Please sign in to comment.