Skip to content

WIP CNTRLPLANE-2711: introduce configuration api for vault kms plugin#1954

Open
flavianmissi wants to merge 1 commit intoopenshift:masterfrom
flavianmissi:CNTRLPLANE-2711-kms-api
Open

WIP CNTRLPLANE-2711: introduce configuration api for vault kms plugin#1954
flavianmissi wants to merge 1 commit intoopenshift:masterfrom
flavianmissi:CNTRLPLANE-2711-kms-api

Conversation

@flavianmissi
Copy link
Member

No description provided.

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

openshift-ci-robot commented Mar 4, 2026

@flavianmissi: This pull request references CNTRLPLANE-2711 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 task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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 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 Mar 4, 2026
@openshift-ci openshift-ci bot requested review from JoelSpeed and rvanderp3 March 4, 2026 14:30
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 4, 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 syed 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

@flavianmissi flavianmissi force-pushed the CNTRLPLANE-2711-kms-api branch 6 times, most recently from 0bfa6fd to 5b652a8 Compare March 10, 2026 14:33
Copy link
Member

@ardaguclu ardaguclu left a comment

Choose a reason for hiding this comment

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

This is WIP but just wanted to drop my some initial comments


#### Feature Gate

A new feature gate `KMSv2` will be introduced and enabled in
Copy link
Member

Choose a reason for hiding this comment

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

It is better to mention about the requirement of new EncryptionType In order to keep TPv1 running, we need to have separate EncryptionType https://github.com/openshift/api/blob/b3c6104577797f804d921ac05ad91aa4186818f2/config/v1/types_apiserver.go#L234 which is bound to this feature gate.

mustRegister()
```

Additionally, the existing `KMSEncryptionProvider` feature gate is extended to
Copy link
Member

Choose a reason for hiding this comment

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

That would mean that we will have to ask enabling 2 feature gates for that purpose. Do we really need this?. Why can't we tombstone KMSEncryptionProvider and all its types and invent something new (just belongs to KMSv2)?

provider type in the `KMSProviderType` enum.

```go
FeatureGateKMSv2 = newFeatureGate("KMSv2").
Copy link
Member

Choose a reason for hiding this comment

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

nitpick:

Suggested change
FeatureGateKMSv2 = newFeatureGate("KMSv2").
FeatureGateKMSv2 = newFeatureGate("KMSEncryptionv2").

to emphasize that this is v2 of which feature gate


#### Vault KMSConfig

The following config is extracted from [Vault KMS Plugin documentation](https://github.com/hashicorp/web-unified-docs/blob/ab6191e4856b52a59a87fe0f17703671a7317ec6/content/vault/v1.21.x/content/docs/deploy/kubernetes/kms/configuration.mdx).
Copy link
Member

Choose a reason for hiding this comment

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

Private document, maybe we should remove

The `KMSConfig` type is extended to include the Vault provider:

```diff
type KMSConfig struct {
Copy link
Member

Choose a reason for hiding this comment

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

We definitely do not need to carry the burden of previous design.

kind: Secret
metadata:
name: vault-approle
namespace: openshift-config
Copy link
Member

Choose a reason for hiding this comment

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

ah, I see. This is a different namespace than openshift-config-managed.

name: cluster
spec:
encryption:
type: KMS
Copy link
Member

Choose a reason for hiding this comment

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

This should be different. Otherwise, controllers will use v1.

@flavianmissi flavianmissi force-pushed the CNTRLPLANE-2711-kms-api branch from 5b652a8 to 9f56ba5 Compare March 18, 2026 10:16
@flavianmissi flavianmissi force-pushed the CNTRLPLANE-2711-kms-api branch from 9f56ba5 to 3dbfdfe Compare March 20, 2026 12:13
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 20, 2026

@flavianmissi: 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 3dbfdfe 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

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants