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

Add support for labels in managed secrets #67

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tommatime
Copy link

This adds the ability to specify labels to be synced to the managed secret. There is currently no way to ensure a label is added to the managed secret which is required, for example, to set the secret-type for ArgoCD resources. If omitted, the existing "secrets.doppler.com/subtype": "dopplerSecret" label is applied to the managed Secret. If labels are included, the existing subtype label will be appended to the user-supplied labels to ensure it is not overwritten.

Syntax:

apiVersion: secrets.doppler.com/v1alpha1
kind: DopplerSecret
metadata:
  name: dopplersecret-test
  namespace: doppler-operator-system
spec:
  tokenSecret:
    name: doppler-token-secret
  managedSecret:
    name: doppler-test-secret
    namespace: default
    labels:
      doppler-secret-label: test

Fixes #64

@tommatime
Copy link
Author

This is my first contribution to this project (and my first OSS contribution in general 🥳 ), so please let me know if any additional updates or documentation changes are necessary.

A comment on the original issue also requests support for annotations on the managed secret. This should be very similar to labels, so let me know if this functionality is desired and I can add that to this PR as well.

Thanks!

@tommatime tommatime marked this pull request as ready for review August 13, 2024 02:54
@nmanoogian
Copy link
Member

Thanks so much for your submission, @tommatime! And congrats on your first OSS contribution! 🎉

We'll take a look at this PR and get back to you with feedback shortly.

@nmanoogian nmanoogian self-requested a review August 13, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support custom labels on created Secret
2 participants