[feat][io] Support configuration secret interpolation#20901
Merged
michaeljmarshall merged 7 commits intoAug 16, 2023
Conversation
This was referenced Jul 28, 2023
Member
Author
|
/pulsarbot rerun-failure-checks |
shibd
approved these changes
Aug 16, 2023
| } | ||
|
|
||
| @Override | ||
| public String interpolateSecretForValue(String value) { |
Member
There was a problem hiding this comment.
It's better to add unit tests to the method separately.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20901 +/- ##
=============================================
+ Coverage 36.84% 73.10% +36.25%
- Complexity 12195 32255 +20060
=============================================
Files 1698 1875 +177
Lines 129852 139455 +9603
Branches 14161 15334 +1173
=============================================
+ Hits 47843 101946 +54103
+ Misses 75680 29448 -46232
- Partials 6329 8061 +1732
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
michaeljmarshall
added a commit
to datastax/pulsar
that referenced
this pull request
Aug 16, 2023
PIP: apache#20903 Relates to: apache#20862 The primary motivation is to make it possible to configure Pulsar Connectors in a secure, non-plaintext way. See the PIP for background and relevant details. The new interpolation feature only applies when deploying with functions to Kubernetes. * Add `SecretsProvider#interpolateSecretForValue` method with a default that maintains the current behavior. * Override `interpolateSecretForValue` in the `EnvironmentBasedSecretsProvider` so that configuration values formatted as `${my-env-var}` will be replaced with the result of `System.getEnv("my-env-var")` if the result is not `null`. * Implement a recursive string interpolation method that will replace any configuration value that the `interpolateSecretForValue` implementation determines ought to be replaced. Tests are added/modified. - [x] `doc-required` PR in forked repository: michaeljmarshall#55 (cherry picked from commit bfde0de)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIP: #20903
Relates to: #20862
Motivation
The primary motivation is to make it possible to configure Pulsar Connectors in a secure, non-plaintext way. See the PIP for background and relevant details. The new interpolation feature only applies when deploying with functions to Kubernetes.
Modifications
SecretsProvider#interpolateSecretForValuemethod with a default that maintains the current behavior.interpolateSecretForValuein theEnvironmentBasedSecretsProviderso that configuration values formatted as${my-env-var}will be replaced with the result ofSystem.getEnv("my-env-var")if the result is notnull.interpolateSecretForValueimplementation determines ought to be replaced.Verifying this change
Tests are added/modified.
Documentation
doc-requiredMatching PR in forked repository
PR in forked repository: michaeljmarshall#55