Add option to pass in kubernetes resources + limits for the Nginx container

This commit is contained in:
Ben Tucker
2019-07-07 12:03:39 +10:00
parent 22c0c34748
commit 6998d28d6d
4 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: nginx
version: 3.3.3
version: 3.4.0
appVersion: 1.16.0
description: Chart for the nginx server
keywords:

View File

@@ -79,6 +79,7 @@ The following tables lists the configurable parameters of the NGINX Open Source
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
| `livenessProbe` | Deployment Liveness Probe | See `values.yaml` |
| `readinessProbe` | Deployment Readiness Probe | See `values.yaml` |
| `resources` | Resource requests/limit | {} |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

View File

@@ -45,6 +45,8 @@ spec:
- name: nginx-server-block
mountPath: /opt/bitnami/nginx/conf/server_blocks
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "nginx.metrics.image" . }}

View File

@@ -136,6 +136,11 @@ readinessProbe:
##
podAnnotations: {}
## Resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
# resources: {}
## Prometheus Exporter / Metrics
##
metrics: