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

Exclude keys from reflected secret #367

Closed
StFS opened this issue Jul 31, 2023 · 2 comments
Closed

Exclude keys from reflected secret #367

StFS opened this issue Jul 31, 2023 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@StFS
Copy link

StFS commented Jul 31, 2023

I assume the answer is no since I find nothing about this in the documentation but I was wondering whether it was possible to exclude certain keys when reflecting a secret.

My specific use case is when I use cert-manager to create a certificate which in turn generates a Secret containing the ca.crt, tls.crt and tls.key keys. I would like to reflect this secret to different namespaces but there is no need to reflect the tls.key there, I only need the tls.crt and ca.crtvalues.

I think this could be a nice feature to have so if (like I assume) the answer to my question is that this is not supported, then we can consider this issue a feature request ;)

@winromulus winromulus self-assigned this Aug 1, 2023
@winromulus winromulus added the question Further information is requested label Aug 1, 2023
@winromulus
Copy link
Contributor

@StFS there is no such functionality currently built-in. Reflector would also have to be aware if the secret type validation would pass (some secret types require some keys to always be present).
Reflector currently just copies the data without any manipulation.

@L1ghtman2k
Copy link

L1ghtman2k commented Oct 31, 2023

Can this be reopened & turned into a feature request/enhancement? There is an equivalent ticket open for kubernetes-replicator mittwald/kubernetes-replicator#248. In my specific case, I have created my own CA with cert-manager, and I would like to propagate ca.crt across all namespaces, so that clients can verify the remote cert against the ca.crt

I imagine for tls type secrets, unspecified fields can be defaulted to empty strings.

Edit: It seems like my specific usecase is addressed via https://cert-manager.io/docs/trust/trust-manager/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

3 participants