Skip to content

CNTRLPLANE-3361: Align with latest beta API of Vault#2936

Open
ardaguclu wants to merge 1 commit into
openshift:masterfrom
ardaguclu:vault-new-version
Open

CNTRLPLANE-3361: Align with latest beta API of Vault#2936
ardaguclu wants to merge 1 commit into
openshift:masterfrom
ardaguclu:vault-new-version

Conversation

@ardaguclu

@ardaguclu ardaguclu commented Jul 16, 2026

Copy link
Copy Markdown
Member

Vault notifies us about their planned API changes in the new beta image. This new version brings some breaking changes. If we were in GA, we must have made changes in backwards compatible way. However, we haven't promoted this feature to GA yet. That's why, this PR tombstones the deprecated fields (i.e. transit-mount, transit-key), introduces one required field vault-key-path and one optional field vault-auth-namespace.

@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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 16, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 16, 2026

Copy link
Copy Markdown

@ardaguclu: 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:

Vault notifies us about their planned API changes in the new beta image. This new version brings some breaking changes. If we were in GA, we must make changes in backwards compatible way. However, we haven't promoted this feature to GA yet. That's why, this PR tombstones the deprecated fields (i.e. transit-mount, transit-key), introduces one required field vault-key-path and one optional field vault-auth-namespace.

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

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 253e3e7e-442a-48b8-94d4-a5a690faebe8

📥 Commits

Reviewing files that changed from the base of the PR and between e4253b7 and 91ec72c.

