Skip to content

OCPBUGS-86578: bootstrap serving certs at hypershift operator startup#8599

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.22from
enxebre:cherry-pick-8545-release-4.22
May 29, 2026
Merged

OCPBUGS-86578: bootstrap serving certs at hypershift operator startup#8599
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.22from
enxebre:cherry-pick-8545-release-4.22

Conversation

@enxebre
Copy link
Copy Markdown
Member

@enxebre enxebre commented May 27, 2026

Summary

Cherry-pick of #8545 to release-4.22 (backport of OCPBUGS-84955).

  • Adds EnsureWebhookCerts bootstrap at operator startup so the webhook server can start even when cert secrets are not pre-provisioned (e.g. hypershift install render without --render-sensitive)
  • Removes CABundle from CLI-generated webhook and CRD conversion webhook configurations — certs are now managed at runtime by the operator
  • Marks the serving cert secret volume as optional so the pod can start without it (already present in release-4.22)

Jira: https://issues.redhat.com/browse/OCPBUGS-86578 (clone of https://issues.redhat.com/browse/OCPBUGS-84955)

Test plan

  • Unit tests for EnsureWebhookCerts (no secrets, existing secrets, empty data, partial secrets)
  • TestSetupCRDs updated for new setupCRDs signature
  • All affected packages compile and tests pass

🤖 Generated with Claude Code

@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 openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 27, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 27, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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 May 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-84955, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "5.0.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is MODIFIED instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-84955 to depend on a bug targeting a version in 5.0.0 and in one of the following states: MODIFIED, ON_QA, VERIFIED, but no dependents were found

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:

Summary

Cherry-pick of #8545 to release-4.22.

  • Adds EnsureWebhookCerts bootstrap at operator startup so the webhook server can start even when cert secrets are not pre-provisioned (e.g. hypershift install render without --render-sensitive)
  • Removes CABundle from CLI-generated webhook and CRD conversion webhook configurations — certs are now managed at runtime by the operator
  • Marks the serving cert secret volume as optional so the pod can start without it (already present in release-4.22)

Test plan

  • Unit tests for EnsureWebhookCerts (no secrets, existing secrets, empty data, partial secrets)
  • TestSetupCRDs updated for new setupCRDs signature
  • All affected packages compile and tests pass

🤖 Generated with Claude Code

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 8465c4a2-2086-4faf-bccf-9f5c31599761

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

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

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

@openshift-ci openshift-ci Bot added the area/cli Indicates the PR includes changes for CLI label May 27, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 27, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

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 area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels May 27, 2026
@enxebre enxebre changed the title OCPBUGS-84955: bootstrap serving certs at hypershift operator startup OCPBUGS-86578: bootstrap serving certs at hypershift operator startup May 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-86578, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-86578 to depend on a bug targeting a version in 5.0.0 and in one of the following states: MODIFIED, ON_QA, VERIFIED, but no dependents were found

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:

Summary

Cherry-pick of #8545 to release-4.22 (backport of OCPBUGS-84955).

  • Adds EnsureWebhookCerts bootstrap at operator startup so the webhook server can start even when cert secrets are not pre-provisioned (e.g. hypershift install render without --render-sensitive)
  • Removes CABundle from CLI-generated webhook and CRD conversion webhook configurations — certs are now managed at runtime by the operator
  • Marks the serving cert secret volume as optional so the pod can start without it (already present in release-4.22)

Jira: https://issues.redhat.com/browse/OCPBUGS-86578 (clone of https://issues.redhat.com/browse/OCPBUGS-84955)

Test plan

  • Unit tests for EnsureWebhookCerts (no secrets, existing secrets, empty data, partial secrets)
  • TestSetupCRDs updated for new setupCRDs signature
  • All affected packages compile and tests pass

🤖 Generated with Claude Code

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.

@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented May 27, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-86578, which is invalid:

  • expected the bug to target the "4.22.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.

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.

@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented May 27, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-86578, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.20.z" instead

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.

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.

@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented May 27, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-86578, which is invalid:

  • expected the bug to target only the "4.22.0" version, but multiple target versions were 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.

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.

@enxebre enxebre force-pushed the cherry-pick-8545-release-4.22 branch from bfa51e5 to fe5f82f Compare May 27, 2026 13:35
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

❌ Patch coverage is 59.64912% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.23%. Comparing base (d6c72d1) to head (84c626c).
⚠️ Report is 4 commits behind head on release-4.22.

Files with missing lines Patch % Lines
...ontrollers/webhookcerts/webhookcerts_controller.go 72.09% 8 Missing and 4 partials ⚠️
cmd/install/assets/hypershift_operator.go 0.00% 7 Missing ⚠️
hypershift-operator/main.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           release-4.22    #8599      +/-   ##
================================================
+ Coverage         35.21%   35.23%   +0.01%     
================================================
  Files               767      767              
  Lines             93511    93548      +37     
================================================
+ Hits              32933    32958      +25     
- Misses            57893    57902       +9     
- Partials           2685     2688       +3     
Files with missing lines Coverage Δ
cmd/install/install.go 51.48% <100.00%> (-0.03%) ⬇️
hypershift-operator/main.go 0.00% <0.00%> (ø)
cmd/install/assets/hypershift_operator.go 43.59% <0.00%> (-0.03%) ⬇️
...ontrollers/webhookcerts/webhookcerts_controller.go 64.55% <72.09%> (+1.44%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@enxebre enxebre force-pushed the cherry-pick-8545-release-4.22 branch from fe5f82f to 98bbf39 Compare May 27, 2026 13:37
@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented May 27, 2026

/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 May 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

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

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-84955 is in the state MODIFIED, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-84955 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents
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.

@csrwng
Copy link
Copy Markdown
Contributor

csrwng commented May 27, 2026

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-21
/test e2e-aws-4-21
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

Cherry-pick of openshift#8545 to release-4.22.

The webhook server requires TLS certs on disk before it can start
listening. Previously, certs were only created via `hypershift install`
manifests, meaning the operator would fail to start if the serving cert
secret was not yet present like it is the case when running `hypershift
install render` without the `--render-sensitive` flag.

By adding bootstrap cert generation at startup, the operator is self-sufficient:
if the secret exists, the volume mount delivers certs normally; if it is
missing or empty, certs are generated, persisted, and written to disk.

This also removes the CABundle from CLI-generated webhook configurations
and CRD conversion webhooks, since certs are now managed at runtime.

Signed-off-by: Alberto Garcia Lamela <agarcial@redhat.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@enxebre enxebre force-pushed the cherry-pick-8545-release-4.22 branch from 98bbf39 to 84c626c Compare May 27, 2026 13:46
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label May 27, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 27, 2026

New changes are detected. LGTM label has been removed.

@enxebre enxebre marked this pull request as ready for review May 27, 2026 13:48
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 27, 2026
@enxebre enxebre added the lgtm Indicates that a PR is ready to be merged. label May 27, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-21
/test e2e-aws-4-21
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@openshift-ci openshift-ci Bot requested review from cblecker and muraee May 27, 2026 13:49
@enxebre enxebre added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label May 27, 2026
@openshift-merge-robot
Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-05-27-134409

@cblecker
Copy link
Copy Markdown
Member

/uncc

@openshift-ci openshift-ci Bot removed the request for review from cblecker May 27, 2026 21:13
@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented May 28, 2026

/retest

@cblecker
Copy link
Copy Markdown
Member

/uncc

@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented May 29, 2026

/verified by e2e

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: This PR has been marked as verified by e2e.

Details

In response to this:

/verified by 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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

@enxebre: 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 937a38f into openshift:release-4.22 May 29, 2026
25 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: Jira Issue Verification Checks: Jira Issue OCPBUGS-86578
✔️ 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-86578 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:

Summary

Cherry-pick of #8545 to release-4.22 (backport of OCPBUGS-84955).

  • Adds EnsureWebhookCerts bootstrap at operator startup so the webhook server can start even when cert secrets are not pre-provisioned (e.g. hypershift install render without --render-sensitive)
  • Removes CABundle from CLI-generated webhook and CRD conversion webhook configurations — certs are now managed at runtime by the operator
  • Marks the serving cert secret volume as optional so the pod can start without it (already present in release-4.22)

Jira: https://issues.redhat.com/browse/OCPBUGS-86578 (clone of https://issues.redhat.com/browse/OCPBUGS-84955)

Test plan

  • Unit tests for EnsureWebhookCerts (no secrets, existing secrets, empty data, partial secrets)
  • TestSetupCRDs updated for new setupCRDs signature
  • All affected packages compile and tests pass

🤖 Generated with Claude Code

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.

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. area/cli Indicates the PR includes changes for CLI area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. 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