CCXDEV-16094: add config option to disable runtime extractor #1248
Conversation
This commit adds the disableRuntimeExtractor option to the insights ConfigMap so that users can disable the runtime-extractor functionality. Signed-off-by: Ondrej Pokorny <opokorny@redhat.com>
Signed-off-by: Ondrej Pokorny <opokorny@redhat.com>
|
@opokornyy: This pull request references CCXDEV-16094 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 task to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
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. |
📝 WalkthroughWalkthroughThis pull request adds a new boolean configuration field Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@opokornyy: This pull request references CCXDEV-16094 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 task to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
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. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/config/configobserver/config_aggregator.go (1)
263-278:⚠️ Potential issue | 🟠 MajorAdd
DisableRuntimeExtractorpropagation from legacy config toInsightsConfiguration.The
legacyConfigToInsightsConfiguration()method omitsDisableRuntimeExtractorwhen constructing the returnedDataReportingstruct. Although the field exists inconfig.Controllerand is properly loaded from the legacy configuration source, this omission causes the value to be silently lost when converting toInsightsConfiguration. If a user setsdisableRuntimeExtractor: truein the legacy config, it will not be reflected in the final merged configuration.The field should be added to the returned struct:
DisableRuntimeExtractor: legacyConfig.DisableRuntimeExtractor,Alternatively, if this omission is intentional (to allow only the config map to control this feature), add an explicit comment explaining the design decision.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/config/configobserver/config_aggregator.go` around lines 263 - 278, The legacyConfigToInsightsConfiguration function is dropping the DisableRuntimeExtractor flag when building the returned config.InsightsConfiguration.DataReporting; update legacyConfigToInsightsConfiguration to propagate DisableRuntimeExtractor by setting DataReporting.DisableRuntimeExtractor = legacyConfig.DisableRuntimeExtractor (referencing legacyConfigToInsightsConfiguration, DataReporting and legacyConfig.DisableRuntimeExtractor) or, if intentional, add a clear comment in legacyConfigToInsightsConfiguration explaining why DisableRuntimeExtractor is intentionally omitted and that only the config map controls it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@pkg/config/configobserver/config_aggregator.go`:
- Around line 263-278: The legacyConfigToInsightsConfiguration function is
dropping the DisableRuntimeExtractor flag when building the returned
config.InsightsConfiguration.DataReporting; update
legacyConfigToInsightsConfiguration to propagate DisableRuntimeExtractor by
setting DataReporting.DisableRuntimeExtractor =
legacyConfig.DisableRuntimeExtractor (referencing
legacyConfigToInsightsConfiguration, DataReporting and
legacyConfig.DisableRuntimeExtractor) or, if intentional, add a clear comment in
legacyConfigToInsightsConfiguration explaining why DisableRuntimeExtractor is
intentionally omitted and that only the config map controls it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 735a0724-f1b3-4b0a-bcf6-5a357a591695
📒 Files selected for processing (6)
pkg/config/config.gopkg/config/configobserver/config_aggregator.gopkg/config/configobserver/config_aggregator_test.gopkg/config/legacy_config.gopkg/config/legacy_config_test.gopkg/config/types.go
|
/test insights-operator-e2e-tests |
|
/pj-rehearse pull-ci-openshift-insights-operator-master-insights-operator-slow-tests |
|
/test pull-ci-openshift-insights-operator-master-insights-operator-slow-tests |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ncaak, opokornyy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by @opokornyy |
|
@opokornyy: This PR has been marked as verified by DetailsIn response to this:
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. |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
@opokornyy: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/cherry-pick release-4.21 |
|
@opokornyy: new pull request created: #1295 DetailsIn response to this:
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 kubernetes-sigs/prow repository. |
|
/cherry-pick release-4.20 |
|
@opokornyy: new pull request created: #1297 DetailsIn response to this:
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 kubernetes-sigs/prow repository. |
This PR adds the
disableRuntimeExtractoroption to the insights ConfigMap so that users can disable the runtime-extractor functionality.Categories
Sample Archive
NoneDocumentation
NoneUnit Tests
pkg/config/configobserver/config_aggregator_test.gopkg/config/legacy_config_test.goPrivacy
Yes. There are no sensitive data in the newly collected information.
Changelog
Breaking Changes
No
References
https://issues.redhat.com/browse/???
https://access.redhat.com/solutions/???
Summary by CodeRabbit
disableRuntimeExtractorhas been added, allowing operators to control runtime extraction behavior on a per-deployment basis. This option is configurable through standard configuration files as well as through dynamic configuration map overrides, enabling flexible management of runtime extraction across various environments and deployment configurations without code changes.