Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can i use *.crt in secretTypes (wildcard)? #376

Open
SergeiCherevko opened this issue Jan 8, 2025 · 2 comments
Open

can i use *.crt in secretTypes (wildcard)? #376

SergeiCherevko opened this issue Jan 8, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@SergeiCherevko
Copy link

Hello! I have many secrets in my cluster. Some of them are named like "tls.crt," which is fine, but others are named like:

kafka.crt
user.crt
ca.crt

I don’t want to list all the names manually; instead, I want to use a wildcard to retrieve all of them. Can i make this like code below

secretsExporter:
  secretTypes:
  - type: kubernetes.io/tls
     key: tls.crt
  - type: opaque
     key: *.crt       <---------------------
@SergeiCherevko SergeiCherevko changed the title can i use *.crt in secretTypes (wildcard) can i use *.crt in secretTypes (wildcard)? Jan 8, 2025
@npdgm npdgm self-assigned this Jan 8, 2025
@npdgm
Copy link
Member

npdgm commented Jan 8, 2025

Hi!
We have never used the feature ourselves, but field key: has support for regexp patterns. So I would expect key: '.*\.crt' to work. The exporter won't start if the pattern doesn't compile.
I did a quick test and could not get it to work with your use-case... at least through the Helm chart, so perhaps we have templating issues.
Tomorrow I'll hunt for the bug

@npdgm npdgm added the bug Something isn't working label Jan 8, 2025
@SergeiCherevko
Copy link
Author

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants