Skip to content

Commit

Permalink
Merge pull request kubernetes#17255 from derekwaynecarr/add_default_t…
Browse files Browse the repository at this point in the history
…o_header

Auto commit by PR queue bot
  • Loading branch information
k8s-merge-robot committed Nov 22, 2015
2 parents 759df1e + 1383152 commit 68d6918
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions docs/admin/limitrange/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ Let's describe the limits that we have imposed in our namespace.
$ kubectl describe limits mylimits --namespace=limit-example
Name: mylimits
Namespace: limit-example
Type Resource Min Max Request Limit Limit/Request
---- -------- --- --- ------- ----- -------------
Pod cpu 200m 2 - - -
Pod memory 6Mi 1Gi - - -
Container cpu 100m 2 200m 300m -
Container memory 3Mi 1Gi 100Mi 200Mi -
Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio
---- -------- --- --- --------------- ------------- -----------------------
Pod cpu 200m 2 - - -
Pod memory 6Mi 1Gi - - -
Container cpu 100m 2 200m 300m -
Container memory 3Mi 1Gi 100Mi 200Mi -
```

In this scenario, we have said the following:
Expand Down
8 changes: 4 additions & 4 deletions docs/admin/resourcequota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ limitrange "limits" created
$ kubectl describe limits limits --namespace=quota-example
Name: limits
Namespace: quota-example
Type Resource Min Max Request Limit Limit/Request
---- -------- --- --- ------- ----- -------------
Container memory - - 256Mi 512Mi -
Container cpu - - 100m 200m -
Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio
---- -------- --- --- --------------- ------------- -----------------------
Container memory - - 256Mi 512Mi -
Container cpu - - 100m 200m -
```

Now any time a pod is created in this namespace, if it has not specified any resource request/limit, the default
Expand Down
8 changes: 4 additions & 4 deletions pkg/kubectl/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ func DescribeLimitRanges(limitRanges *api.LimitRangeList, w io.Writer) {
fmt.Fprint(w, "No resource limits.\n")
return
}
fmt.Fprintf(w, "Resource Limits\n Type\tResource\tMin\tMax\tRequest\tLimit\tLimit/Request\n")
fmt.Fprintf(w, " ----\t--------\t---\t---\t-------\t-----\t-------------\n")
fmt.Fprintf(w, "Resource Limits\n Type\tResource\tMin\tMax\tDefault Request\tDefault Limit\tMax Limit/Request Ratio\n")
fmt.Fprintf(w, " ----\t--------\t---\t---\t---------------\t-------------\t-----------------------\n")
for _, limitRange := range limitRanges.Items {
for i := range limitRange.Spec.Limits {
item := limitRange.Spec.Limits[i]
Expand Down Expand Up @@ -312,8 +312,8 @@ func describeLimitRange(limitRange *api.LimitRange) (string, error) {
return tabbedString(func(out io.Writer) error {
fmt.Fprintf(out, "Name:\t%s\n", limitRange.Name)
fmt.Fprintf(out, "Namespace:\t%s\n", limitRange.Namespace)
fmt.Fprintf(out, "Type\tResource\tMin\tMax\tRequest\tLimit\tLimit/Request\n")
fmt.Fprintf(out, "----\t--------\t---\t---\t-------\t-----\t-------------\n")
fmt.Fprintf(out, "Type\tResource\tMin\tMax\tDefault Request\tDefault Limit\tMax Limit/Request Ratio\n")
fmt.Fprintf(out, "----\t--------\t---\t---\t---------------\t-------------\t-----------------------\n")
for i := range limitRange.Spec.Limits {
item := limitRange.Spec.Limits[i]
maxResources := item.Max
Expand Down

0 comments on commit 68d6918

Please sign in to comment.