Merge pull request #48922 from ConnorDoyle/integer-resources-as-default

Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.

**What this PR does / why we need it**:

Fixes #50473 

Rationale: since the scheduler handles all resources except CPU as integers, that could just be the default behavior for namespaced resources.

cc @RenaudWasTaken @vishh 

**Release note**:

```release-note
Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.
```
This commit is contained in:
Kubernetes Submit Queue
2017-08-16 19:50:15 -07:00
committed by GitHub
14 changed files with 141 additions and 70 deletions

View File

@@ -3287,7 +3287,7 @@ func TestValidateContainers(t *testing.T) {
Limits: api.ResourceList{
api.ResourceName(api.ResourceCPU): resource.MustParse("10"),
api.ResourceName(api.ResourceMemory): resource.MustParse("10G"),
api.ResourceName("my.org/resource"): resource.MustParse("10m"),
api.ResourceName("my.org/resource"): resource.MustParse("10"),
},
},
ImagePullPolicy: "IfNotPresent",
@@ -3349,12 +3349,12 @@ func TestValidateContainers(t *testing.T) {
Requests: api.ResourceList{
api.ResourceName(api.ResourceCPU): resource.MustParse("10"),
api.ResourceName(api.ResourceMemory): resource.MustParse("10G"),
api.ResourceName("my.org/resource"): resource.MustParse("10m"),
api.ResourceName("my.org/resource"): resource.MustParse("10"),
},
Limits: api.ResourceList{
api.ResourceName(api.ResourceCPU): resource.MustParse("10"),
api.ResourceName(api.ResourceMemory): resource.MustParse("10G"),
api.ResourceName("my.org/resource"): resource.MustParse("10m"),
api.ResourceName("my.org/resource"): resource.MustParse("10"),
},
},
ImagePullPolicy: "IfNotPresent",
@@ -3370,7 +3370,7 @@ func TestValidateContainers(t *testing.T) {
},
Limits: api.ResourceList{
api.ResourceName(api.ResourceCPU): resource.MustParse("10"),
api.ResourceName("my.org/resource"): resource.MustParse("10m"),
api.ResourceName("my.org/resource"): resource.MustParse("10"),
},
},
ImagePullPolicy: "IfNotPresent",