Skip to content

Conversation

@ardaguclu
Copy link
Member

@ardaguclu ardaguclu commented Jan 23, 2026

This PR adds the implementation proposed in openshift/enhancements#1900.

This PR introduces KMS as a new mode in encryption controllers to be functioning along side with the other modes. Basically, the idea is to track the KMS configuration to detect any configuration changes. So that key_controller can create new Secret to initiate migration. KMS Secret will not contain any confidential data. It will simply store the KMS configuration.

For Tech Preview v1, we will only support static unix domain socket (i.e. unix:///var/run/kmsplugin/kms.sock). Consequently, in this version, we don't support KMS -> KMS migrations.

Ref: Previous attemps:

Notes:

  • The changes here will be backported to 4.21
  • Substantial portion of the changed lines are unit and integration tests.

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

openshift-ci-robot commented Jan 23, 2026

@ardaguclu: This pull request references CNTRLPLANE-2241 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 "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds the implementation proposed in openshift/enhancements#1900.

This PR introduces KMS as a new mode in encryption controllers to be functioning along side with the other modes. Basically, the idea is to track the KMS configuration to detect any configuration changes. So that key_controller can create new Secret to initiate migration. KMS Secret will not contain any confidential data. It will simply store the KMS configuration.

For Tech Preview v1, we will only support static unix domain socket (i.e. unix:///var/run/kmsplugin/kms.sock). Consequently, in this version, we don't support KMS -> KMS migrations.

Ref: Previous attemps:

Notes:

  • The changes here will be backported to 4.21
  • Most of the changes are obsessively added unit tests

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-robot
Copy link

openshift-ci-robot commented Jan 23, 2026

@ardaguclu: This pull request references CNTRLPLANE-2241 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 "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds the implementation proposed in openshift/enhancements#1900.

This PR introduces KMS as a new mode in encryption controllers to be functioning along side with the other modes. Basically, the idea is to track the KMS configuration to detect any configuration changes. So that key_controller can create new Secret to initiate migration. KMS Secret will not contain any confidential data. It will simply store the KMS configuration.

For Tech Preview v1, we will only support static unix domain socket (i.e. unix:///var/run/kmsplugin/kms.sock). Consequently, in this version, we don't support KMS -> KMS migrations.

Ref: Previous attemps:

Notes:

  • The changes here will be backported to 4.21
  • Substantial portion of the changed lines are unit tests.

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.

@ardaguclu ardaguclu changed the title CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers WIP: CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers Jan 23, 2026
@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 Jan 23, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ardaguclu
Once this PR has been reviewed and has the lgtm label, please assign dgrisonnet 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

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 23, 2026

@ardaguclu: This pull request references CNTRLPLANE-2241 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 "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds the implementation proposed in openshift/enhancements#1900.

This PR introduces KMS as a new mode in encryption controllers to be functioning along side with the other modes. Basically, the idea is to track the KMS configuration to detect any configuration changes. So that key_controller can create new Secret to initiate migration. KMS Secret will not contain any confidential data. It will simply store the KMS configuration.

For Tech Preview v1, we will only support static unix domain socket (i.e. unix:///var/run/kmsplugin/kms.sock). Consequently, in this version, we don't support KMS -> KMS migrations.

Ref: Previous attemps:

Notes:

  • The changes here will be backported to 4.21
  • Substantial portion of the changed lines are unit and integration tests.

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.

@ardaguclu ardaguclu changed the title WIP: CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers Jan 23, 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 Jan 23, 2026
@ardaguclu ardaguclu changed the title CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers WIP: CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers Jan 23, 2026
@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 Jan 23, 2026
@ardaguclu ardaguclu force-pushed the kms-mode branch 2 times, most recently from 377c3cb to 0b007f9 Compare January 27, 2026 07:41
@ardaguclu ardaguclu changed the title WIP: CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers Jan 27, 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 Jan 27, 2026
@ardaguclu
Copy link
Member Author

ardaguclu commented Jan 27, 2026

/hold
These PRs are prerequisite of this;

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 27, 2026
@ardaguclu
Copy link
Member Author

/uncc @dgrisonnet
/cc @benluddy @bertinatto @p0lyn0mial

@openshift-ci openshift-ci bot requested review from benluddy and bertinatto and removed request for dgrisonnet January 27, 2026 15:54
@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 Feb 5, 2026
@p0lyn0mial
Copy link
Contributor

I believe that finally this is ready for review

ok, thanks, i will start reviewing soon.

Copy link
Contributor

@p0lyn0mial p0lyn0mial left a comment

Choose a reason for hiding this comment

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

I did a quick first pass.
Looked mostly at key_controller.go.

I posted my question / observation below. Let me know what you think.

}

if len(ks.KMSConfig) > 0 {
s.Annotations[EncryptionSecretKMSConfig] = string(ks.KMSConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since v1 assumes the KMS configuration is always the same and static, and we don’t know what future v2 will look like.

I’m wondering if we could slightly simplify the code by always putting the well-known configuration in the annotation when the current mode is KMS. This could simplify the code and potential places we would have to change.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll investigate the possible implications tomorrow and get back to you. I think it would be simpler as you said.

Copy link
Member Author

Choose a reason for hiding this comment

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

Initially I tried to adopt generic approach that would work also for v2 (except the API changes). But I think starting simple by dropping the unsupported parts in v1 alleviates both of us cognitive load.

Thus, generic KMSConfig is dropped, instead default endpoint is embedded. There isn't KMSConfig comparison anymore, because we don't support this already.

if currentMode == state.KMS {
// We are here because Encryption Mode is not changed
secret := crypto.ModeToNewKeyFunc[state.KMS](kmsConfig)
if latestKey.Key.Secret != base64.StdEncoding.EncodeToString(secret) {
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not sure that all changes/updates to a kms config should trigger a new key generation. rolling out a new key is expensive in terms of required shutdowns. also changing a timeout seems like an update that should not require a new key. something we need to figure out for v2.

Copy link
Member Author

@ardaguclu ardaguclu Feb 5, 2026

Choose a reason for hiding this comment

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

I completely agree with you. From the perspective of this line, it doesn't matter what secret includes. This line in any case need to compare the secret to detect new key or not.

https://github.com/openshift/library-go/pull/2086/changes#diff-de68f84fb611b486200c440adbdd1997edb7ab5ffbc520e485b39f73b18d339eR296-R304 this is where we decide which data should trigger new key or not (by forming the source of the secret)

Copy link
Member Author

@ardaguclu ardaguclu Feb 6, 2026

Choose a reason for hiding this comment

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

However, in v1, we don't support kms configurational changes. We always embed the same well-known endpoint. In order to keep the simplicity, I've removed secret comparison for KMS. Latest version of this PR embeds well known endpoint and keeps tracks of it.


func (c *keyController) generateKeySecret(keyID uint64, currentMode state.Mode, internalReason, externalReason string) (*corev1.Secret, error) {
bs := crypto.ModeToNewKeyFunc[currentMode]()
kmsConfig := []byte(kms.DefaultEndpoint)
Copy link
Member Author

@ardaguclu ardaguclu Feb 6, 2026

Choose a reason for hiding this comment

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

This should include the selective set of kms fields from APIServer config that will trigger new key. For now it is statically set.


func NewKMSKey(externalKey []byte) []byte {
// Used as fixed-length identifier in EncryptionConfiguration provider names.
// Example: kms-secrets-1-a7K9mJ2xH4nQ8pL5vR3wTg==
Copy link
Member Author

Choose a reason for hiding this comment

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

We can use hexadecimal instead base64

},
})
case state.KMS:
kmsConfig := string(key.KMSConfig)
Copy link
Member Author

Choose a reason for hiding this comment

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

In v1, key.KMSConfig equals to well known endpoint.

Copy link
Contributor

@p0lyn0mial p0lyn0mial left a comment

Choose a reason for hiding this comment

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

thanks, left a few additional comments. ptal when you have time.

// the user via unsupportConfigOverrides.encryption.reason triggered this key.
ExternalReason string
// Encoded KMSConfig that stores the KMS related fields
KMSConfig []byte
Copy link
Contributor

Choose a reason for hiding this comment

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

nit could this be renamed to KMSConfiguration ?

// the user via unsupportConfigOverrides.encryption.reason triggered this key.
ExternalReason string
// Encoded KMSConfig that stores the KMS related fields
KMSConfig []byte
Copy link
Contributor

Choose a reason for hiding this comment

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

could KMSConfiguration be a struct ? why []bytes ?

could KMSConfiguration be:

KMSConfiguration *apiserverconfigv1.KMSConfiguration

?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to answer in #2086 (comment). KMSConfiguration refers to plugin specific configuration rather than apiserverconfigv1.KMSConfiguration

Copy link
Member Author

Choose a reason for hiding this comment

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

I store as bytes array to keep the generality. Because each plugin type will have their own specific fields.

ExternalReason: externalReason,
}
if currentMode == state.KMS {
ks.KMSConfig = kmsConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

could this be:

ks.KMSConfiguration = &apiserverv1.KMSConfiguration{
			APIVersion: "v2",
			Name:        fmt.Sprintf("%d", keyID),
			Endpoint:   kms.DefaultEndpoint,
			Timeout:    &metav1.Duration{Duration: kms.DefaultTimeout},
		}

?

Copy link
Member Author

Choose a reason for hiding this comment

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

KMSConfig stores Plugin specific configurations (although this is obsolete, I just reference https://github.com/openshift/api/blob/81371d13d1fcad175a48627cf11524a94a80c377/config/v1/types_kmsencryption.go#L36 to show an example of a configuration). So it is bound to APIServer config rather than apiserverv1.KMSConfiguration.

For instance KMS config will likely store AppRole, etc. for Vault in v2.

Copy link
Member Author

Choose a reason for hiding this comment

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

We need to trigger a new migration, if keyArn (or appRole, etc.) is changed, even though these are not represented in apiserverv1.KMSConfiguration.

Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to focus on v1 in this PR ?
we might change the approach for v2 once we start prototyping.

as far as i can tell a KMSConfig is actually apiserverconfigv1.KMSConfiguration
xref: https://github.com/openshift/library-go/pull/2086/changes#r2773184416

Copy link
Contributor

Choose a reason for hiding this comment

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

keyArn (or appRole, etc.) is changed, even though these are not represented in apiserverv1.KMSConfiguration.

aren't these changes for a kms plugin ?

i think we need to distinguish two configs: one for a kms plugin and the other one for kms configuration (encryption-cfg)

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right actually. We may even need a third one to track key_id from Status endpoint. But for v1, I think we can have one.

func (c *keyController) generateKeySecret(keyID uint64, currentMode state.Mode, internalReason, externalReason string) (*corev1.Secret, error) {
bs := crypto.ModeToNewKeyFunc[currentMode]()
kmsConfig := []byte(kms.DefaultEndpoint)
bs := crypto.ModeToNewKeyFunc[currentMode](kmsConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

since the key is not used why it can't be 0 as for the identity ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will definitely be used in v2. You mean we can remove it for v1, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

since the key is not used why it can't be 0 as for the identity ?

I think, for v1, we can remove indeed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to keep this pr simple for v1.
Once we start developing v2 we might change the approach.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, agree. It makes sense. I'm updating.

provider := apiserverconfigv1.ProviderConfiguration{
// This generated KMSConfiguration can be convertible to KeyState,
// since provider name contains the key id and secret.
KMS: &apiserverconfigv1.KMSConfiguration{
Copy link
Contributor

Choose a reason for hiding this comment

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

here, as far as i can tell a KMSConfig is actually apiserverconfigv1.KMSConfiguration.

as far as i can tell we will never store any additional data beyond apiserverconfigv1.KMSConfiguration .

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm marking this PR as WIP to make necessary changes based on this ^^.

Copy link
Member Author

Choose a reason for hiding this comment

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

PR has been updated to store apiserverconfigv1.KMSConfiguration.

@ardaguclu
Copy link
Member Author

ardaguclu commented Feb 6, 2026

/retitle WIP: CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers

@openshift-ci openshift-ci bot changed the title CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers WIP: CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers Feb 6, 2026
@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 Feb 6, 2026
@ardaguclu ardaguclu force-pushed the kms-mode branch 3 times, most recently from d0321f6 to b8208c8 Compare February 9, 2026 08:16
@ardaguclu
Copy link
Member Author

/retest

@ardaguclu
Copy link
Member Author

ardaguclu commented Feb 9, 2026

/retitle CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers

@openshift-ci openshift-ci bot changed the title WIP: CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers CNTRLPLANE-2241: Add KMS encryption mode into library-go encryption controllers Feb 9, 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 Feb 9, 2026
Copy link
Contributor

@p0lyn0mial p0lyn0mial left a comment

Choose a reason for hiding this comment

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

left a few more questions.
overall it lgtm

case provider.KMS != nil:
// Since in v1 we don't support kms -> kms migrations, we can use empty key.
// Because we don't need to compare secrets to detect change.
secret := crypto.ModeToNewKeyFunc[state.KMS]()
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to define a var for it similar to emptyStaticIdentityKey ?(defined at the top of this file)

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, it would be nicer. Updated.

Name: keyId,
Secret: base64.StdEncoding.EncodeToString(secret),
},
Mode: state.KMS,
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we also populate ks.KMSConfiguration ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Once we set correct keyId and secret to KeyState, backed secret will be found which includes any other field we need (including the KMSConfiguration). KeyState is enriched in here

for _, k := range backedKeys {
if state.EqualKeyAndEqualID(&ks, &k) {
ks = k
break
}
}
.

// Since in v1 we don't support kms -> kms migrations, we can use empty key.
// Because we don't need to compare secrets to detect change.
secret := crypto.ModeToNewKeyFunc[state.KMS]()
keyId := strings.Split(provider.KMS.Name, "-")[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

could we create a private function for adding/removing the suffix ?

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be better. Updated.

state.AESGCM: NewAES256Key,
state.SecretBox: NewAES256Key, // secretbox requires a 32 byte key so we can reuse the same function here
state.Identity: NewIdentityKey,
state.KMS: NewIdentityKey,
Copy link
Contributor

@p0lyn0mial p0lyn0mial Feb 9, 2026

Choose a reason for hiding this comment

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

would it make sense to rename NewIdentityKey to something more generic ?(now used by state.Identity and state.KSM)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Updated.

// Since in v1 we don't support kms -> kms migrations, we can use empty key.
// Because we don't need to compare secrets to detect change.
secret := crypto.ModeToNewKeyFunc[state.KMS]()
keyId := strings.Split(provider.KMS.Name, "-")[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

I’m still wondering about encapsulation here.
I think other parts of the code won’t even be aware that the name has changed.

Only the code in encryptionconfig/config.go will encode and decode the new name, right?

Do we need to ensure that the name doesn’t already contain "-"?
For simplicity, we could add a comment in the key generation function describing this requirement.

Copy link
Member Author

Choose a reason for hiding this comment

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

Only the code in encryptionconfig/config.go will encode and decode the new name, right?

That is correct. Rest of the code only deals with KeyState. They do not even know about the details of EncryptionConfiguration.

Do we need to ensure that the name doesn’t already contain "-"?

Kube-apiserver already fails, if it encounters a provider name without -. Because uniqueness has broken.

For simplicity, we could add a comment in the key generation function describing this requirement.

I've added a comment about the reasons behind this provider name generation mechanism. Please let me know your thoughts. Thanks.

func getKeyIDFromProviderName(providerName string) string {
// We just need to obtain the keyID to find our backed secret
// e.g. "1-secrets"
return strings.Split(providerName, "-")[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

How should this handle an unexpected provider name?

Copy link
Member Author

Choose a reason for hiding this comment

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

Although it may not be possible, it is better to handle the invalid provider name gracefully. I've updated the code. Please let me know your thoughts.

},
})
case state.KMS:
// In order to preserve the uniqueness, we should insert resource name
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Are there going to be side effects from this naming scheme visible in things like metric labels?

Copy link
Member Author

Choose a reason for hiding this comment

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

func createKMSProviderName(keyID, resource string) string {
// Ideally we should have used keyId simply in kms provider name.
// However, this is an upstream constraint that every provider name must be unique.
// To maintain uniqueness while still allowing access to the keyId, we generate provider name in this format.
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, this is at least less strange than smuggling identity names in phony AES-GCM provider configs. Later, I would be interested in coming up with alternatives that let the controllers correlate provider configs to their source secret without smuggling.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree with you. It was error-prone and not nice. Since now we carry KMSConfigurations in backed Secrets, I think we won't need to carry anything in provider_names.

Comment on lines +361 to +362
// Moreover, we don't trigger new key when external reason is changed.
// Because it would lead to duplicate providers which is not allowed.
Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC, even if we did roll out a new encryption config in response to the "reason" update, we're not even capable of triggering a KEK rotation unless a specific provider happened to expose that capability independently.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. That is correct.

Comment on lines +12 to +15
const (
DefaultEndpoint = "unix:///var/run/kmsplugin/kms.sock"
DefaultTimeout = 10 * time.Second
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a real need to export these constants? IMO, duplicating the values in tests is good because it requires that changes in observable behavior are accompanied by changes to test expectations. And other code (doing related things like setting up volume mounts) should be observing effective values rather than using hardcoded defaults.

Copy link
Member Author

Choose a reason for hiding this comment

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

The only reason is to be accessed by key_controller. If we move these constants in there, we don't need to export them.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

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

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

Labels

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.

5 participants