Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Add resource limits and requests (#372)
Browse files Browse the repository at this point in the history
* Add resource limits and requests

* Add the limits and requests to no azure.json deployments
  • Loading branch information
kkmsft authored Sep 5, 2019
1 parent 706a5d0 commit b02f76b
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 0 deletions.
14 changes: 14 additions & 0 deletions deploy/infra/deployment-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
securityContext:
privileged: true
capabilities:
Expand Down Expand Up @@ -218,6 +225,13 @@ spec:
args:
- "--cloudconfig=/etc/kubernetes/azure.json"
- "--logtostderr"
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- name: k8s-azure-file
mountPath: /etc/kubernetes/azure.json
Expand Down
14 changes: 14 additions & 0 deletions deploy/infra/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ spec:
capabilities:
add:
- NET_ADMIN
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- mountPath: /run/xtables.lock
name: iptableslock
Expand Down Expand Up @@ -127,6 +134,13 @@ spec:
- "--kubeconfig=/etc/kubernetes/kubeconfig/kubeconfig"
- "--cloudconfig=/etc/kubernetes/azure.json"
- "--logtostderr"
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- name: kubeconfig
mountPath: /etc/kubernetes/kubeconfig
Expand Down
14 changes: 14 additions & 0 deletions deploy/infra/noazurejson/deployment-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
securityContext:
privileged: true
capabilities:
Expand Down Expand Up @@ -264,6 +271,13 @@ spec:
secretKeyRef:
key: ClientSecret
name: aadpodidentity-admin-secret
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
livenessProbe:
httpGet:
path: /healthz
Expand Down
14 changes: 14 additions & 0 deletions deploy/infra/noazurejson/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
securityContext:
privileged: true
capabilities:
Expand Down Expand Up @@ -174,6 +181,13 @@ spec:
secretKeyRef:
key: ClientSecret
name: aadpodidentity-admin-secret
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- name: kubeconfig
mountPath: /etc/kubernetes/kubeconfig
Expand Down
14 changes: 14 additions & 0 deletions deploy/infra/rc/deployment-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
securityContext:
privileged: true
capabilities:
Expand Down Expand Up @@ -218,6 +225,13 @@ spec:
args:
- "--cloudconfig=/etc/kubernetes/azure.json"
- "--logtostderr"
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- name: k8s-azure-file
mountPath: /etc/kubernetes/azure.json
Expand Down
14 changes: 14 additions & 0 deletions deploy/infra/rc/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
securityContext:
privileged: true
capabilities:
Expand Down Expand Up @@ -127,6 +134,13 @@ spec:
- "--kubeconfig=/etc/kubernetes/kubeconfig/kubeconfig"
- "--cloudconfig=/etc/kubernetes/azure.json"
- "--logtostderr"
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- name: kubeconfig
mountPath: /etc/kubernetes/kubeconfig
Expand Down
14 changes: 14 additions & 0 deletions test/e2e/template/deployment-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
securityContext:
privileged: true
capabilities:
Expand Down Expand Up @@ -208,6 +215,13 @@ spec:
{{if .MICArg}}- mic {{ end }}
- "--cloudconfig=/etc/kubernetes/azure.json"
- "--logtostderr"
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- name: k8s-azure-file
mountPath: /etc/kubernetes/azure.json
Expand Down

0 comments on commit b02f76b

Please sign in to comment.