⛔ Files ignored due to path filters (7)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.featuregated-crd-manifests/apiservers.config.openshift.io/KMSEncryption.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**, !**/zz_generated*
  • openapi/openapi.json is excluded by !openapi/**
📒 Files selected for processing (6)
  • config/v1/tests/apiservers.config.openshift.io/KMSEncryption.yaml
  • config/v1/tests/apiservers.config.openshift.io/VaultKMS.yaml
  • config/v1/types_kmsencryption.go
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml
🚧 Files skipped from review as they are similar to previous changes (6)
  • config/v1/tests/apiservers.config.openshift.io/KMSEncryption.yaml
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml
  • config/v1/types_kmsencryption.go
  • config/v1/tests/apiservers.config.openshift.io/VaultKMS.yaml

📝 Walkthrough

Walkthrough

The Vault KMS API replaces transitMount and transitKey with required vaultKeyPath and adds optional vaultAuthNamespace. Corresponding validations and required fields are updated in three APIServer CRD variants. Vault KMS creation and validation fixtures are revised to use the new fields and test path and namespace constraints.

Suggested reviewers: bertinatto, everettraven, tjungblu

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the Vault beta API alignment change.
Description check ✅ Passed The description clearly matches the changeset by describing the deprecated field tombstones and new Vault key path fields.
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 All changed test titles are static descriptive strings; no dynamic values (timestamps, UUIDs, random suffixes, nodes, IPs) appear in titles.
Test Structure And Quality ✅ Passed Changes are declarative YAML validation fixtures, not Ginkgo It blocks, so the Ginkgo-specific quality check is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; changes are YAML schema-validation fixtures and CRD/type updates, so the MicroShift check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only updates schema/types and YAML fixtures, with no multi-node or SNO-sensitive assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only API schema and validation test fixtures changed; the modified files contain no pod placement, affinity, topology spread, nodeSelector, or replica logic.
Ote Binary Stdout Contract ✅ Passed Only config/schema/type files changed; no main/init/TestMain or stdout logging was introduced in touched code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only changes config schema/fixtures and generated CRDs; no new Ginkgo e2e tests or IPv4/external-network code were added.
No-Weak-Crypto ✅ Passed Changes only touch Vault KMS schema/tests; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons appear.
Container-Privileges ✅ Passed Only API schema/tests/CRDs changed; no privileged, hostPID/Network/IPC, allowPrivilegeEscalation, SYS_ADMIN, or root-run settings were added.
No-Sensitive-Data-In-Logs ✅ Passed No logging code was added; changes are schema/tests only, and searches found no log statements or emitted secrets.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
config/v1/tests/apiservers.config.openshift.io/KMSEncryption.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

config/v1/tests/apiservers.config.openshift.io/VaultKMS.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

payload-manifests/crds/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 2 others
🔧 golangci-lint (2.12.2)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


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

@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Hello @ardaguclu! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@ardaguclu

Copy link
Copy Markdown
Member Author

/hold
until we are ready to merge this yet. But that doesn't block reviews and approvals.

@openshift-ci openshift-ci Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 16, 2026
@openshift-ci
openshift-ci Bot requested review from JoelSpeed and everettraven July 16, 2026 09:56
@ardaguclu

Copy link
Copy Markdown
Member Author

/cc @p0lyn0mial @tjungblu @bertinatto

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@config/v1/tests/apiservers.config.openshift.io/VaultKMS.yaml`:
- Around line 365-366: Extend the vaultKeyPath invalid-test fixtures near
“Should reject vaultKeyPath without /keys/ separator” with cases for a
1025-character mount and a 513-character key, ensuring each complete path
remains under 1542 characters and is rejected by the schema.

In `@config/v1/types_kmsencryption.go`:
- Around line 212-219: Preserve independent mount and key length limits for the
vaultKeyPath validation. In config/v1/types_kmsencryption.go lines 212-219, add
CEL checks limiting the mount component to 1024 characters and the key name
component to 512 characters; regenerate the corresponding validation in
payload-manifests/crds/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml
lines 379-407,
payload-manifests/crds/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml
lines 379-407, and
payload-manifests/crds/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml
lines 379-407; add rejection fixtures for independently overlong components in
config/v1/tests/apiservers.config.openshift.io/VaultKMS.yaml lines 365-366.
🪄 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 YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: de2ae300-c773-4f55-9ac3-09c5a6e2950e

📥 Commits

Reviewing files that changed from the base of the PR and between 72066cc and 4414e4c.

⛔ Files ignored due to path filters (7)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.featuregated-crd-manifests/apiservers.config.openshift.io/KMSEncryption.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**, !**/zz_generated*
  • openapi/openapi.json is excluded by !openapi/**
📒 Files selected for processing (6)
  • config/v1/tests/apiservers.config.openshift.io/KMSEncryption.yaml
  • config/v1/tests/apiservers.config.openshift.io/VaultKMS.yaml
  • config/v1/types_kmsencryption.go
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml

Comment on lines +365 to +366
# vaultKeyPath invalid tests
- name: Should reject vaultKeyPath without /keys/ separator

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add component-length rejection cases.

Add fixtures for a 1025-character mount and a 513-character key whose complete paths remain below 1542 characters. They currently demonstrate that the schema admits values rejected by the former component contracts.

🤖 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 `@config/v1/tests/apiservers.config.openshift.io/VaultKMS.yaml` around lines
365 - 366, Extend the vaultKeyPath invalid-test fixtures near “Should reject
vaultKeyPath without /keys/ separator” with cases for a 1025-character mount and
a 513-character key, ensuring each complete path remains under 1542 characters
and is rejected by the schema.

Comment thread config/v1/types_kmsencryption.go
@ardaguclu

Copy link
Copy Markdown
Member Author

/test integration
/test verify-hypershift-integration

Comment thread config/v1/types_kmsencryption.go
TransitMount string `json:"transitMount,omitempty"`
// TransitMount string `json:"transitMount,omitempty"`

// --- TOMBSTONE ---

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.

same question here.

@ardaguclu

Copy link
Copy Markdown
Member Author

verify-crd-schema, verify-crdify are expected. verify-hypershift-integration seems to be perma-failing on every PR.

@ardaguclu

Copy link
Copy Markdown
Member Author

/test verify-hypershift-integration

@ardaguclu

Copy link
Copy Markdown
Member Author

Rebase has finished
/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 20, 2026
@tjungblu

Copy link
Copy Markdown
Contributor

/retest

@tjungblu

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 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-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change
/test minor-e2e-upgrade-minor

@ardaguclu

Copy link
Copy Markdown
Member Author

@JoelSpeed @everettraven could you PTAL, when you have a chance?.

Comment thread config/v1/types_kmsencryption.go
Comment thread config/v1/types_kmsencryption.go
Comment thread config/v1/types_kmsencryption.go
Comment thread config/v1/types_kmsencryption.go
@ardaguclu
ardaguclu force-pushed the vault-new-version branch from 4414e4c to e4253b7 Compare July 20, 2026 09:04
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2026
@ardaguclu

Copy link
Copy Markdown
Member Author

/test images

1 similar comment
@ardaguclu

Copy link
Copy Markdown
Member Author

/test images

@ardaguclu

Copy link
Copy Markdown
Member Author

/test images
/test verify-hypershift-integration

@p0lyn0mial

Copy link
Copy Markdown
Contributor

FYI it looks like verify-hypershift-integration will be fixed by openshift/hypershift#8695

@ardaguclu
ardaguclu force-pushed the vault-new-version branch from e4253b7 to 91ec72c Compare July 21, 2026 12:07
@ardaguclu

Copy link
Copy Markdown
Member Author

@JoelSpeed could you PTAL, when you have time?. I've rebased onto the other API changes.

@JoelSpeed

Copy link
Copy Markdown
Contributor

/test api-review

@JoelSpeed

Copy link
Copy Markdown
Contributor

/test evals-api-review

@openshift-api-review-bot openshift-api-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed config/v1/types_kmsencryption.go against OpenShift API review rules.

No issues found.

  • vaultAuthNamespace: optional field with proper omitted-behavior documentation, length constraints (1–4096) documented and enforced, XValidation rules (no trailing slash, no spaces, no reserved strings) match the existing vaultNamespace pattern.
  • vaultKeyPath: required field with format/example documentation, length constraints (8–1542) documented and enforced, six XValidation rules correctly enforce the <mount>/keys/<key-name> structure, RFC 3986 character restrictions, and dot-segment exclusion.
  • Tombstoned fields (transitMount, transitKey) are informational comments only — no active API surface.
  • zz_generated.swagger_doc_generated.go: generated file consistent with source comments.

@openshift-api-review-bot

Copy link
Copy Markdown

API Review

Issues were found and posted as inline comments on this PR.


Run locally: claude -p "/api-review" from a clone of this PR.
Iterate locally before pushing — it's faster and doesn't use CI budget.

Job artifacts | Report a problem

@JoelSpeed

Copy link
Copy Markdown
Contributor

/lgtm
/override-sticky ci/prow/verify-crd-schema
/override-sticky ci/prow/verify-crdify
/override-sticky ci/prow/verify-hypershift-integration

These are known breaking changes but we are ok making these because it's tech preview. The HyperShift job is broken currently on deps being out of date, this PR shouldn't affect hypershift integration anyway AFAICT

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/verify-crd-schema, ci/prow/verify-crdify, ci/prow/verify-hypershift-integration

These overrides will persist across retests on the current HEAD SHA. Pushing a new commit will clear them. Use /override-cancel to remove them.

Details

In response to this:

/lgtm
/override-sticky ci/prow/verify-crd-schema
/override-sticky ci/prow/verify-crdify
/override-sticky ci/prow/verify-hypershift-integration

These are known breaking changes but we are ok making these because it's tech preview. The HyperShift job is broken currently on deps being out of date, this PR shouldn't affect hypershift integration anyway AFAICT

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.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 21, 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-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change
/test minor-e2e-upgrade-minor

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, tjungblu

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

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@ardaguclu: The following tests 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/e2e-aws-ovn-hypershift 91ec72c link true /test e2e-aws-ovn-hypershift
ci/prow/e2e-aws-ovn-techpreview 91ec72c link true /test e2e-aws-ovn-techpreview
ci/prow/e2e-aws-ovn-hypershift-conformance 91ec72c link true /test e2e-aws-ovn-hypershift-conformance
ci/prow/e2e-aws-ovn 91ec72c link true /test e2e-aws-ovn
ci/prow/e2e-aws-serial-2of2 91ec72c link true /test e2e-aws-serial-2of2
ci/prow/e2e-gcp 91ec72c link true /test e2e-gcp

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.

@ardaguclu

Copy link
Copy Markdown
Member Author

/retest

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. 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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants