tuenti / secrets-manager

A daemon to sync Vault secrets to Kubernetes secrets
Apache License 2.0
171 stars 26 forks source link

Add labels to target Secrets created by secrets-manager operator #62

Closed slopezz closed 3 years ago

slopezz commented 4 years ago

We have been using secrets-manager operator for a while to sync our Secrets from Vault with no issues (gitops philosohy).

Now we are using prometheus-operator with an additional scraping config in a Secret object, and we wanted to use secrets-manager operator to manage it (like a normal Secret).

The problem we have right now is that we need to add a specific label to the final Secret that prometheus-operator instance uses to scrape resources (in that case scrape Secrets with additional scraper configs).

We have checked the docs/code of secrets-manager operator, and we haven't seen how to set labels for target Secrets created by secrets-manager (a part from lastUpdatedAt and managedBy labels).

We wonder if there is any way to:

Thanks in advance!

ryanewk commented 4 years ago

it would also be useful if annotations on the SecretDefinition could be propagated down to the generated secret. To satisfy this use case (for example): https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#guiding-credential-selection

raelga commented 4 years ago

+1 to this issue.

We are using SecretDefinitions for ArgoCD cluster secrets. Those secrets are filtered by the argo server by using argocd.argoproj.io/secret-type: cluster label.