E581 Add container resource requests (#2484) · nginx/kubernetes-ingress@888f52c · GitHub
[go: up one dir, main page]

Skip to content

Commit 888f52c

Browse files
authored
Add container resource requests (#2484)
1 parent 37347b0 commit 888f52c

File tree

7 files changed

+38
-9
lines changed

7 files changed

+38
-9
lines changed

deployments/daemon-set/nginx-ingress.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ spec:
3737
path: /nginx-ready
3838
port: readiness-port
3939
periodSeconds: 1
40+
resources:
41+
requests:
42+
cpu: "100m"
43+
memory: "128Mi"
44+
#limits:
45+
# cpu: "1"
46+
# memory: "1Gi"
4047
securityContext:
4148
allowPrivilegeEscalation: true
4249
runAsUser: 101 #nginx

deployments/daemon-set/nginx-plus-ingress.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ spec:
3737
path: /nginx-ready
3838
port: readiness-port
3939
periodSeconds: 1
40+
resources:
41+
requests:
42+
cpu: "100m"
43+
memory: "128Mi"
44+
#limits:
45+
# cpu: "1"
46+
# memory: "1Gi"
4047
securityContext:
4148
allowPrivilegeEscalation: true
4249
runAsUser: 101 #nginx

deployments/deployment/nginx-ingress.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ spec:
3636
path: /nginx-ready
3737
port: readiness-port
3838
periodSeconds: 1
39+
resources:
40+
requests:
41+
cpu: "100m"
42+
memory: "128Mi"
43+
#limits:
44+
# cpu: "1"
45+
# memory: "1Gi"
3946
securityContext:
4047
allowPrivilegeEscalation: true
4148
runAsUser: 101 #nginx

deployments/deployment/nginx-plus-ingress.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ spec:
3636
path: /nginx-ready
3737
port: readiness-port
3838
periodSeconds: 1
39+
resources:
40+
requests:
41+
cpu: "100m"
42+
memory: "128Mi"
43+
#limits:
44+
# cpu: "1"
45+
# memory: "1Gi"
3946
securityContext:
4047
allowPrivilegeEscalation: true
4148
runAsUser: 101 #nginx

deployments/helm-chart/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Parameter | Description | Default
176176
`controller.volumeMounts` | The volumeMounts of the Ingress Controller pods. | []
177177
`controller.initContainers` | InitContainers for the Ingress Controller pods. | []
178178
`controller.extraContainers` | Extra (eg. sidecar) containers for the Ingress Controller pods. | []
179-
`controller.resources` | The resources of the Ingress Controller pods. | {}
179+
`controller.resources` | The resources of the Ingress Controller pods. | requests: cpu=100m,memory=128Mi
180180
`controller.replicaCount` | The number of replicas of the Ingress Controller deployment. | 1
181181
`controller.ingressClass` | A class of the Ingress Controller. An IngressClass resource with the name equal to the class must be deployed. Otherwise, the Ingress Controller will fail to start. The Ingress Controller only processes resources that belong to its class - i.e. have the "ingressClassName" field resource equal to the class. The Ingress Controller processes all the VirtualServer/VirtualServerRoute/TransportServer resources that do not have the "ingressClassName" field for all versions of kubernetes. | nginx
182182
`controller.setAsDefaultIngress` | New Ingresses without an `"ingressClassName"` field specified will be assigned the class specified in `controller.ingressClass`. | false

deployments/helm-chart/values.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,14 @@ controller:
103103
terminationGracePeriodSeconds: 30
104104

105105
## The resources of the Ingress Controller pods.
106-
resources: {}
107-
# limits:
108-
# cpu: 100m
109-
# memory: 64Mi
110-
# requests:
111-
# cpu: 100m
112-
# memory: 64Mi
106+
resources:
107+
requests:
108+
cpu: 100m
109+
memory: 128Mi
110+
# limits:
111+
# cpu: 1
112+
# memory: 1Gi
113+
113114

114115
## The tolerations of the Ingress Controller pods.
115116
tolerations: []

docs/content/installation/installation-with-helm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
179179
|``controller.volumeMounts`` | The volumeMounts of the Ingress Controller pods. | [] |
180180
|``controller.initContainers`` | InitContainers for the Ingress Controller pods. | []
181181
|``controller.extraContainers`` | Extra (eg. sidecar) containers for the Ingress Controller pods. | []
182-
|``controller.resources`` | The resources of the Ingress Controller pods. | {} |
182+
|``controller.resources`` | The resources of the Ingress Controller pods. | requests: cpu=100m,memory=128Mi |
183183
|``controller.replicaCount`` | The number of replicas of the Ingress Controller deployment. | 1 |
184184
|``controller.ingressClass`` | A class of the Ingress Controller. An IngressClass resource with the name equal to the class must be deployed. Otherwise, the Ingress Controller will fail to start. The Ingress Controller only processes resources that belong to its class - i.e. have the "ingressClassName" field resource equal to the class. The Ingress Controller processes all the VirtualServer/VirtualServerRoute/TransportServer resources that do not have the "ingressClassName" field for all versions of kubernetes. | nginx |
185185
|``controller.setAsDefaultIngress`` | New Ingresses without an ingressClassName field specified will be assigned the class specified in `controller.ingressClass`. | false |

0 commit comments

Comments
 (0)
0