Bug 1959696

Summary: Deprecate 'ConsoleConfigRoute' struct in console-operator config
Product: OpenShift Container Platform Reporter: Jakub Hadvig <jhadvig>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: high Docs Contact:
Priority: high    
Version: 4.8CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:08:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jakub Hadvig 2021-05-12 06:44:09 UTC
Description of problem:
Since console team was addressing custom domain story in 4.8 release, thats enables admin user to set arbitrary domain for both 'console' and 'downloads' routes in the 'openshift-console' namespace. We should mark the 'ConsoleConfigRoute' struct in console-operator config, thats enabling admin user to set arbitrary domain just for 'console' route, as deprecated.
Console-operator should also notify when using deprecated 'route' field on it's config, by logging appropriate message.

Version-Release number of selected component (if applicable):

How reproducible:
Check 'ConsoleConfigRoute' struct in console-operator config API https://github.com/openshift/api/blob/master/operator/v1/types_console.go#L51

Steps to Reproduce:
1. Set the 'route' field on console-operator config
2. Check the console-operator logs for appropriate warning msg that the 'route' field is deprecated
3. Also check console-operator config API - https://github.com/openshift/api/blob/master/operator/v1/types_console.go#L51

Actual results:
Its not marked as deprecated and when admin user sets the 'route' field on the console-operator config no warning msg is surfaced in logs.

Expected results:
'ConsoleConfigRoute' struct in API should be marked as deprecated and when admin user sets the 'route' field on the console-operator config a warning msg is surfaced in logs.

Additional info:

Comment 2 Yanping Zhang 2021-05-18 03:46:28 UTC
Checked on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-05-17-121817.
Steps to verify:
1. Config "route" field in console operator config:
# oc patch console.operator cluster -p '{"spec":{"route":{"hostname": "custom-console-1.qe1.devcluster.openshift.com","secret":{"name": "custom-console-component"}}}}' --type merge
2. Check console-operator pod log, there is warning info about "Deprecated":
W0518 03:31:45.161125       1 controller.go:156] Deprecated: custom domain is being configured on console-operator config for the 'console' route.
Please remove that entry from console-operator config and instead configure ingress config spec with following custom domain entry for 'console' route:
  - name: console
    namespace: openshift-console
    hostname: custom-console-1.qe1.devcluster.openshift.com
      name: custom-console-component

The bug is fixed, so move it to verified.

Comment 5 errata-xmlrpc 2021-07-27 23:08:01 UTC
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.8.2 bug fix and security 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.