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 volume claim annotations #364

Merged

Conversation

echoboomer
Copy link
Contributor

Context: When using a tool like ArgoCD, PersistentVolumeClaim resources show up as "needs pruning" since they are generated via templating instead of factored in at build time. Despite the use of values that indicate the creation of these claims is a desirable outcome, they simply show up as "out of sync."

Adding the ability to pass annotations into these objects would allow the use of annotations to tell ArgoCD to simply ignore them. This is admittedly a fringe use case, but could provide useful either way. These were created separately to allow turning either of them on or off, but the initial approach was to just put them under global, but that seemed wrong.

Unit tests pass: 303 tests, 0 failures, however no net new unit tests have been added as part of this PR. I'm happy to write one if it's necessary for this addition.

Thanks for your time!

@hashicorp-cla
Copy link

hashicorp-cla commented Jul 28, 2020

CLA assistant check
All committers have signed the CLA.

@jasonodonnell jasonodonnell self-requested a review July 30, 2020 14:21
Copy link
Contributor

@jasonodonnell jasonodonnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @echoboomer, we can definitely add this.

This will need basic unit test coverage, which can be found in test/unit. Let me know if you have any questions!

@echoboomer
Copy link
Contributor Author

@jasonodonnell Thanks for the feedback! I have added unit tests to cover both cases regarding typeOf for either string or yaml:

$ bats ./test/unit/server-statefulset.bats
...
69 tests, 0 failures

I hope this follows the formatting expected. Please let me know if there are any further required changes. Thank you!

@echoboomer echoboomer force-pushed the add-volumeClaim-annotations branch from c777b34 to 65e9dd8 Compare August 19, 2020 12:59
@echoboomer
Copy link
Contributor Author

Hey @jasonodonnell - just circling back to see if I need to add anything else here. Thank you!

@jasonodonnell jasonodonnell self-requested a review August 20, 2020 18:01
Copy link
Contributor

@jasonodonnell jasonodonnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution!

@jasonodonnell jasonodonnell merged commit 622690e into hashicorp:master Aug 20, 2020
@echoboomer echoboomer deleted the add-volumeClaim-annotations branch August 21, 2020 11:52
@jasonodonnell jasonodonnell mentioned this pull request Aug 24, 2020
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.

3 participants