blob: 4a00815fd4540f4f35260f05a8e705e28cf3784e [file] [log] [blame] [view]
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04001# ingress-nginx
2
3[ingress-nginx](https://github.com/kubernetes/ingress-nginx) Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer
4
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +04005![Version: 4.7.0](https://img.shields.io/badge/Version-4.7.0-informational?style=flat-square) ![AppVersion: 1.8.0](https://img.shields.io/badge/AppVersion-1.8.0-informational?style=flat-square)
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +04006
7To use, add `ingressClassName: nginx` spec field or the `kubernetes.io/ingress.class: nginx` annotation to your Ingress resources.
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04008
9This chart bootstraps an ingress-nginx deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
10
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +040011## Requirements
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040012
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +040013Kubernetes: `>=1.20.0-0`
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040014
15## Get Repo Info
16
17```console
18helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
19helm repo update
20```
21
22## Install Chart
23
24**Important:** only helm3 is supported
25
26```console
27helm install [RELEASE_NAME] ingress-nginx/ingress-nginx
28```
29
30The command deploys ingress-nginx on the Kubernetes cluster in the default configuration.
31
32_See [configuration](#configuration) below._
33
34_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
35
36## Uninstall Chart
37
38```console
39helm uninstall [RELEASE_NAME]
40```
41
42This removes all the Kubernetes components associated with the chart and deletes the release.
43
44_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
45
46## Upgrading Chart
47
48```console
49helm upgrade [RELEASE_NAME] [CHART] --install
50```
51
52_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
53
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040054### Migrating from stable/nginx-ingress
55
56There are two main ways to migrate a release from `stable/nginx-ingress` to `ingress-nginx/ingress-nginx` chart:
57
581. For Nginx Ingress controllers used for non-critical services, the easiest method is to [uninstall](#uninstall-chart) the old release and [install](#install-chart) the new one
591. For critical services in production that require zero-downtime, you will want to:
60 1. [Install](#install-chart) a second Ingress controller
61 1. Redirect your DNS traffic from the old controller to the new controller
62 1. Log traffic from both controllers during this changeover
63 1. [Uninstall](#uninstall-chart) the old controller once traffic has fully drained from it
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040064
65Note that there are some different and upgraded configurations between the two charts, described by Rimas Mocevicius from JFrog in the "Upgrading to ingress-nginx Helm chart" section of [Migrating from Helm chart nginx-ingress to ingress-nginx](https://rimusz.net/migrating-to-ingress-nginx). As the `ingress-nginx/ingress-nginx` chart continues to update, you will want to check current differences by running [helm configuration](#configuration) commands on both charts.
66
67## Configuration
68
69See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
70
71```console
72helm show values ingress-nginx/ingress-nginx
73```
74
75### PodDisruptionBudget
76
77Note that the PodDisruptionBudget resource will only be defined if the replicaCount is greater than one,
78else it would make it impossible to evacuate a node. See [gh issue #7127](https://github.com/helm/charts/issues/7127) for more info.
79
80### Prometheus Metrics
81
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +040082The Ingress-Nginx Controller can export Prometheus metrics, by setting `controller.metrics.enabled` to `true`.
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040083
84You can add Prometheus annotations to the metrics service using `controller.metrics.service.annotations`.
85Alternatively, if you use the Prometheus Operator, you can enable ServiceMonitor creation using `controller.metrics.serviceMonitor.enabled`. And set `controller.metrics.serviceMonitor.additionalLabels.release="prometheus"`. "release=prometheus" should match the label configured in the prometheus servicemonitor ( see `kubectl get servicemonitor prometheus-kube-prom-prometheus -oyaml -n prometheus`)
86
87### ingress-nginx nginx\_status page/stats server
88
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +040089Previous versions of this chart had a `controller.stats.*` configuration block, which is now obsolete due to the following changes in Ingress-Nginx Controller:
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040090
91- In [0.16.1](https://github.com/kubernetes/ingress-nginx/blob/main/Changelog.md#0161), the vts (virtual host traffic status) dashboard was removed
92- In [0.23.0](https://github.com/kubernetes/ingress-nginx/blob/main/Changelog.md#0230), the status page at port 18080 is now a unix socket webserver only available at localhost.
93 You can use `curl --unix-socket /tmp/nginx-status-server.sock http://localhost/nginx_status` inside the controller container to access it locally, or use the snippet from [nginx-ingress changelog](https://github.com/kubernetes/ingress-nginx/blob/main/Changelog.md#0230) to re-enable the http server
94
95### ExternalDNS Service Configuration
96
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +040097Add an [ExternalDNS](https://github.com/kubernetes-sigs/external-dns) annotation to the LoadBalancer service:
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040098
99```yaml
100controller:
101 service:
102 annotations:
103 external-dns.alpha.kubernetes.io/hostname: kubernetes-example.com.
104```
105
106### AWS L7 ELB with SSL Termination
107
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400108Annotate the controller as shown in the [nginx-ingress l7 patch](https://github.com/kubernetes/ingress-nginx/blob/ab3a789caae65eec4ad6e3b46b19750b481b6bce/deploy/aws/l7/service-l7.yaml):
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +0400109
110```yaml
111controller:
112 service:
113 targetPorts:
114 http: http
115 https: http
116 annotations:
117 service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:XX-XXXX-X:XXXXXXXXX:certificate/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX
118 service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
119 service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
120 service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: '3600'
121```
122
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +0400123### Additional Internal Load Balancer
124
125This setup is useful when you need both external and internal load balancers but don't want to have multiple ingress controllers and multiple ingress objects per application.
126
127By default, the ingress object will point to the external load balancer address, but if correctly configured, you can make use of the internal one if the URL you are looking up resolves to the internal load balancer's URL.
128
129You'll need to set both the following values:
130
131`controller.service.internal.enabled`
132`controller.service.internal.annotations`
133
134If one of them is missing the internal load balancer will not be deployed. Example you may have `controller.service.internal.enabled=true` but no annotations set, in this case no action will be taken.
135
136`controller.service.internal.annotations` varies with the cloud service you're using.
137
138Example for AWS:
139
140```yaml
141controller:
142 service:
143 internal:
144 enabled: true
145 annotations:
146 # Create internal ELB
147 service.beta.kubernetes.io/aws-load-balancer-internal: "true"
148 # Any other annotation can be declared here.
149```
150
151Example for GCE:
152
153```yaml
154controller:
155 service:
156 internal:
157 enabled: true
158 annotations:
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400159 # Create internal LB. More information: https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +0400160 # For GKE versions 1.17 and later
161 networking.gke.io/load-balancer-type: "Internal"
162 # For earlier versions
163 # cloud.google.com/load-balancer-type: "Internal"
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400164
165 # Any other annotation can be declared here.
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +0400166```
167
168Example for Azure:
169
170```yaml
171controller:
172 service:
173 annotations:
174 # Create internal LB
175 service.beta.kubernetes.io/azure-load-balancer-internal: "true"
176 # Any other annotation can be declared here.
177```
178
179Example for Oracle Cloud Infrastructure:
180
181```yaml
182controller:
183 service:
184 annotations:
185 # Create internal LB
186 service.beta.kubernetes.io/oci-load-balancer-internal: "true"
187 # Any other annotation can be declared here.
188```
189
190An use case for this scenario is having a split-view DNS setup where the public zone CNAME records point to the external balancer URL while the private zone CNAME records point to the internal balancer URL. This way, you only need one ingress kubernetes object.
191
192Optionally you can set `controller.service.loadBalancerIP` if you need a static IP for the resulting `LoadBalancer`.
193
194### Ingress Admission Webhooks
195
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400196With nginx-ingress-controller version 0.25+, the Ingress-Nginx Controller pod exposes an endpoint that will integrate with the `validatingwebhookconfiguration` Kubernetes feature to prevent bad ingress from being added to the cluster.
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +0400197**This feature is enabled by default since 0.31.0.**
198
199With nginx-ingress-controller in 0.25.* work only with kubernetes 1.14+, 0.26 fix [this issue](https://github.com/kubernetes/ingress-nginx/pull/4521)
200
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400201#### How the Chart Configures the Hooks
202A validating and configuration requires the endpoint to which the request is sent to use TLS. It is possible to set up custom certificates to do this, but in most cases, a self-signed certificate is enough. The setup of this component requires some more complex orchestration when using helm. The steps are created to be idempotent and to allow turning the feature on and off without running into helm quirks.
203
2041. A pre-install hook provisions a certificate into the same namespace using a format compatible with provisioning using end user certificates. If the certificate already exists, the hook exits.
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +04002052. The Ingress-Nginx Controller pod is configured to use a TLS proxy container, which will load that certificate.
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +04002063. Validating and Mutating webhook configurations are created in the cluster.
2074. A post-install hook reads the CA from the secret created by step 1 and patches the Validating and Mutating webhook configurations. This process will allow a custom CA provisioned by some other process to also be patched into the webhook configurations. The chosen failure policy is also patched into the webhook configurations
208
209#### Alternatives
210It should be possible to use [cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) if a more complete solution is required.
211
212You can enable automatic self-signed TLS certificate provisioning via cert-manager by setting the `controller.admissionWebhooks.certManager.enabled` value to true.
213
214Please ensure that cert-manager is correctly installed and configured.
215
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +0400216### Helm Error When Upgrading: spec.clusterIP: Invalid value: ""
217
218If you are upgrading this chart from a version between 0.31.0 and 1.2.2 then you may get an error like this:
219
220```console
221Error: UPGRADE FAILED: Service "?????-controller" is invalid: spec.clusterIP: Invalid value: "": field is immutable
222```
223
224Detail of how and why are in [this issue](https://github.com/helm/charts/pull/13646) but to resolve this you can set `xxxx.service.omitClusterIP` to `true` where `xxxx` is the service referenced in the error.
225
226As of version `1.26.0` of this chart, by simply not providing any clusterIP value, `invalid: spec.clusterIP: Invalid value: "": field is immutable` will no longer occur since `clusterIP: ""` will not be rendered.
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400227
228## Values
229
230| Key | Type | Default | Description |
231|-----|------|---------|-------------|
232| commonLabels | object | `{}` | |
233| controller.addHeaders | object | `{}` | Will add custom headers before sending response traffic to the client according to: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#add-headers |
234| controller.admissionWebhooks.annotations | object | `{}` | |
235| controller.admissionWebhooks.certManager.admissionCert.duration | string | `""` | |
236| controller.admissionWebhooks.certManager.enabled | bool | `false` | |
237| controller.admissionWebhooks.certManager.rootCert.duration | string | `""` | |
238| controller.admissionWebhooks.certificate | string | `"/usr/local/certificates/cert"` | |
239| controller.admissionWebhooks.createSecretJob.resources | object | `{}` | |
240| controller.admissionWebhooks.createSecretJob.securityContext.allowPrivilegeEscalation | bool | `false` | |
241| controller.admissionWebhooks.enabled | bool | `true` | |
242| controller.admissionWebhooks.existingPsp | string | `""` | Use an existing PSP instead of creating one |
243| controller.admissionWebhooks.extraEnvs | list | `[]` | Additional environment variables to set |
244| controller.admissionWebhooks.failurePolicy | string | `"Fail"` | Admission Webhook failure policy to use |
245| controller.admissionWebhooks.key | string | `"/usr/local/certificates/key"` | |
246| controller.admissionWebhooks.labels | object | `{}` | Labels to be added to admission webhooks |
247| controller.admissionWebhooks.namespaceSelector | object | `{}` | |
248| controller.admissionWebhooks.networkPolicyEnabled | bool | `false` | |
249| controller.admissionWebhooks.objectSelector | object | `{}` | |
250| controller.admissionWebhooks.patch.enabled | bool | `true` | |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400251| controller.admissionWebhooks.patch.image.digest | string | `"sha256:543c40fd093964bc9ab509d3e791f9989963021f1e9e4c9c7b6700b02bfb227b"` | |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400252| controller.admissionWebhooks.patch.image.image | string | `"ingress-nginx/kube-webhook-certgen"` | |
253| controller.admissionWebhooks.patch.image.pullPolicy | string | `"IfNotPresent"` | |
254| controller.admissionWebhooks.patch.image.registry | string | `"registry.k8s.io"` | |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400255| controller.admissionWebhooks.patch.image.tag | string | `"v20230407"` | |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400256| controller.admissionWebhooks.patch.labels | object | `{}` | Labels to be added to patch job resources |
257| controller.admissionWebhooks.patch.nodeSelector."kubernetes.io/os" | string | `"linux"` | |
258| controller.admissionWebhooks.patch.podAnnotations | object | `{}` | |
259| controller.admissionWebhooks.patch.priorityClassName | string | `""` | Provide a priority class name to the webhook patching job # |
260| controller.admissionWebhooks.patch.securityContext.fsGroup | int | `2000` | |
261| controller.admissionWebhooks.patch.securityContext.runAsNonRoot | bool | `true` | |
262| controller.admissionWebhooks.patch.securityContext.runAsUser | int | `2000` | |
263| controller.admissionWebhooks.patch.tolerations | list | `[]` | |
264| controller.admissionWebhooks.patchWebhookJob.resources | object | `{}` | |
265| controller.admissionWebhooks.patchWebhookJob.securityContext.allowPrivilegeEscalation | bool | `false` | |
266| controller.admissionWebhooks.port | int | `8443` | |
267| controller.admissionWebhooks.service.annotations | object | `{}` | |
268| controller.admissionWebhooks.service.externalIPs | list | `[]` | |
269| controller.admissionWebhooks.service.loadBalancerSourceRanges | list | `[]` | |
270| controller.admissionWebhooks.service.servicePort | int | `443` | |
271| controller.admissionWebhooks.service.type | string | `"ClusterIP"` | |
272| controller.affinity | object | `{}` | Affinity and anti-affinity rules for server scheduling to nodes # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity # |
273| controller.allowSnippetAnnotations | bool | `true` | This configuration defines if Ingress Controller should allow users to set their own *-snippet annotations, otherwise this is forbidden / dropped when users add those annotations. Global snippets in ConfigMap are still respected |
274| controller.annotations | object | `{}` | Annotations to be added to the controller Deployment or DaemonSet # |
275| controller.autoscaling.annotations | object | `{}` | |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400276| controller.autoscaling.behavior | object | `{}` | |
277| controller.autoscaling.enabled | bool | `false` | |
278| controller.autoscaling.maxReplicas | int | `11` | |
279| controller.autoscaling.minReplicas | int | `1` | |
280| controller.autoscaling.targetCPUUtilizationPercentage | int | `50` | |
281| controller.autoscaling.targetMemoryUtilizationPercentage | int | `50` | |
282| controller.autoscalingTemplate | list | `[]` | |
283| controller.config | object | `{}` | Will add custom configuration options to Nginx https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/ |
284| controller.configAnnotations | object | `{}` | Annotations to be added to the controller config configuration configmap. |
285| controller.configMapNamespace | string | `""` | Allows customization of the configmap / nginx-configmap namespace; defaults to $(POD_NAMESPACE) |
286| controller.containerName | string | `"controller"` | Configures the controller container name |
287| controller.containerPort | object | `{"http":80,"https":443}` | Configures the ports that the nginx-controller listens on |
288| controller.customTemplate.configMapKey | string | `""` | |
289| controller.customTemplate.configMapName | string | `""` | |
290| controller.dnsConfig | object | `{}` | Optionally customize the pod dnsConfig. |
291| controller.dnsPolicy | string | `"ClusterFirst"` | Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. |
292| controller.electionID | string | `""` | Election ID to use for status update, by default it uses the controller name combined with a suffix of 'leader' |
293| controller.enableMimalloc | bool | `true` | Enable mimalloc as a drop-in replacement for malloc. # ref: https://github.com/microsoft/mimalloc # |
294| controller.enableTopologyAwareRouting | bool | `false` | This configuration enables Topology Aware Routing feature, used together with service annotation service.kubernetes.io/topology-aware-hints="auto" Defaults to false |
295| controller.existingPsp | string | `""` | Use an existing PSP instead of creating one |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400296| controller.extraArgs | object | `{}` | Additional command line arguments to pass to Ingress-Nginx Controller E.g. to specify the default SSL certificate you can use |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400297| controller.extraContainers | list | `[]` | Additional containers to be added to the controller pod. See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example. |
298| controller.extraEnvs | list | `[]` | Additional environment variables to set |
299| controller.extraInitContainers | list | `[]` | Containers, which are run before the app containers are started. |
300| controller.extraModules | list | `[]` | Modules, which are mounted into the core nginx image. See values.yaml for a sample to add opentelemetry module |
301| controller.extraVolumeMounts | list | `[]` | Additional volumeMounts to the controller main container. |
302| controller.extraVolumes | list | `[]` | Additional volumes to the controller pod. |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400303| controller.healthCheckHost | string | `""` | Address to bind the health check endpoint. It is better to set this option to the internal node address if the Ingress-Nginx Controller is running in the `hostNetwork: true` mode. |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400304| controller.healthCheckPath | string | `"/healthz"` | Path of the health check endpoint. All requests received on the port defined by the healthz-port parameter are forwarded internally to this path. |
305| controller.hostNetwork | bool | `false` | Required for use with CNI based kubernetes installations (such as ones set up by kubeadm), since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 is merged |
306| controller.hostPort.enabled | bool | `false` | Enable 'hostPort' or not |
307| controller.hostPort.ports.http | int | `80` | 'hostPort' http port |
308| controller.hostPort.ports.https | int | `443` | 'hostPort' https port |
309| controller.hostname | object | `{}` | Optionally customize the pod hostname. |
310| controller.image.allowPrivilegeEscalation | bool | `true` | |
311| controller.image.chroot | bool | `false` | |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400312| controller.image.digest | string | `"sha256:744ae2afd433a395eeb13dc03d3313facba92e96ad71d9feaafc85925493fee3"` | |
313| controller.image.digestChroot | string | `"sha256:a45e41cd2b7670adf829759878f512d4208d0aec1869dae593a0fecd09a5e49e"` | |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400314| controller.image.image | string | `"ingress-nginx/controller"` | |
315| controller.image.pullPolicy | string | `"IfNotPresent"` | |
316| controller.image.registry | string | `"registry.k8s.io"` | |
317| controller.image.runAsUser | int | `101` | |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400318| controller.image.tag | string | `"v1.8.0"` | |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400319| controller.ingressClass | string | `"nginx"` | For backwards compatibility with ingress.class annotation, use ingressClass. Algorithm is as follows, first ingressClassName is considered, if not present, controller looks for ingress.class annotation |
320| controller.ingressClassByName | bool | `false` | Process IngressClass per name (additionally as per spec.controller). |
321| controller.ingressClassResource.controllerValue | string | `"k8s.io/ingress-nginx"` | Controller-value of the controller that is processing this ingressClass |
322| controller.ingressClassResource.default | bool | `false` | Is this the default ingressClass for the cluster |
323| controller.ingressClassResource.enabled | bool | `true` | Is this ingressClass enabled or not |
324| controller.ingressClassResource.name | string | `"nginx"` | Name of the ingressClass |
325| controller.ingressClassResource.parameters | object | `{}` | Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. |
326| controller.keda.apiVersion | string | `"keda.sh/v1alpha1"` | |
327| controller.keda.behavior | object | `{}` | |
328| controller.keda.cooldownPeriod | int | `300` | |
329| controller.keda.enabled | bool | `false` | |
330| controller.keda.maxReplicas | int | `11` | |
331| controller.keda.minReplicas | int | `1` | |
332| controller.keda.pollingInterval | int | `30` | |
333| controller.keda.restoreToOriginalReplicaCount | bool | `false` | |
334| controller.keda.scaledObject.annotations | object | `{}` | |
335| controller.keda.triggers | list | `[]` | |
336| controller.kind | string | `"Deployment"` | Use a `DaemonSet` or `Deployment` |
337| controller.labels | object | `{}` | Labels to be added to the controller Deployment or DaemonSet and other resources that do not have option to specify labels # |
338| controller.lifecycle | object | `{"preStop":{"exec":{"command":["/wait-shutdown"]}}}` | Improve connection draining when ingress controller pod is deleted using a lifecycle hook: With this new hook, we increased the default terminationGracePeriodSeconds from 30 seconds to 300, allowing the draining of connections up to five minutes. If the active connections end before that, the pod will terminate gracefully at that time. To effectively take advantage of this feature, the Configmap feature worker-shutdown-timeout new value is 240s instead of 10s. # |
339| controller.livenessProbe.failureThreshold | int | `5` | |
340| controller.livenessProbe.httpGet.path | string | `"/healthz"` | |
341| controller.livenessProbe.httpGet.port | int | `10254` | |
342| controller.livenessProbe.httpGet.scheme | string | `"HTTP"` | |
343| controller.livenessProbe.initialDelaySeconds | int | `10` | |
344| controller.livenessProbe.periodSeconds | int | `10` | |
345| controller.livenessProbe.successThreshold | int | `1` | |
346| controller.livenessProbe.timeoutSeconds | int | `1` | |
347| controller.maxmindLicenseKey | string | `""` | Maxmind license key to download GeoLite2 Databases. # https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases |
348| controller.metrics.enabled | bool | `false` | |
349| controller.metrics.port | int | `10254` | |
350| controller.metrics.portName | string | `"metrics"` | |
351| controller.metrics.prometheusRule.additionalLabels | object | `{}` | |
352| controller.metrics.prometheusRule.enabled | bool | `false` | |
353| controller.metrics.prometheusRule.rules | list | `[]` | |
354| controller.metrics.service.annotations | object | `{}` | |
355| controller.metrics.service.externalIPs | list | `[]` | List of IP addresses at which the stats-exporter service is available # Ref: https://kubernetes.io/docs/user-guide/services/#external-ips # |
356| controller.metrics.service.labels | object | `{}` | Labels to be added to the metrics service resource |
357| controller.metrics.service.loadBalancerSourceRanges | list | `[]` | |
358| controller.metrics.service.servicePort | int | `10254` | |
359| controller.metrics.service.type | string | `"ClusterIP"` | |
360| controller.metrics.serviceMonitor.additionalLabels | object | `{}` | |
361| controller.metrics.serviceMonitor.enabled | bool | `false` | |
362| controller.metrics.serviceMonitor.metricRelabelings | list | `[]` | |
363| controller.metrics.serviceMonitor.namespace | string | `""` | |
364| controller.metrics.serviceMonitor.namespaceSelector | object | `{}` | |
365| controller.metrics.serviceMonitor.relabelings | list | `[]` | |
366| controller.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | |
367| controller.metrics.serviceMonitor.targetLabels | list | `[]` | |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400368| controller.minAvailable | int | `1` | Minimum available pods set in PodDisruptionBudget. Define either 'minAvailable' or 'maxUnavailable', never both. |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400369| controller.minReadySeconds | int | `0` | `minReadySeconds` to avoid killing pods before we are ready # |
370| controller.name | string | `"controller"` | |
371| controller.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for controller pod assignment # Ref: https://kubernetes.io/docs/user-guide/node-selection/ # |
372| controller.opentelemetry.containerSecurityContext.allowPrivilegeEscalation | bool | `false` | |
373| controller.opentelemetry.enabled | bool | `false` | |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400374| controller.opentelemetry.image | string | `"registry.k8s.io/ingress-nginx/opentelemetry:v20230527@sha256:fd7ec835f31b7b37187238eb4fdad4438806e69f413a203796263131f4f02ed0"` | |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400375| controller.podAnnotations | object | `{}` | Annotations to be added to controller pods # |
376| controller.podLabels | object | `{}` | Labels to add to the pod container metadata |
377| controller.podSecurityContext | object | `{}` | Security Context policies for controller pods |
378| controller.priorityClassName | string | `""` | |
379| controller.proxySetHeaders | object | `{}` | Will add custom headers before sending traffic to backends according to https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/custom-headers |
380| controller.publishService | object | `{"enabled":true,"pathOverride":""}` | Allows customization of the source of the IP address or FQDN to report in the ingress status field. By default, it reads the information provided by the service. If disable, the status field reports the IP address of the node or nodes where an ingress controller pod is running. |
381| controller.publishService.enabled | bool | `true` | Enable 'publishService' or not |
382| controller.publishService.pathOverride | string | `""` | Allows overriding of the publish service to bind to Must be <namespace>/<service_name> |
383| controller.readinessProbe.failureThreshold | int | `3` | |
384| controller.readinessProbe.httpGet.path | string | `"/healthz"` | |
385| controller.readinessProbe.httpGet.port | int | `10254` | |
386| controller.readinessProbe.httpGet.scheme | string | `"HTTP"` | |
387| controller.readinessProbe.initialDelaySeconds | int | `10` | |
388| controller.readinessProbe.periodSeconds | int | `10` | |
389| controller.readinessProbe.successThreshold | int | `1` | |
390| controller.readinessProbe.timeoutSeconds | int | `1` | |
391| controller.replicaCount | int | `1` | |
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +0400392| controller.reportNodeInternalIp | bool | `false` | Bare-metal considerations via the host network https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network Ingress status was blank because there is no Service exposing the Ingress-Nginx Controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400393| controller.resources.requests.cpu | string | `"100m"` | |
394| controller.resources.requests.memory | string | `"90Mi"` | |
395| controller.scope.enabled | bool | `false` | Enable 'scope' or not |
396| controller.scope.namespace | string | `""` | Namespace to limit the controller to; defaults to $(POD_NAMESPACE) |
397| controller.scope.namespaceSelector | string | `""` | When scope.enabled == false, instead of watching all namespaces, we watching namespaces whose labels only match with namespaceSelector. Format like foo=bar. Defaults to empty, means watching all namespaces. |
398| controller.service.annotations | object | `{}` | |
399| controller.service.appProtocol | bool | `true` | If enabled is adding an appProtocol option for Kubernetes service. An appProtocol field replacing annotations that were using for setting a backend protocol. Here is an example for AWS: service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http It allows choosing the protocol for each backend specified in the Kubernetes service. See the following GitHub issue for more details about the purpose: https://github.com/kubernetes/kubernetes/issues/40244 Will be ignored for Kubernetes versions older than 1.20 # |
400| controller.service.enableHttp | bool | `true` | |
401| controller.service.enableHttps | bool | `true` | |
402| controller.service.enabled | bool | `true` | |
403| controller.service.external.enabled | bool | `true` | |
404| controller.service.externalIPs | list | `[]` | List of IP addresses at which the controller services are available # Ref: https://kubernetes.io/docs/user-guide/services/#external-ips # |
405| controller.service.internal.annotations | object | `{}` | Annotations are mandatory for the load balancer to come up. Varies with the cloud service. |
406| controller.service.internal.enabled | bool | `false` | Enables an additional internal load balancer (besides the external one). |
407| controller.service.internal.loadBalancerSourceRanges | list | `[]` | Restrict access For LoadBalancer service. Defaults to 0.0.0.0/0. |
408| controller.service.internal.ports | object | `{}` | Custom port mapping for internal service |
409| controller.service.internal.targetPorts | object | `{}` | Custom target port mapping for internal service |
410| controller.service.ipFamilies | list | `["IPv4"]` | List of IP families (e.g. IPv4, IPv6) assigned to the service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/ |
411| controller.service.ipFamilyPolicy | string | `"SingleStack"` | Represents the dual-stack-ness requested or required by this Service. Possible values are SingleStack, PreferDualStack or RequireDualStack. The ipFamilies and clusterIPs fields depend on the value of this field. # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/ |
412| controller.service.labels | object | `{}` | |
413| controller.service.loadBalancerIP | string | `""` | Used by cloud providers to connect the resulting `LoadBalancer` to a pre-existing static IP according to https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer |
414| controller.service.loadBalancerSourceRanges | list | `[]` | |
415| controller.service.nodePorts.http | string | `""` | |
416| controller.service.nodePorts.https | string | `""` | |
417| controller.service.nodePorts.tcp | object | `{}` | |
418| controller.service.nodePorts.udp | object | `{}` | |
419| controller.service.ports.http | int | `80` | |
420| controller.service.ports.https | int | `443` | |
421| controller.service.targetPorts.http | string | `"http"` | |
422| controller.service.targetPorts.https | string | `"https"` | |
423| controller.service.type | string | `"LoadBalancer"` | |
424| controller.shareProcessNamespace | bool | `false` | |
425| controller.sysctls | object | `{}` | See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for notes on enabling and using sysctls |
426| controller.tcp.annotations | object | `{}` | Annotations to be added to the tcp config configmap |
427| controller.tcp.configMapNamespace | string | `""` | Allows customization of the tcp-services-configmap; defaults to $(POD_NAMESPACE) |
428| controller.terminationGracePeriodSeconds | int | `300` | `terminationGracePeriodSeconds` to avoid killing pods before we are ready # wait up to five minutes for the drain of connections # |
429| controller.tolerations | list | `[]` | Node tolerations for server scheduling to nodes with taints # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # |
430| controller.topologySpreadConstraints | list | `[]` | Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in. # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ # |
431| controller.udp.annotations | object | `{}` | Annotations to be added to the udp config configmap |
432| controller.udp.configMapNamespace | string | `""` | Allows customization of the udp-services-configmap; defaults to $(POD_NAMESPACE) |
433| controller.updateStrategy | object | `{}` | The update strategy to apply to the Deployment or DaemonSet # |
434| controller.watchIngressWithoutClass | bool | `false` | Process Ingress objects without ingressClass annotation/ingressClassName field Overrides value for --watch-ingress-without-class flag of the controller binary Defaults to false |
435| defaultBackend.affinity | object | `{}` | |
436| defaultBackend.autoscaling.annotations | object | `{}` | |
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +0400437| defaultBackend.autoscaling.enabled | bool | `false` | |
438| defaultBackend.autoscaling.maxReplicas | int | `2` | |
439| defaultBackend.autoscaling.minReplicas | int | `1` | |
440| defaultBackend.autoscaling.targetCPUUtilizationPercentage | int | `50` | |
441| defaultBackend.autoscaling.targetMemoryUtilizationPercentage | int | `50` | |
442| defaultBackend.containerSecurityContext | object | `{}` | Security Context policies for controller main container. See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for notes on enabling and using sysctls # |
443| defaultBackend.enabled | bool | `false` | |
444| defaultBackend.existingPsp | string | `""` | Use an existing PSP instead of creating one |
445| defaultBackend.extraArgs | object | `{}` | |
446| defaultBackend.extraEnvs | list | `[]` | Additional environment variables to set for defaultBackend pods |
447| defaultBackend.extraVolumeMounts | list | `[]` | |
448| defaultBackend.extraVolumes | list | `[]` | |
449| defaultBackend.image.allowPrivilegeEscalation | bool | `false` | |
450| defaultBackend.image.image | string | `"defaultbackend-amd64"` | |
451| defaultBackend.image.pullPolicy | string | `"IfNotPresent"` | |
452| defaultBackend.image.readOnlyRootFilesystem | bool | `true` | |
453| defaultBackend.image.registry | string | `"registry.k8s.io"` | |
454| defaultBackend.image.runAsNonRoot | bool | `true` | |
455| defaultBackend.image.runAsUser | int | `65534` | |
456| defaultBackend.image.tag | string | `"1.5"` | |
457| defaultBackend.labels | object | `{}` | Labels to be added to the default backend resources |
458| defaultBackend.livenessProbe.failureThreshold | int | `3` | |
459| defaultBackend.livenessProbe.initialDelaySeconds | int | `30` | |
460| defaultBackend.livenessProbe.periodSeconds | int | `10` | |
461| defaultBackend.livenessProbe.successThreshold | int | `1` | |
462| defaultBackend.livenessProbe.timeoutSeconds | int | `5` | |
463| defaultBackend.minAvailable | int | `1` | |
464| defaultBackend.minReadySeconds | int | `0` | `minReadySeconds` to avoid killing pods before we are ready # |
465| defaultBackend.name | string | `"defaultbackend"` | |
466| defaultBackend.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for default backend pod assignment # Ref: https://kubernetes.io/docs/user-guide/node-selection/ # |
467| defaultBackend.podAnnotations | object | `{}` | Annotations to be added to default backend pods # |
468| defaultBackend.podLabels | object | `{}` | Labels to add to the pod container metadata |
469| defaultBackend.podSecurityContext | object | `{}` | Security Context policies for controller pods See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for notes on enabling and using sysctls # |
470| defaultBackend.port | int | `8080` | |
471| defaultBackend.priorityClassName | string | `""` | |
472| defaultBackend.readinessProbe.failureThreshold | int | `6` | |
473| defaultBackend.readinessProbe.initialDelaySeconds | int | `0` | |
474| defaultBackend.readinessProbe.periodSeconds | int | `5` | |
475| defaultBackend.readinessProbe.successThreshold | int | `1` | |
476| defaultBackend.readinessProbe.timeoutSeconds | int | `5` | |
477| defaultBackend.replicaCount | int | `1` | |
478| defaultBackend.resources | object | `{}` | |
479| defaultBackend.service.annotations | object | `{}` | |
480| defaultBackend.service.externalIPs | list | `[]` | List of IP addresses at which the default backend service is available # Ref: https://kubernetes.io/docs/user-guide/services/#external-ips # |
481| defaultBackend.service.loadBalancerSourceRanges | list | `[]` | |
482| defaultBackend.service.servicePort | int | `80` | |
483| defaultBackend.service.type | string | `"ClusterIP"` | |
484| defaultBackend.serviceAccount.automountServiceAccountToken | bool | `true` | |
485| defaultBackend.serviceAccount.create | bool | `true` | |
486| defaultBackend.serviceAccount.name | string | `""` | |
487| defaultBackend.tolerations | list | `[]` | Node tolerations for server scheduling to nodes with taints # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # |
488| defaultBackend.updateStrategy | object | `{}` | The update strategy to apply to the Deployment or DaemonSet # |
489| dhParam | string | `""` | A base64-encoded Diffie-Hellman parameter. This can be generated with: `openssl dhparam 4096 2> /dev/null | base64` # Ref: https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/ssl-dh-param |
490| imagePullSecrets | list | `[]` | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
491| podSecurityPolicy.enabled | bool | `false` | |
492| portNamePrefix | string | `""` | Prefix for TCP and UDP ports names in ingress controller service # Some cloud providers, like Yandex Cloud may have a requirements for a port name regex to support cloud load balancer integration |
493| rbac.create | bool | `true` | |
494| rbac.scope | bool | `false` | |
495| revisionHistoryLimit | int | `10` | Rollback limit # |
496| serviceAccount.annotations | object | `{}` | Annotations for the controller service account |
497| serviceAccount.automountServiceAccountToken | bool | `true` | |
498| serviceAccount.create | bool | `true` | |
499| serviceAccount.name | string | `""` | |
500| tcp | object | `{}` | TCP service key-value pairs # Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md # |
501| udp | object | `{}` | UDP service key-value pairs # Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md # |