Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2032289

Summary: Dynamic Plugin Proxy cannot be set up from a go operator
Product: OpenShift Container Platform Reporter: Joel Takvorian <jtakvori>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.9CC: aos-bugs, spadgett, yanpzhan
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-04 11:28:44 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:
Embargoed:

Description Joel Takvorian 2021-12-14 10:51:59 UTC
Description of problem:

We develop a console dynamic plugin for our network observability operator: https://github.com/netobserv/network-observability-operator/

When using go to generate the ConsolePlugin object via the openshit-api, some optional fields such as CACertificate and Authorize are always viewed as present even when omitted, which triggers their validation (especially the CAcert string is validated despite being empty/unset), resulting in a failure while creating the ConsolePlugin resource.

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

4.10-ci

How reproducible:

Always

Steps to Reproduce:
1. Checkout this pull request: https://github.com/netobserv/network-observability-operator/pull/37
2. Run "make test"

Actual results:

"2021-12-14T10:44:52.492Z	ERROR	controller-runtime.manager.controller.flowcollector	Reconciler error	{"reconciler group": "flows.netobserv.io", "reconciler kind": "FlowCollector", "name": "cluster", "namespace": "", "error": "ConsolePlugin.console.openshift.io \"network-observability-plugin\" is invalid: spec.proxy.services.caCertificate: Invalid value: \"\": spec.proxy.services.caCertificate in body should match '^-----BEGIN CERTIFICATE-----([\\s\\S]*)-----END CERTIFICATE-----\\s?$'"}"

Expected results:

ConsolePlugin resource correctly created, tests pass

Additional info:

"omitempty" flag is missing in the API defs (I'll open a PR)

Comment 5 Jakub Hadvig 2022-09-21 14:16:01 UTC
The fix PR got merged during 4.10 development process

Comment 7 Yanping Zhang 2022-09-28 10:23:51 UTC
Launch ocp 4.10 cluster with payload 4.10.0-0.nightly-2022-09-27-142915, oc login the cluster, then run steps:
#git clone git:netobserv/network-observability-operator.git
#cd network-observability-operator/
#make test
The test passed, see details in http://pastebin.test.redhat.com/1075448

@Joel, I'm not sure if the verification steps are correct, could you help to confirm? Thanks!

Comment 8 Joel Takvorian 2022-09-28 16:39:06 UTC
Yes @yanpzhan this is correct, and we don't see this issue anymore

Comment 9 Yanping Zhang 2022-09-29 00:08:14 UTC
Thanks, Joel!
So the bug is fixed, move it to Verified.

Comment 11 errata-xmlrpc 2022-10-04 11:28:44 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 (OpenShift Container Platform 4.10.35 bug fix 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/RHBA-2022:6728