The way NGINX Ingress Controller is built is that there are validations for most configuration options.
If itâs something from a CRD, those values have a type, format, minimum, if itâs an integer, so kubernetes will reject the update.
If itâs an annotation thatâs not in the list, kubernetes will add it to the resource, but NIC wonât pick up the configuration. If itâs an invalid value for an annotation (they will be strings always), NIC will sometimes do validation, depending on the annotation itself, but if itâs freeform, itâs passed onto the NGINX configuration.
For snippets (location, http, server, etc), NIC doesnât do any validation, and will pass on the field into the configuration file.
There are a few configuration options that NIC does extra validation on, the proxy buffer configurations as an example, but apart from the above, NGINX will throw an error if the created configuration file is off, and will refuse to start.
NIC does not terminate the already running pods until the new ones are healthy, so a good rule of thumb is that if the new ones are unhealthy, look at the logs first, and see what issues NGINX is having.
Thereâs also a wider project for configuration safety that weâre working on to make it hard for folks to end up in an invalid state.
NIC currently doesnât have a hardening guide itself, but that is an excellent resource. It comes up fairly often for NGINX core, so weâll be looking into creating one for NIC as well.
The CIS benchmark recommendations for the community ingress would also apply to NIC as well.