Skip to content

Add startup probe to CLI and VMDP download servers#2319

Merged
openshift-merge-bot[bot] merged 4 commits into
openshift:oadp-devfrom
NicholasYancey:add-startup-probe-dev
Jul 23, 2026
Merged

Add startup probe to CLI and VMDP download servers#2319
openshift-merge-bot[bot] merged 4 commits into
openshift:oadp-devfrom
NicholasYancey:add-startup-probe-dev

Conversation

@NicholasYancey

@NicholasYancey NicholasYancey commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Why the changes were made

Adds a StartupProbe to the oadp-cli-server and oadp-vmdp-server deployments. This gives each container up to 60 seconds (periodSeconds: 5, failureThreshold: 12) to start up before the LivenessProbe begins evaluating it, preventing premature restarts on slow starts. Existing deployments without a StartupProbe are backfilled on reconcile so upgraded clusters get the fix automatically.

How to test the changes made

Run the controller unit tests to verify the StartupProbe is set correctly on both deployments:

go test ./internal/controller/... -run 'StartupProbe' -v

Then confirm the probe is present on a running cluster:

oc get deploy -n openshift-adp openshift-adp-oadp-cli-server \
  -o jsonpath='{.spec.template.spec.containers[0].startupProbe}{"\n"}'

oc get deploy -n openshift-adp openshift-adp-oadp-vmdp-server \
  -o jsonpath='{.spec.template.spec.containers[0].startupProbe}{"\n"}'

Summary by CodeRabbit

  • Improvements
    • Added startup health checks to both CLI and VMDP server deployments.
    • Existing deployments now more reliably backfill any missing readiness, liveness, and startup probes, without overwriting existing custom probe configuration.
    • Deployment updates are applied only when new health check settings are actually needed.
  • Tests
    • Added unit tests validating startup probe configuration and reconcile behavior for both CLI and VMDP deployments, including “backfill” and “do not overwrite” scenarios.

@NicholasYancey NicholasYancey self-assigned this Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@NicholasYancey, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 426d5595-e8e6-4ddc-9df4-42029bbd9c10

📥 Commits

Reviewing files that changed from the base of the PR and between 7913d6f and 526dc4a.

📒 Files selected for processing (2)
  • internal/controller/cli_download_controller_test.go
  • internal/controller/vmdp_download_controller_test.go

Walkthrough

CLI and VMDP server Deployment templates now include startup probes. Reconciliation independently backfills missing readiness, liveness, and startup probes on existing Deployments, updating only when changes are needed. New tests validate probe settings and preservation of existing configuration.

Changes

Server Deployment Probe Support

Layer / File(s) Summary
CLI probe configuration and backfill
internal/controller/cli_download_controller.go, internal/controller/cli_download_controller_test.go
CLI Deployments add an HTTP startup probe; reconciliation locates the target container by name and fills each missing probe independently. Tests verify probe configuration and ServiceAccount reconciliation with a restricted test scheme.
VMDP probe configuration and backfill
internal/controller/vmdp_download_controller.go, internal/controller/vmdp_download_controller_test.go
VMDP Deployments add an HTTP startup probe; reconciliation backfills missing probes without overwriting existing settings. Tests cover configuration, backfill, preservation, and ServiceAccount reconciliation setup.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: mrnold, joeavaikath

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding startup probes to the CLI and VMDP servers.
Description check ✅ Passed The description matches the template with both required sections and includes clear rationale plus test steps.
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 No Ginkgo titles were added; the new test names are static, descriptive Go test functions without dynamic data.
Test Structure And Quality ✅ Passed PASS: The new tests are focused unit tests with fake clients, no cluster waits, clear assertion messages, and no Ginkgo-specific anti-patterns.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the modified tests are plain Go unit tests and contain no MicroShift-specific unsupported APIs or guards.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds only Go unit tests in internal/controller; no new Ginkgo It/Describe/Context tests or SNO-specific assumptions were found.
Topology-Aware Scheduling Compatibility ✅ Passed Only startup/readiness/liveness probe and service-account backfill changes appear; no nodeSelector, affinity, tolerations, spread constraints, or topology logic was added.
Ote Binary Stdout Contract ✅ Passed Changed files only add probe logic and unit tests; no stdout writes or process-level setup changes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Modified tests are plain Go unit tests, not Ginkgo e2e, and show no IPv4-only literals, IP parsing, or external connectivity.
No-Weak-Crypto ✅ Passed Changed controller/test files add only probe/backfill logic; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons were introduced.
Container-Privileges ✅ Passed Touched deployments keep runAsNonRoot=true, allowPrivilegeEscalation=false, drop ALL, and no host* or privileged flags were added.
No-Sensitive-Data-In-Logs ✅ Passed The PR only adds generic service-account/deployment logs; no passwords, tokens, PII, or hostnames were introduced in new log lines.
✨ 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.

@openshift-ci
openshift-ci Bot requested review from Joeavaikath and mrnold July 22, 2026 16:19

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 3

🤖 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 `@internal/controller/cli_download_controller_test.go`:
- Around line 17-31: Extend the startup-probe assertions in the tests at
internal/controller/cli_download_controller_test.go:17-31 and
internal/controller/vmdp_download_controller_test.go:17-31 to verify
InitialDelaySeconds and PeriodSeconds are both 5, alongside the existing
StartupProbe checks. Update the relevant test assertions in each file; no other
probe behavior needs to change.
- Around line 9-39: Add reconciliation tests at
internal/controller/cli_download_controller_test.go:9-39 covering
reconcileCLIResources with existing Deployments that have missing probes and
probes already set, asserting probes are backfilled without overwriting
pre-existing values. Add equivalent tests at
internal/controller/vmdp_download_controller_test.go:9-39 for
reconcileVMDPResources, covering both missing and pre-existing probes; retain
the existing deployment-construction assertions.

