Skip to content

Add new fields to ThanosQuerierConfig#2835

Open
danielmellado wants to merge 1 commit intoopenshift:masterfrom
danielmellado:mon_crd_thanosquerier_fields
Open

Add new fields to ThanosQuerierConfig#2835
danielmellado wants to merge 1 commit intoopenshift:masterfrom
danielmellado:mon_crd_thanosquerier_fields

Conversation

@danielmellado
Copy link
Copy Markdown
Contributor

Port ThanosQuerierConfig fields from the CMO ConfigMap API to the
ClusterMonitoring CRD. LogLevel reuses the existing LogLevel enum
(Error, Warn, Info, Debug). EnableRequestLogging and EnableCORS use
a new ThanosQuerierToggle string enum (Enabled, Disabled) following
the Kubernetes API convention of avoiding *bool fields.

Signed-off-by: Daniel Mellado dmellado@fedoraproject.org

Port ThanosQuerierConfig fields from the CMO ConfigMap API to the
ClusterMonitoring CRD. LogLevel reuses the existing LogLevel enum
(Error, Warn, Info, Debug). EnableRequestLogging and EnableCORS use
a new ThanosQuerierToggle string enum (Enabled, Disabled) following
the Kubernetes API convention of avoiding *bool fields.

Signed-off-by: Daniel Mellado <dmellado@fedoraproject.org>
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

Hello @danielmellado! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: de93ab71-593d-47c4-8614-d468a6f02fb2

📥 Commits

Reviewing files that changed from the base of the PR and between ecec2e8 and 2d8d4d8.

⛔ Files ignored due to path filters (4)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**, !**/zz_generated*
📒 Files selected for processing (3)
  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
  • config/v1alpha1/types_cluster_monitoring.go
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml

📝 Walkthrough

Walkthrough

The changes extend the ThanosQuerierConfig with three new configuration options: logLevel (with values Error, Warn, Info, Debug), enableRequestLogging (with values Enabled, Disabled), and enableCORS (with values Enabled, Disabled). A new ThanosQuerierToggle string enum type is introduced to support the toggle fields. The CRD schema is updated to declare these new optional properties with their constraints. Comprehensive validation test cases are added covering both valid enum values and rejection of invalid or unsupported values for the new configuration options.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding new fields to ThanosQuerierConfig, which aligns with all three modified files and the PR objectives.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of porting fields and the rationale for design choices like using string enums instead of boolean pointers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Stable And Deterministic Test Names ✅ Passed All 11 new test names are stable and deterministic. No dynamic values present. Test names use static descriptive strings as required.
Test Structure And Quality ✅ Passed YAML-based tests are programmatically converted to Ginkgo tests by the framework. All quality requirements are satisfied.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests were added. Changes consist of Go type definitions, CRD schema updates, and YAML manifest validation test cases. The check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR adds no Ginkgo e2e tests. It only modifies Go type definitions, CRD schemas, and YAML validation test cases. The SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds configuration fields to ThanosQuerierConfig. Only CRD schema, type definitions, and tests modified—no deployment manifests or scheduling constraints. Check not applicable.
Ote Binary Stdout Contract ✅ Passed PR contains only type definitions, const values, YAML tests, and CRD manifests. No process-level code, no fmt/log/klog usage, no main/init/BeforeSuite functions. OTE Stdout Contract not violated.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Custom check not applicable. PR does not add Ginkgo e2e tests; it adds type definitions, CRD validation cases in YAML, and a CRD manifest. Check requires Ginkgo tests.

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

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.1)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


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

@openshift-ci openshift-ci Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 7, 2026
@openshift-ci openshift-ci Bot requested review from JoelSpeed and everettraven May 7, 2026 12:30
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 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 joelspeed 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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

@danielmellado: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify-deps 2d8d4d8 link true /test verify-deps

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant