-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Removing common path with regexp rewrite is not working as documented #1447
Copy link
Copy link
Closed
Labels
area/awsIndicates an issue or PR related to AWS.Indicates an issue or PR related to AWS.good first issueGood for newcomersGood for newcomerskind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Milestone
Description
Describe the solution you'd like
I am trying to use dataFrom.find to get multiple secrets from AWS Parameter Store, trying to remove the common path by following the documentation https://external-secrets.io/v0.5.9/guides-datafrom-rewrite/
- regexp:
source: "path/to/my/secrets/(.*)"
target: "$1"
Using this regexp didn't do anything to the generated secret keys:
For secrets:
path/to/my/secrets/username
path/to/my/secrets/password
Generated keys:
apiVersion: v1
kind: Secret
type: Opaque
data:
_path_to_my_secrets_username: ...
_path_to_my_secrets_password: ...
However, using this regexp:
- regexp:
source: "_path_to_my_secrets_(.*)"
target: "$1"
Does output only the last path as expected:
apiVersion: v1
kind: Secret
type: Opaque
data:
username: ...
password: ...
What is the added value?
The feature works with the regexp with underscores (instead of slashes), but I would like a confirmation on whether this is a documentation mistake or an actual bug. Thank you for your help!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/awsIndicates an issue or PR related to AWS.Indicates an issue or PR related to AWS.good first issueGood for newcomersGood for newcomerskind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Type
Projects
Status
Done