Skip to content

🐛 add PDB to make sure at least 1 pod is always available during upgrade - #2362

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
jianzhangbjz:pdb
Nov 27, 2025
Merged

🐛 add PDB to make sure at least 1 pod is always available during upgrade#2362
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
jianzhangbjz:pdb

Conversation

@jianzhangbjz

@jianzhangbjzjianzhangbjz commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

Description

To address OCPBUGS-62517. Currently, the operator-controller lacks PodDisruptionBudget configuration. During node drain operations or cluster upgrades, all controller pods can be evicted
Simultaneously, causing the operator to report Available=False, which violates the OpenShift API contract:

"A component must not report Available=False during the course of a normal upgrade."
OpenShift API Contract

Add PodDisruptionBudget resources with minAvailable: 1 for both controllers to ensure at least one pod remains available during:

  • Rolling updates
  • Node drain operations
  • Cluster upgrades

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Assisted-by: Claude code

@jianzhangbjz
jianzhangbjz requested a review from a team as a code ownerNovember 26, 2025 02:16
@openshift-ci
openshift-ciBot requested a review from dtfranzNovember 26, 2025 02:16
@netlify

netlifyBot commented Nov 26, 2025

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commitc217a17
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/6927a06932c198000845676b
😎 Deploy Previewhttps://deploy-preview-2362--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecovBot commented Nov 26, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.39%. Comparing base (0fecf3f) to head (c217a17).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #2362 +/- ##
==========================================
+ Coverage 70.50% 74.39% +3.89% 
==========================================
Files 93 93 Lines 7300 7300 ==========================================
+ Hits 5147 5431 +284 + Misses 1719 1435 -284 
Partials 434 434 
FlagCoverage Δ
e2e44.51% <ø> (ø)
experimental-e2e48.72% <ø> (?)
unit58.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

enabled: []
disabled: []
podDisruptionBudget:
enabled: true

@pedjakpedjakNov 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit]: perhaps would be better to name it create:?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

However, all the other options are named enabled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, is there a reason for this option, and not just create it based on catalog or operatorController state? (rhetorical question)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I think it gives users explicit control over a resource and follows the existing pattern in the codebase where features are individually toggleable.

Comment on lines +1 to +2
{{- if .Values.options.catalogd.enabled }}
{{- if .Values.options.catalogd.podDisruptionBudget.enabled }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit]: perhaps we can combine these two into single if

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yes, updated it.

@@ -0,0 +1,24 @@
{{- if .Values.options.operatorController.enabled }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same comments as for the other pdb.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated it.

@tmshort

tmshort commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

/approve
It's needed, just may need a few tweeks.

@openshift-ciopenshift-ciBot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2025
@jianzhangbjz

Copy link
Copy Markdown
ContributorAuthor

/retest e2e / experimental-e2e (pull_request)

@openshift-ci

Copy link
Copy Markdown

@jianzhangbjz: No presubmit jobs available for operator-framework/operator-controller@main

Details

In response to this:

/retest e2e / experimental-e2e (pull_request)

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.

@jianzhangbjz

Copy link
Copy Markdown
ContributorAuthor

/retest experimental-e2e

@openshift-ci

Copy link
Copy Markdown

@jianzhangbjz: No presubmit jobs available for operator-framework/operator-controller@main

Details

In response to this:

/retest experimental-e2e

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-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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:

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

@jianzhangbjz

Copy link
Copy Markdown
ContributorAuthor

Updated the hack/test/install-prometheus.sh to add timeout to address the below error:

Waiting for Prometheus Operator pod to become ready...error: no matching resources foundCleaning up /tmp/tmp.Gv71SsiUrGmake: *** [Makefile:295: prometheus] Error 1Error: Process completed with exit code 2.

@dtfranz

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Nov 27, 2025
@openshift-merge-bot
openshift-merge-botBot merged commit 5ed8cf4 into operator-framework:mainNov 27, 2025
26 checks passed
tmshort added a commit to tmshort/operator-controller that referenced this pull request Dec 3, 2025
…g upgrade (operator-framework#2362)"
This is causing an issue with multi-node upgrades downstream.
This reverts commit 5ed8cf4.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jianzhangbjz@tmshort@dtfranz@pedjak