Skip to content

Add enhancement for NRI plugin mutation policy#1971

Open
amritansh1502 wants to merge 1 commit intoopenshift:masterfrom
amritansh1502:machine-config/nri-plugin-mutation-policy-crio
Open

Add enhancement for NRI plugin mutation policy#1971
amritansh1502 wants to merge 1 commit intoopenshift:masterfrom
amritansh1502:machine-config/nri-plugin-mutation-policy-crio

Conversation

@amritansh1502
Copy link
Copy Markdown

@amritansh1502 amritansh1502 commented Apr 15, 2026

Description:

Problem

OpenShift nodes with NRI can apply merged container adjustments from more than one plugin, so administrators need an explicit rule for which namespaces may receive that combined result and whether enforcement is strict or observe-only. Policy cannot be defined reliably in a single plugin's CreateContainer path because that view does not represent the fully merged adjustment.

Proposal:

This enhancement proposes a standalone NRI policy plugin evaluated at CRI-O's ValidateContainerAdjustment hook, with namespace-scoped rules in v1.

Approach: A Dev Preview (MachineConfig delivery, in scope for this enhancement)

Ship the standalone policy plugin and its policy YAML on worker nodes via MachineConfig/Ignition, and enable NRI through a CRI-O drop-in that loads the plugin. The plugin reads the canonical on-disk policy at /etc/crio/nri_plugins/AllowMutations/config.yaml and enforces it at ValidateContainerAdjustment against the merged adjustment. This approach allows early feedback to be gathered on the policy API shape without committing to a final delivery mechanism.

Approach B: (GA (out of scope, tracked separately):

Based on reviewer feedback, the agreed GA path is to extend the existing ContainerRuntimeConfig (ctrcfg) API with an NRI mutation policy field, delivered via the MCO's existing reconciliation pipeline. The plugin binary is unchanged — only delivery moves from raw Ignition to the ctrcfg API. This will be designed and tracked in a follow-on enhancement once Approach A is proven in Dev Preview.

@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 Apr 15, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 15, 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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 15, 2026

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

@amritansh1502 amritansh1502 force-pushed the machine-config/nri-plugin-mutation-policy-crio branch from 9270ab5 to 84d10a6 Compare April 28, 2026 21:27
@amritansh1502 amritansh1502 marked this pull request as ready for review May 4, 2026 11:07
@openshift-ci openshift-ci Bot requested review from frobware and mike-nguyen May 4, 2026 11:07
@amritansh1502 amritansh1502 changed the title WIP: Add enhancement for NRI plugin mutation policy Add enhancement for NRI plugin mutation policy May 4, 2026
@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 4, 2026
@amritansh1502 amritansh1502 force-pushed the machine-config/nri-plugin-mutation-policy-crio branch 3 times, most recently from ef0d6c9 to 305d44f Compare May 4, 2026 15:21
Co-authored-by: Cursor <cursoragent@cursor.com>
@amritansh1502 amritansh1502 force-pushed the machine-config/nri-plugin-mutation-policy-crio branch from 305d44f to e2ef038 Compare May 5, 2026 06:48
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 5, 2026

@amritansh1502: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/markdownlint e2ef038 link true /test markdownlint

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant