CNTRLPLANE-3237: kms preflight: introduce kmsConfigHasherResourceProvider interface - #2394
Conversation
WalkthroughKMS config hashing now uses an injected resource-provider interface for Secret and ConfigMap retrieval. The Kubernetes CoreV1 client provides the implementation, and controller and test call sites pass the wrapper. ChangesKMS resource-provider wiring
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
e8bfca0 to
88e40ba
Compare
| func newKMSConfigHasher(provider kmsProviderConfig, coreClient corev1client.CoreV1Interface, namespace string) *kmsConfigHasher { | ||
| return &kmsConfigHasher{provider: provider, coreClient: coreClient, namespace: namespace} | ||
| func newKMSConfigHasher(provider kmsProviderConfig, kmsConfigHasherResourceProvider kmsConfigHasherResourceProvider, namespace string) *kmsConfigHasher { | ||
| return &kmsConfigHasher{provider: provider, kmsConfigHasherResourceProvider: kmsConfigHasherResourceProvider, namespace: namespace} |
|
|
||
| // coreClientKMSConfigHasherResourceProvider fetches resources from the Kubernetes API. | ||
| type coreClientKMSConfigHasherResourceProvider struct { | ||
| coreClient corev1client.CoreV1Interface |
There was a problem hiding this comment.
Don't we need a newCoreClientKMSConfigHashResourceProvider function that accepts coreClient?
88e40ba to
65d4a9f
Compare
|
/lgtm |
65d4a9f to
b424f1f
Compare
|
New changes are detected. LGTM label has been removed. |
|
the latest push replaced panic with returning an err. |
|
@p0lyn0mial: This pull request references CNTRLPLANE-3237 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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, 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 |
|
@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. |
splitting #2392
Summary by CodeRabbit
Refactor
Tests