In `@internal/controller/cli_download_controller.go`:
- Around line 98-103: The probe backfill logic must target the named server
container instead of assuming index 0. In
internal/controller/cli_download_controller.go lines 98-103, update the
deployment reconciliation to locate oadp-cli-server by container name before
comparing or applying probes; likewise, in
internal/controller/vmdp_download_controller.go lines 93-98, locate
oadp-vmdp-server by name and use that container for the existing probe updates.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e9800cd1-9c08-435c-bc34-086a5c2d1e02

📥 Commits

Reviewing files that changed from the base of the PR and between 1c39e7c and 4582338.

📒 Files selected for processing (4)
  • internal/controller/cli_download_controller.go
  • internal/controller/cli_download_controller_test.go
  • internal/controller/vmdp_download_controller.go
  • internal/controller/vmdp_download_controller_test.go

Comment thread internal/controller/cli_download_controller_test.go
Comment thread internal/controller/cli_download_controller_test.go
Comment thread internal/controller/cli_download_controller.go Outdated
@NicholasYancey

Copy link
Copy Markdown
Contributor Author

/retest

…-dev

# Conflicts:
#	internal/controller/cli_download_controller.go
#	internal/controller/cli_download_controller_test.go
#	internal/controller/vmdp_download_controller.go
#	internal/controller/vmdp_download_controller_test.go

@coderabbitai coderabbitai Bot left a comment

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
internal/controller/cli_download_controller_test.go (2)

282-284: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate the expected reconciliation error at all four sites.

Each test currently treats any returned error as expected, which can hide failures in earlier reconciliation steps.

  • internal/controller/cli_download_controller_test.go#L282-L284: assert the intentional unregistered-route/console error.
  • internal/controller/cli_download_controller_test.go#L323-L325: assert the intentional unregistered-route/console error.
  • internal/controller/cli_download_controller_test.go#L379-L381: assert the intentional unregistered-route/console error.
  • internal/controller/cli_download_controller_test.go#L421-L423: assert the intentional unregistered-route/console error.
🤖 Prompt for 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.

In `@internal/controller/cli_download_controller_test.go` around lines 282 - 284,
Update all four reconcileCLIResources test sites in
internal/controller/cli_download_controller_test.go (lines 282-284, 323-325,
379-381, and 421-423) to assert that the returned error specifically identifies
the intentional unregistered Route/ConsoleCLIDownload step. Continue allowing
that expected error, but fail the tests for any earlier or unrelated
reconciliation error.

Source: Path instructions


430-431: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Track update calls instead of ResourceVersion here.

The fake client’s ResourceVersion behavior is an approximation and is unreliable for proving reconciliation skipped Update. Wrap/intercept the client and assert zero update calls, or use envtest instead of relying on before.ResourceVersion != after.ResourceVersion.

🤖 Prompt for 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.

In `@internal/controller/cli_download_controller_test.go` around lines 430 - 431,
Replace the ResourceVersion comparison in the reconciliation test with an
assertion that the fake client received zero Update calls. Wrap or intercept the
client used by the test to track updates, then verify no update occurred while
preserving the existing reconciliation scenario.
🤖 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.

Outside diff comments:
In `@internal/controller/cli_download_controller_test.go`:
- Around line 282-284: Update all four reconcileCLIResources test sites in
internal/controller/cli_download_controller_test.go (lines 282-284, 323-325,
379-381, and 421-423) to assert that the returned error specifically identifies
the intentional unregistered Route/ConsoleCLIDownload step. Continue allowing
that expected error, but fail the tests for any earlier or unrelated
reconciliation error.
- Around line 430-431: Replace the ResourceVersion comparison in the
reconciliation test with an assertion that the fake client received zero Update
calls. Wrap or intercept the client used by the test to track updates, then
verify no update occurred while preserving the existing reconciliation scenario.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2629fb3c-3f00-43dd-b9c3-0c76dd4d2ce6

📥 Commits

Reviewing files that changed from the base of the PR and between 5489582 and 7913d6f.

📒 Files selected for processing (4)
  • internal/controller/cli_download_controller.go
  • internal/controller/cli_download_controller_test.go
  • internal/controller/vmdp_download_controller.go
  • internal/controller/vmdp_download_controller_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/controller/vmdp_download_controller_test.go

@NicholasYancey

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor Author

/cherry-pick oadp-1.6

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@NicholasYancey: once the present PR merges, I will cherry-pick it on top of oadp-1.6 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick oadp-1.6

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.

@sseago

sseago commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Joeavaikath, NicholasYancey, sseago

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

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 5e9c79a into openshift:oadp-dev Jul 23, 2026
15 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@NicholasYancey: #2319 failed to apply on top of branch "oadp-1.6":

Applying: Add startup probe to CLI and VMDP download servers
Applying: Addressed CodeRabbit review comments
Applying: fixed error statements to be better
Using index info to reconstruct a base tree...
M	internal/controller/cli_download_controller_test.go
M	internal/controller/vmdp_download_controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging internal/controller/cli_download_controller_test.go
CONFLICT (content): Merge conflict in internal/controller/cli_download_controller_test.go
Auto-merging internal/controller/vmdp_download_controller_test.go
CONFLICT (content): Merge conflict in internal/controller/vmdp_download_controller_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0003 fixed error statements to be better

Details

In response to this:

/cherry-pick oadp-1.6

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.

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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants