Skip to content

✨ Add RegistryV1DaemonSetSupport feature gate - #3057

Closed
cniackz wants to merge 3 commits into
operator-framework:mainfrom
cniackz:registryv1-daemonset-support
Closed

cniackz wants to merge 3 commits into
operator-framework:mainfrom
cniackz:registryv1-daemonset-support

Conversation

@cniackz

@cniackz cniackz commented Oct 22, 2026

Copy link
Copy Markdown

Description

Operators that need an agent on every node, such as CSI drivers with a node plugin, cannot ship that DaemonSet in a registry+v1 bundle today, because the renderer rejects it in manifests/, so they create it at runtime from their controller. This adds an alpha RegistryV1DaemonSetSupport feature gate, disabled by default. With the gate enabled, a DaemonSet in the bundle is rendered into the install namespace and takes part in rollout progression through a new DaemonSet progression probe (updatedNumberScheduled and numberAvailable equal to desiredNumberScheduled, inside the existing observed generation check). The gate has no effect unless BoxcutterRuntime is also enabled. spec.config (nodeSelector, tolerations, env) is applied to the CSV's Deployments only, not to this DaemonSet. With the gate disabled the bundle is still rejected, now at render time by BundleAdditionalResourcesGenerator (bundle contains unsupported resource: Name: <name>, Kind: DaemonSet) instead of by the validator. Validators take no render options, so CheckObjectSupport now leaves DaemonSet to BundleAdditionalResourcesGenerator, which enforces the gate; the alternative is a separate validator list for the gated renderer, which I am happy to switch to. One known limit, shared with the Deployment probe: a DaemonSet that schedules zero pods never passes, because the API server omits the zero-valued updatedNumberScheduled and numberAvailable; the Deployment probe behaves the same with replicas: 0 (status.updatedReplicas missing). Unlike replicas: 0, a DaemonSet can reach zero scheduled pods from cluster state (a nodeSelector that matches no node yet), so this is more likely to be hit; the same goes for a node that is not Ready, since every scheduled pod must be available. A CEL assertion type, which boxcutter already provides as probing.NewCELProbe, would fix both, and I can follow up with it. Unit tests cover the validator, generator, renderer, provider gate, the BoxcutterRuntime requirement and probe; e2e covers install with the gate enabled, a DaemonSet that never becomes available hitting the progress deadline, and rejection with the gate disabled (via a new @<FeatureGate>=false scenario tag). Refs #3056.

Tested with make lint, make test-unit, make verify, and the standard and experimental e2e suites on kind. All scenarios pass except proxy.feature:40, which fails the same way on main in my environment (the proxy listens on the host, which my kind network does not reach). After the last change I re-ran the DaemonSet scenarios only.

Reviewer Checklist

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

Allow registry+v1 bundles to ship a DaemonSet in manifests/, for
operators that need an agent on every node, such as a CSI node plugin.

The gate is alpha and disabled by default, and it has no effect unless
BoxcutterRuntime is also enabled, since that runtime provides the
DaemonSet progression probe. Validators take no render options, so
CheckObjectSupport now leaves DaemonSet to the
BundleAdditionalResourcesGenerator, which accepts it only when the
renderer runs with WithDaemonSetSupport. With the gate disabled, a
bundle with a DaemonSet is still rejected, now at render time. With it
enabled, the DaemonSet is rendered into the install namespace.

Signed-off-by: Cesar Celis <celis.hernandez.cesar@gmail.com>
Treat a DaemonSet as rolled out when status.updatedNumberScheduled and
status.numberAvailable both equal status.desiredNumberScheduled. The
object-controller already wraps every progression probe in an
observed generation check, so a stale status reports Unknown.

Signed-off-by: Cesar Celis <celis.hernandez.cesar@gmail.com>
Cover the three cases of the RegistryV1DaemonSetSupport gate: a bundle
with a DaemonSet installs and rolls out, a DaemonSet that never
becomes available exceeds the progress deadline, and the bundle is
rejected when the gate is disabled.

Scenarios tagged @<FeatureGate>=false now run only when that feature
gate is disabled.

Signed-off-by: Cesar Celis <celis.hernandez.cesar@gmail.com>
@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 Oct 22, 2026
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit a30622f
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6ada963aec9d37151110683e
😎 Deploy Preview https://deploy-preview-3057--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@openshift-ci

openshift-ci Bot commented Oct 22, 2026

Copy link
Copy Markdown

[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 perdasilva 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

@cniackz

cniackz commented Oct 23, 2026

Copy link
Copy Markdown
Author

Closing in favor of the OLMv1 Helm support path described in #3056 (comment).

@cniackz cniackz closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant