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

Propagate annotations and labels from CRDs to secrets #41

Merged

Conversation

archi-team-cacd2
Copy link

Hello,

My use case requires to be able to manage annotations and labels on the Kubernetes secrets.
This enhancement proposes to propagate the labels and annotations of the CRDs to the secrets (it could be covered by a feature flag if this assumption is not applicable for all users).

As I'm not able to run the unit tests on my local environnement, it may not currently handle all cases.
However, it seems to be working fine on my Kubernetes cluster for a new secret.

Best regards

@DaspawnW DaspawnW merged commit 73a549a into DaspawnW:master Jun 20, 2020
DaspawnW pushed a commit that referenced this pull request Jun 20, 2020
@akloss-cibo
Copy link
Contributor

This change creates problems for managing vault CRDs with ArgoCD. ArgoCD injects a label into the vault CRD indicating that the object is managed by ArgoCD, then vault-crd copies that label into the secret, and ArgoCD thinks the secret is managed by itself and will remove the secret. Repeat. A flag to control this behavior or a filtering regex or something would be lovely.

@akloss-cibo
Copy link
Contributor

I created #53 which creates an annotation to list the labels to copy, which solves my ArgoCD secret problem. I also created #52 and #51 which are nice-to-haves. I couldn't make ./mvnw test complete successfully on master, so I skipped creating tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants