-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix numerical resource ranges (#991)
* fix numerical resource numbers * add resource range tests
- Loading branch information
Showing
6 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
containers: | ||
exclude: | ||
- initContainer | ||
successMessage: Resource limits are within the required range | ||
failureMessage: Resource limits should be within the required range | ||
category: Resources | ||
target: Container | ||
schema: | ||
'$schema': http://json-schema.org/draft-07/schema | ||
type: object | ||
required: | ||
- resources | ||
properties: | ||
resources: | ||
type: object | ||
required: | ||
- limits | ||
properties: | ||
limits: | ||
type: object | ||
required: | ||
- memory | ||
- cpu | ||
properties: | ||
memory: | ||
type: string | ||
resourceMinimum: 100Mi # 104857600 bytes | ||
resourceMaximum: 6G | ||
cpu: | ||
type: string | ||
resourceMinimum: 100m | ||
resourceMaximum: "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
resources: | ||
limits: | ||
memory: 250Mi | ||
cpu: 0.05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
resources: | ||
limits: | ||
memory: 104857599 | ||
cpu: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
resources: | ||
limits: | ||
memory: 250Mi | ||
cpu: 1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
resources: | ||
limits: | ||
memory: 104857600 | ||
cpu: 1 |