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.