Skip to content

CNTRLPLANE-3361: pluginlifecycle: treat transit-mount as required#2232

Open
flavianmissi wants to merge 1 commit into
openshift:masterfrom
flavianmissi:CNTRLPLANE-3361
Open

CNTRLPLANE-3361: pluginlifecycle: treat transit-mount as required#2232
flavianmissi wants to merge 1 commit into
openshift:masterfrom
flavianmissi:CNTRLPLANE-3361

Conversation

@flavianmissi
Copy link
Copy Markdown
Member

@flavianmissi flavianmissi commented May 18, 2026

the api has changed to make this field required, so we change to reflect it.

Summary by CodeRabbit

  • Bug Fixes
    • Sidecar initialization now consistently includes and requires the -transit-mount parameter; argument ordering for sidecar startup has been standardized.
  • Tests
    • Test expectations and the mock plugin wrapper updated to reflect the new argument order and the required transit-mount validation.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 18, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 18, 2026

@flavianmissi: This pull request references CNTRLPLANE-3361 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

the api has changed to make this field required, so we change to reflect it.

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

coderabbitai Bot commented May 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: ebb44d68-db20-485f-b13a-ab772bcbf056

📥 Commits

Reviewing files that changed from the base of the PR and between d53d047 and bbbdd50.

📒 Files selected for processing (4)
  • pkg/operator/encryption/kms/pluginlifecycle/sidecar_test.go
  • pkg/operator/encryption/kms/pluginlifecycle/vault.go
  • pkg/operator/encryption/kms/pluginlifecycle/vault_test.go
  • test/library/encryption/kms/k8s-mock-plugin/wrapper/main.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/operator/encryption/kms/pluginlifecycle/vault_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/library/encryption/kms/k8s-mock-plugin/wrapper/main.go

Walkthrough

Vault sidecar arg lists now always include -transit-mount; the mock plugin wrapper requires --transit-mount; unit and integration tests updated to match the new arg ordering and presence.

Changes

Transit Mount as Required Argument

Layer / File(s) Summary
Vault sidecar builder arg construction
pkg/operator/encryption/kms/pluginlifecycle/vault.go
BuildSidecarContainer now includes -transit-mount unconditionally in the required API fields argument list.
Vault sidecar unit test expectations
pkg/operator/encryption/kms/pluginlifecycle/vault_test.go
Test expectations updated so -transit-mount=transit appears earlier in the arg sequence and is present in the empty-optional-fields case.
Sidecar integration test expectations
pkg/operator/encryption/kms/pluginlifecycle/sidecar_test.go
Migration and standard sidecar expected Args ordering adjusted to place -transit-mount earlier.
Mock plugin wrapper validation requirement
test/library/encryption/kms/k8s-mock-plugin/wrapper/main.go
CLI flag registration reordered; options.validate() now enforces --transit-mount as required and returns --transit-mount must be set when missing.

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • p0lyn0mial
  • dgrisonnet
🚥 Pre-merge checks | ✅ 10 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ❓ Inconclusive Check specifies Ginkgo test requirements (It blocks, BeforeEach), but PR uses standard Go testing with testify. Check inapplicable to this codebase's testing framework. Clarify whether to assess Ginkgo patterns (not in repo) or standard Go tests. If assessing standard Go tests, some assertions lack meaningful messages (bare require.NoError calls).
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: treating transit-mount as required in the pluginlifecycle component.
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 Custom check not applicable. PR contains standard Go tests with table-driven test cases, not Ginkgo tests. No Ginkgo test declarations (It(), Describe(), etc.) found in the modified files.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR only modifies existing standard Go unit tests to update expected command-line argument ordering. Check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR modifies existing standard Go unit tests to update test expectations for command-line argument ordering and add validation.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies KMS plugin configuration to make transit-mount required. No changes to pod scheduling, affinity, node selectors, or topology-aware logic. Not applicable.
Ote Binary Stdout Contract ✅ Passed PR modifies one binary (wrapper/main.go). Its main() uses Go's log package, which writes to stderr by default. No fmt.Print* to stdout. No klog violations.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR does not add new Ginkgo e2e tests. Changes are to unit tests and production code for KMS plugin configuration. Check is not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 requested review from dgrisonnet and p0lyn0mial May 18, 2026 13:19
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@test/library/encryption/kms/k8s-mock-plugin/wrapper/main.go`:
- Line 40: The help text for the --transit-mount flag is out of date: update the
flag.StringVar call that registers o.transitMount (flag name "transit-mount") to
remove the "(optional)" suffix and reflect that the transit mount is required so
the usage matches the validation logic (i.e., change the third argument string
to not include "(optional)").
🪄 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: 52c3bf5f-2cb3-4a67-bd65-23660128a090

📥 Commits

Reviewing files that changed from the base of the PR and between dff948b and d53d047.

📒 Files selected for processing (4)
  • pkg/operator/encryption/kms/pluginlifecycle/sidecar_test.go
  • pkg/operator/encryption/kms/pluginlifecycle/vault.go
  • pkg/operator/encryption/kms/pluginlifecycle/vault_test.go
  • test/library/encryption/kms/k8s-mock-plugin/wrapper/main.go

Comment thread test/library/encryption/kms/k8s-mock-plugin/wrapper/main.go Outdated
@p0lyn0mial
Copy link
Copy Markdown
Contributor

/assign @bertinatto

the api has changed to make this field required, so we change to reflect
it.
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

@flavianmissi: 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.

Copy link
Copy Markdown
Member

@bertinatto bertinatto left a comment

Choose a reason for hiding this comment

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

/lgtm

and

/hold

for openshift/api#2847. We need that first because otherwise we could pass -transit-mount="" to the plugin, which would then fail to start. Not a big deal, but it'd break KMS tests in other PRs.

@openshift-ci openshift-ci Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels May 18, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bertinatto, flavianmissi

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 18, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

PR needs rebase.

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants