Description of problem: When an IngressController specifies a namespace selector, the router pod prints a log message indicating that it will filter namespaces using that selector. However, the log output does not print the label selector correctly. Version-Release number of selected component (if applicable): 4.6.0-0.ci-2020-08-06-061328 Most likely introduced in 4.3 by https://github.com/openshift/router/pull/47/commits/dc68ebfcbd9fdc600391ebe050228534dd2b07c3. How reproducible: Consistently. Steps to Reproduce: 1. Launch a 4.6 cluster. 2. On the cluster created in Step 1, create a new IngressController that specifies spec.namespaceSelector: oc apply -f - <<'EOF' apiVersion: operator.openshift.io/v1 kind: IngressController metadata: name: namespace-selector namespace: openshift-ingress-operator spec: replicas: 1 domain: xyz.com endpointPublishingStrategy: type: Private namespaceSelector: matchLabels: foo: bar EOF 3. Check the logs for a router pod for the IngressController created in Step 2: oc -n openshift-ingress logs -c router deployments/router-namespace-selector Actual results: The log output prints the label selector incorrectly: "msg"="router is only using routes in namespaces matching labels" "labels"=[{}] Expected results: The log output prints the label selector correctly: "msg"="router is only using routes in namespaces matching labels" "labels"="foo=bar"
Verified with 4.7.0-0.nightly-2020-11-11-220947 and issue has been fixed. # oc -n openshift-ingress logs router-default-87f6699c-5zsrx <---snip---> I1112 06:49:31.322770 1 router.go:254] router "msg"="router is only using routes in namespaces matching labels" "labels"="foo=bar"
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633