Skip to content

NETOBSERV-2767: remove Console CR config edition#2791

Open
jotak wants to merge 4 commits into
netobserv:mainfrom
jotak:remove-auto-patch
Open

NETOBSERV-2767: remove Console CR config edition#2791
jotak wants to merge 4 commits into
netobserv:mainfrom
jotak:remove-auto-patch

Conversation

@jotak
Copy link
Copy Markdown
Member

@jotak jotak commented Jun 2, 2026

Description

  • Deprecating field spec.consolePlugin.advanced.register (it's not used anymore)
  • Remove "auto-patch" code that edits the Console config for adding our plugins
  • Remove all permissions related to Console CR
  • Add the console patch command in our "make deploy" script

Dependencies

n/a

Checklist

  • Does the changes in PR need specific configuration or environment set up for testing?
    • if so please describe it in PR description.
  • I have added thorough unit tests for the change.
  • QE requirements (check 1 from the list):
    • Standard QE validation, with pre-merge tests unless stated otherwise.
    • Regression tests only (e.g. refactoring with no user-facing change).
    • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

Summary by CodeRabbit

  • Deprecations

    • The register field in FlowCollector.spec.consolePlugin is deprecated and no longer used; OpenShift now uses the Console plugins interface instead.
  • Improvements

    • Console plugins are now registered automatically via deployment patching.
    • Updated operator RBAC permissions for improved security posture.
  • Documentation

    • Updated FlowCollector reference documentation to reflect deprecated fields.

- Deprecating field `spec.consolePlugin.advanced.register` (it's not used
anymore)
- Remove "auto-patch" code that edits the Console config for adding our
  plugins
- Remove all permissions related to Console CR
- Add the console patch command in our "make deploy" script
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

openshift-ci-robot commented Jun 2, 2026

@jotak: This pull request references NETOBSERV-2767 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target either version "5.0." or "openshift-5.0.", but it targets "openshift-4.19.z" instead.

Details

In response to this:

Description

  • Deprecating field spec.consolePlugin.advanced.register (it's not used anymore)
  • Remove "auto-patch" code that edits the Console config for adding our plugins
  • Remove all permissions related to Console CR
  • Add the console patch command in our "make deploy" script

Dependencies

n/a

Checklist

  • Does the changes in PR need specific configuration or environment set up for testing?
    • if so please describe it in PR description.
  • I have added thorough unit tests for the change.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 2, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jpinsonneau for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Important

Review skipped

Too many files!

This PR contains 175 files, which is 25 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a5ba9494-81eb-490a-8d08-5d077c34980f

📥 Commits

Reviewing files that changed from the base of the PR and between b3db93e and 4660d69.

⛔ Files ignored due to path filters (5)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go is excluded by !**/zz_generated.deepcopy.go
  • vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go is excluded by !**/zz_generated.deepcopy.go
  • vendor/github.com/openshift/api/security/v1/generated.pb.go is excluded by !**/*.pb.go
  • vendor/github.com/openshift/api/security/v1/generated.protomessage.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (175)
  • Makefile
  • api/flowcollector/v1beta2/flowcollector_types.go
  • bundle/manifests/flows.netobserv.io_flowcollectors.yaml
  • config/crd/bases/flows.netobserv.io_flowcollectors.yaml
  • docs/FlowCollector.md
  • go.mod
  • helm/crds/flows.netobserv.io_flowcollectors.yaml
  • vendor/github.com/gogo/protobuf/AUTHORS
  • vendor/github.com/gogo/protobuf/CONTRIBUTORS
  • vendor/github.com/gogo/protobuf/LICENSE
  • vendor/github.com/gogo/protobuf/proto/Makefile
  • vendor/github.com/gogo/protobuf/proto/clone.go
  • vendor/github.com/gogo/protobuf/proto/custom_gogo.go
  • vendor/github.com/gogo/protobuf/proto/decode.go
  • vendor/github.com/gogo/protobuf/proto/deprecated.go
  • vendor/github.com/gogo/protobuf/proto/discard.go
  • vendor/github.com/gogo/protobuf/proto/duration.go
  • vendor/github.com/gogo/protobuf/proto/duration_gogo.go
  • vendor/github.com/gogo/protobuf/proto/encode.go
  • vendor/github.com/gogo/protobuf/proto/encode_gogo.go
  • vendor/github.com/gogo/protobuf/proto/equal.go
  • vendor/github.com/gogo/protobuf/proto/extensions.go
  • vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
  • vendor/github.com/gogo/protobuf/proto/lib.go
  • vendor/github.com/gogo/protobuf/proto/lib_gogo.go
  • vendor/github.com/gogo/protobuf/proto/message_set.go
  • vendor/github.com/gogo/protobuf/proto/pointer_reflect.go
  • vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go
  • vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go
  • vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go
  • vendor/github.com/gogo/protobuf/proto/properties.go
  • vendor/github.com/gogo/protobuf/proto/properties_gogo.go
  • vendor/github.com/gogo/protobuf/proto/skip_gogo.go
  • vendor/github.com/gogo/protobuf/proto/table_marshal.go
  • vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go
  • vendor/github.com/gogo/protobuf/proto/table_merge.go
  • vendor/github.com/gogo/protobuf/proto/table_unmarshal.go
  • vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go
  • vendor/github.com/gogo/protobuf/proto/text.go
  • vendor/github.com/gogo/protobuf/proto/text_gogo.go
  • vendor/github.com/gogo/protobuf/proto/text_parser.go
  • vendor/github.com/gogo/protobuf/proto/timestamp.go
  • vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go
  • vendor/github.com/gogo/protobuf/proto/wrappers.go
  • vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go
  • vendor/github.com/openshift/api/config/v1/register.go
  • vendor/github.com/openshift/api/config/v1/types.go
  • vendor/github.com/openshift/api/config/v1/types_apiserver.go
  • vendor/github.com/openshift/api/config/v1/types_authentication.go
  • vendor/github.com/openshift/api/config/v1/types_cluster_image_policy.go
  • vendor/github.com/openshift/api/config/v1/types_cluster_operator.go
  • vendor/github.com/openshift/api/config/v1/types_cluster_version.go
  • vendor/github.com/openshift/api/config/v1/types_dns.go
  • vendor/github.com/openshift/api/config/v1/types_feature.go
  • vendor/github.com/openshift/api/config/v1/types_image.go
  • vendor/github.com/openshift/api/config/v1/types_image_policy.go
  • vendor/github.com/openshift/api/config/v1/types_infrastructure.go
  • vendor/github.com/openshift/api/config/v1/types_ingress.go
  • vendor/github.com/openshift/api/config/v1/types_insights.go
  • vendor/github.com/openshift/api/config/v1/types_kmsencryption.go
  • vendor/github.com/openshift/api/config/v1/types_network.go
  • vendor/github.com/openshift/api/config/v1/types_node.go
  • vendor/github.com/openshift/api/config/v1/types_scheduling.go
  • vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusteroperators.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusterversions-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusterversions-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusterversions-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Hypershift-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Hypershift-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Hypershift-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-SelfManagedHA-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-SelfManagedHA-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_featuregates.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_images-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_images-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_images-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_images.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_ingresses.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_nodes-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-Hypershift.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-Default.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-OKD.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_openshift-controller-manager_01_builds.crd.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml
  • vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go
  • vendor/github.com/openshift/api/console/v1/types.go
  • vendor/github.com/openshift/api/console/v1/types_console_cli_download.go
  • vendor/github.com/openshift/api/console/v1/types_console_link.go
  • vendor/github.com/openshift/api/console/v1/types_console_plugin.go
  • vendor/github.com/openshift/api/console/v1/types_console_sample.go
  • vendor/github.com/openshift/api/console/v1/zz_generated.crd-manifests/00_consoleclidownloads.crd.yaml
  • vendor/github.com/openshift/api/console/v1/zz_generated.crd-manifests/00_consolelinks.crd.yaml
  • vendor/github.com/openshift/api/console/v1/zz_generated.crd-manifests/00_consolenotifications.crd.yaml
  • vendor/github.com/openshift/api/console/v1/zz_generated.crd-manifests/00_consolequickstarts.crd.yaml
  • vendor/github.com/openshift/api/console/v1/zz_generated.crd-manifests/00_consolesamples.crd.yaml
  • vendor/github.com/openshift/api/console/v1/zz_generated.crd-manifests/90_consoleplugins.crd.yaml
  • vendor/github.com/openshift/api/console/v1/zz_generated.featuregated-crd-manifests.yaml
  • vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go
  • vendor/github.com/openshift/api/operator/v1/types_console.go
  • vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go
  • vendor/github.com/openshift/api/operator/v1/types_etcd.go
  • vendor/github.com/openshift/api/operator/v1/types_ingress.go
  • vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go
  • vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go
  • vendor/github.com/openshift/api/operator/v1/types_network.go
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-OKD.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_20_kube-apiserver_01_kubeapiservers.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_console_01_consoles.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-Default.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-OKD.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-Default.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-OKD.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_70_dns_00_dnses.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-Default.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-OKD.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.featuregated-crd-manifests.yaml
  • vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go
  • vendor/github.com/openshift/api/security/v1/generated.proto
  • vendor/github.com/openshift/api/security/v1/types.go
  • vendor/github.com/openshift/api/security/v1/zz_generated.crd-manifests/0000_03_config-operator_01_securitycontextconstraints.crd.yaml
  • vendor/github.com/openshift/api/security/v1/zz_generated.featuregated-crd-manifests.yaml
  • vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go
  • vendor/modules.txt

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR replaces the operator's automatic console plugin registration with manual deployment. RBAC permissions shift from managing OpenShift consoles (with update capability) to reading networks (read-only). The auto-patch reconciliation logic is removed, and console plugin registration is now a manual kubectl patch operation in the deployment target. The register field is marked deprecated.

Changes

Console Plugin Registration Migration

Layer / File(s) Summary
RBAC permission shift from consoles to networks
internal/pkg/manager/manager.go, config/rbac/role.yaml, helm/templates/clusterrole.yaml, bundle/manifests/netobserv-operator.clusterserviceversion.yaml
RBAC rules are updated across manifests and source code. The operator no longer requires update permissions on consoles resources and instead reads networks resources.
Remove auto-patch console plugin registration logic
internal/controller/consoleplugin/consoleplugin_reconciler.go, internal/controller/consoleplugin/consoleplugin_static_reconciler.go
The checkAutoPatch helper method and its invocations in the reconcilers are removed. The operator no longer attempts to automatically patch the OpenShift Console Operator.
Manual console plugin deployment via kubectl patch
Makefile
The deploy target now includes a kubectl patch command that manually appends the netobserv-plugin and netobserv-plugin-static plugins to the OpenShift console operator spec.
Mark register field as deprecated
api/flowcollector/v1beta2/flowcollector_types.go, config/crd/bases/flows.netobserv.io_flowcollectors.yaml, bundle/manifests/flows.netobserv.io_flowcollectors.yaml, helm/crds/flows.netobserv.io_flowcollectors.yaml, docs/FlowCollector.md
The register field in FlowCollector.spec.consolePlugin is marked deprecated across all CRD definitions and user documentation.
Update tests and helper logic
internal/controller/flowcollector_controller_console_test.go, internal/pkg/helper/flowcollector.go
Test coverage for Console CR creation and registration behavior is removed. Helper functions no longer populate the register field.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing Console CR configuration edition functionality.
Description check ✅ Passed The description covers key changes (deprecating field, removing auto-patch code, removing Console permissions, adding deploy script patch) and QE requirements are selected, though unit tests checkbox remains unchecked.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@helm/crds/flows.netobserv.io_flowcollectors.yaml`:
- Around line 1633-1637: Remove the default value for the deprecated boolean
field so the API server no longer materializes it: edit the FlowCollector CRD
schema entry for spec.consolePlugin.advanced.register and delete the "default:
true" line (keep the field present for compatibility), then regenerate the CRD
output so the published flows.netobserv.io_flowcollectors.yaml no longer
contains that default.

In `@Makefile`:
- Line 421: The current kubectl JSON-patch that uses two "add" ops to append
plugins is not idempotent and fails when spec.plugins is absent; replace that
JSON-patch command with a single merge-style patch that sets spec.plugins to the
exact array of plugins (["netobserv-plugin","netobserv-plugin-static"]) on the
console.operator.openshift.io cluster resource so the operation creates the
field if missing, overwrites any previous values (preventing duplicates), and is
idempotent; update the Makefile line that runs the kubectl patch for
console.operator.openshift.io cluster accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c1326c49-442f-4fcc-a3a5-ec490ff368b8

📥 Commits

Reviewing files that changed from the base of the PR and between 622c60b and b3db93e.

📒 Files selected for processing (14)
  • Makefile
  • api/flowcollector/v1beta2/flowcollector_types.go
  • bundle/manifests/flows.netobserv.io_flowcollectors.yaml
  • bundle/manifests/netobserv-operator.clusterserviceversion.yaml
  • config/crd/bases/flows.netobserv.io_flowcollectors.yaml
  • config/rbac/role.yaml
  • docs/FlowCollector.md
  • helm/crds/flows.netobserv.io_flowcollectors.yaml
  • helm/templates/clusterrole.yaml
  • internal/controller/consoleplugin/consoleplugin_reconciler.go
  • internal/controller/consoleplugin/consoleplugin_static_reconciler.go
  • internal/controller/flowcollector_controller_console_test.go
  • internal/pkg/helper/flowcollector.go
  • internal/pkg/manager/manager.go
💤 Files with no reviewable changes (6)
  • bundle/manifests/netobserv-operator.clusterserviceversion.yaml
  • internal/controller/consoleplugin/consoleplugin_static_reconciler.go
  • internal/pkg/manager/manager.go
  • internal/controller/consoleplugin/consoleplugin_reconciler.go
  • config/rbac/role.yaml
  • helm/templates/clusterrole.yaml

Comment thread helm/crds/flows.netobserv.io_flowcollectors.yaml Outdated
Comment thread Makefile Outdated
@jotak jotak added the needs-review Tells that the PR needs a review label Jun 2, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (622c60b) to head (697b319).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #2791   +/-   ##
============================
============================
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@memodi
Copy link
Copy Markdown
Member

memodi commented Jun 2, 2026

/ok-to-test

@openshift-ci openshift-ci Bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jun 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

New images:

quay.io/netobserv/network-observability-operator:e267e1c
quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-e267e1c
quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-e267e1c

They will expire in two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:e267e1c make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-e267e1c

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-e267e1c
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@memodi
Copy link
Copy Markdown
Member

memodi commented Jun 2, 2026

@jotak - I tried the image from this PR, looks like now the users (installing from CLI) will have to patch the console operator to enable and disable (when uninstalling operator) our plugins manually:

to enable:

oc patch console.operator.openshift.io cluster --type='json' \
    -p '[{"op": "add", "path": "/spec/plugins/-", "value": "netobserv-plugin"},
         {"op": "add", "path": "/spec/plugins/-", "value": "netobserv-plugin-static"}]'

to disable:

   oc patch console.operator.openshift.io cluster --type='json' \
    -p "$(oc get console.operator.openshift.io cluster -o json | \
      jq '[{"op": "replace", "path": "/spec/plugins", "value": (.spec.plugins - ["netobserv-plugin", "netobserv-plugin-static"])}]')"

the most immediate impact would be on e2e tests.

@jotak
Copy link
Copy Markdown
Member Author

jotak commented Jun 3, 2026

@jotak - I tried the image from this PR, looks like now the users (installing from CLI) will have to patch the console operator to enable and disable (when uninstalling operator) our plugins manually:

to enable:

oc patch console.operator.openshift.io cluster --type='json' \
    -p '[{"op": "add", "path": "/spec/plugins/-", "value": "netobserv-plugin"},
         {"op": "add", "path": "/spec/plugins/-", "value": "netobserv-plugin-static"}]'

to disable:

   oc patch console.operator.openshift.io cluster --type='json' \
    -p "$(oc get console.operator.openshift.io cluster -o json | \
      jq '[{"op": "replace", "path": "/spec/plugins", "value": (.spec.plugins - ["netobserv-plugin", "netobserv-plugin-static"])}]')"

the most immediate impact would be on e2e tests.

Yes that's right, I forgot to mention that. It's just for dev/test environment, typical users won't need that. So we need to update our scripts wherever it's relevant.

I'll update make undeploy with your unpatch command

@github-actions github-actions Bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference needs-review Tells that the PR needs a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants