CNTRLPLANE-3361: kms: accept VaultKMSPluginConfig directly in newVaultSidecarProvider#2257
Conversation
|
@p0lyn0mial: 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. DetailsIn 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. |
WalkthroughThe PR refactors Vault KMS plugin sidecar provider initialization to eliminate configuration indirection. ChangesVault KMS Config Parameter Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| name: name, | ||
| keyID: keyID, | ||
| udsPath: udsPath, | ||
| config: &pluginConfig.Vault, |
There was a problem hiding this comment.
previously the function received pluginConfig by value but was storing an address of a tmp var allocated on the heap.
ardaguclu
left a comment
There was a problem hiding this comment.
/lgtm
/hold
until @bertinatto checks it, as the owner of these bits
| switch pluginConfig.Type { | ||
| case configv1.VaultKMSProvider: | ||
| return newVaultSidecarProvider("vault-kms-plugin", keyID, udsPath, pluginConfig) | ||
| return newVaultSidecarProvider("vault-kms-plugin", keyID, udsPath, pluginConfig.Vault) |
There was a problem hiding this comment.
I think this is the right direction. Side cars are specifically generated per each provider, so that it is better to pass their own dedicated configuration.
|
@p0lyn0mial: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/hold cancel |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, bertinatto, p0lyn0mial The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary by CodeRabbit
Refactor
Tests