feat: support labels and annotations for secrets #72
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.
Description
This PR enhances secret management functionality for the
DisposableRequest
andRequest
resources by extending theSecretInjectionConfig
field with the following updates:Metadata Support:
Metadata
field to enable users to define labels and annotations for Kubernetes secrets created and managed by theDisposableRequest
andRequest
resources.KeyMappings Support:
KeyMappings
field to support injecting multiple key-value pairs into a single Kubernetes secret through a singleSecretInjectionConfig
.Deprecations:
SecretKey
andResponsePath
fields as deprecated. Users are encouraged to migrate to the more flexibleKeyMappings
field.Why is this needed?
Enables users to attach labels and annotations to secrets, improving resource management.
Simplifies the management of multiple key-value pairs within a single secret, reducing configuration complexity.
Backward Compatibility
SecretKey
andResponsePath
will continue to function but are now considered deprecated.Testing
Extended test coverage to validate the behavior of the new
Metadata
andKeyMappings
fields.Verified the updated functionality for both
DisposableRequest
andRequest
resources in a Kubernetes cluster.Related Issue
Resolves: #70