Skip to content

OCPBUGS-92085: set Prometheus shards value explicitly - #2972

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
simonpasquier:OCPBUGS-92085
Jun 26, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
simonpasquier:OCPBUGS-92085

Conversation

@simonpasquier

Copy link
Copy Markdown
Contributor

As explained in
prometheus-operator/prometheus-operator#6291, the VPA expects the .spec.shards field to be set to an explicit value to scale the resource.

As explained in
prometheus-operator/prometheus-operator#6291,
the VPA expects the `.spec.shards` field to be set to an explicit value
to scale the resource.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 25, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@simonpasquier: This pull request references Jira Issue OCPBUGS-92085, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

As explained in
prometheus-operator/prometheus-operator#6291, the VPA expects the .spec.shards field to be set to an explicit value to scale the resource.

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.

@simonpasquier

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 25, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@simonpasquier: This pull request references Jira Issue OCPBUGS-92085, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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 openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

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: 4d79fb40-93ed-469d-bf6c-3d7a51bd599e

📥 Commits

Reviewing files that changed from the base of the PR and between 410e15d and 1fa04bd.

📒 Files selected for processing (4)
  • assets/prometheus-k8s/prometheus.yaml
  • assets/prometheus-user-workload/prometheus.yaml
  • jsonnet/components/prometheus-user-workload.libsonnet
  • jsonnet/components/prometheus.libsonnet

📝 Walkthrough

Walkthrough

The PR adds shards: 1 to the Prometheus spec in the main Jsonnet component, the user-workload Jsonnet component, and the rendered Prometheus manifests.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: explicitly setting Prometheus shards.
Description check ✅ Passed The description states the reason for the change and links the upstream issue; the telemetry report block is not needed here.
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 PR changes only YAML/Jsonnet manifests; no Ginkgo test titles (It/Describe/Context/When) appear in the changed files.
Test Structure And Quality ✅ Passed PR only changes Prometheus manifests/jsonnet to set shards; no Ginkgo test code or It/BeforeEach/Eventually blocks were modified.
Microshift Test Compatibility ✅ Passed No Ginkgo tests were added or modified; only Prometheus manifest/jsonnet shard settings changed, so MicroShift test compatibility is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo tests were added; the PR only sets Prometheus shards in manifests/jsonnet, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only explicit spec.shards: 1 was added; no new anti-affinity, node selectors, topology spread, tolerations, or PDB changes.
Ote Binary Stdout Contract ✅ Passed Only Prometheus manifest/jsonnet config changed; no main/init/TestMain/Ginkgo setup or stdout writes were touched, so the stdout contract is unaffected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only sets Prometheus shards=1 in manifests/jsonnet; no new Ginkgo tests, IPv4 assumptions, or external connectivity were added.
No-Weak-Crypto ✅ Passed Diff only sets Prometheus shards=1 in 4 files; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret-comparison code was added.
Container-Privileges ✅ Passed Touched manifests only add shards: 1; existing container and pod securityContexts still use allowPrivilegeEscalation: false, drop ALL, and runAsNonRoot true.
No-Sensitive-Data-In-Logs ✅ Passed Patch only adds explicit shards: 1 fields/comments to Prometheus manifests/jsonnet; no new log statements or sensitive data exposure were introduced.

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

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

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

@simonpasquier

Copy link
Copy Markdown
Contributor Author

/jira backport release-4.22,release-4.21,release-4.20

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@simonpasquier: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.22
/cherrypick release-4.21
/cherrypick release-4.20

Details

In response to this:

/jira backport release-4.22,release-4.21,release-4.20

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-cherrypick-robot

Copy link
Copy Markdown

@openshift-ci-robot: once the present PR merges, I will cherry-pick it on top of release-4.20, release-4.21, release-4.22 in new PRs and assign them to you.

Details

In response to this:

@simonpasquier: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.22
/cherrypick release-4.21
/cherrypick release-4.20

In response to this:

/jira backport release-4.22,release-4.21,release-4.20

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.

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.

@simonpasquier

Copy link
Copy Markdown
Contributor Author

/verified by tests

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 26, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@simonpasquier: This PR has been marked as verified by tests.

Details

In response to this:

/verified by tests

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.

@machine424

Copy link
Copy Markdown
Contributor

/lgtm
/hold
If you could add some context (maybe in prometheus-operator/prometheus-operator#6291) on why making prom-operator set the default value as it does for replicas is not possible/that straightforward. Thanks.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2026
@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: machine424, simonpasquier

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [machine424,simonpasquier]

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

@simonpasquier

Copy link
Copy Markdown
Contributor Author

/unhold

I'll check more closely if we can have a default value for shards in upstream but I'm always a bit nervous to change the API definition (yeah I know, it should be safe but that might still create issues in some edge situations).

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2026
@simonpasquier

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 90ca0c2 and 2 for PR HEAD 1fa04bd in total

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@simonpasquier: all tests passed!

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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 2b502a5 into openshift:main Jun 26, 2026
22 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@simonpasquier: Jira Issue Verification Checks: Jira Issue OCPBUGS-92085
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-92085 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

As explained in
prometheus-operator/prometheus-operator#6291, the VPA expects the .spec.shards field to be set to an explicit value to scale the resource.

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-cherrypick-robot

Copy link
Copy Markdown

@openshift-ci-robot: new pull request created: #2973

Details

In response to this:

@simonpasquier: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.22
/cherrypick release-4.21
/cherrypick release-4.20

In response to this:

/jira backport release-4.22,release-4.21,release-4.20

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.

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.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@openshift-ci-robot: new pull request created: #2974

Details

In response to this:

@simonpasquier: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.22
/cherrypick release-4.21
/cherrypick release-4.20

In response to this:

/jira backport release-4.22,release-4.21,release-4.20

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.

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.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@openshift-ci-robot: new pull request created: #2975

Details

In response to this:

@simonpasquier: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.22
/cherrypick release-4.21
/cherrypick release-4.20

In response to this:

/jira backport release-4.22,release-4.21,release-4.20

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.

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.

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-06-27-125119

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants