Increase Log Verbosity of OpenShift Ingress Operator Router Container

Solution Verified - Updated

Environment

Red Hat Openshift Platform 4.12
Red Hat Openshift Platform 4.14

Issue

Requiring increase log verbosity on Openshift Ingress Operator routers. This can be required for debugging/observability purposes.

Currently no configurable fields or environment variables to increase log verbosity that is permanent or maintainable.

Resolution

We have to directly edit the deployment of the openshift-router container and set a -v flag. Unfortunately, it will not persist after a restart nor upgrades/updates. This is not a supportable permanent configuration.
As the Ingress Operator currently does not reconcile new commands added to the router container in the router deployment, you can override the container's entrypoint while including a higher verbosity flag.

oc -n openshift-ingress patch deploy/router-default --type=strategic --patch='{"spec":{"template":{"spec":{"containers":[{"name":"router","command":["/usr/bin/openshift-router","--v=10"]}]}}}}'

Note: this causes the router deployment to rollout.

Root Cause

Currently there is a public open enhancement to add this feature in a supportable way:

Diagnostic Steps

Validate the current log level of a openshift-ingress router:

oc rsh -n openshift-ingress router-default-123bac1234-a12a1
sh-4.4$ ps -ef |grep router
1000111+       1       0  0 02:58 ?        00:00:14 /usr/bin/openshift-router --v=2		#<--- Level 2
SBR
Components

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.