argocd-vault-plugin
argocd-vault-plugin copied to clipboard
enable templating keys with vault secrets
Description
This commit allows the keys to be templated from secrets in addition to the values.
Fixes: #171
Checklist
Please make sure that your PR fulfills the following requirements:
- [ ] Reviewed the guidelines for contributing to this repository
- [ ] The commit message follows the Conventional Commits Guidelines.
- [ ] Tests for the changes have been updated
- [ ] Are you adding dependencies? If so, please run
go mod tidy -compat=1.17
to ensure only the minimum is pulled in. - [ ] Docs have been added / updated
- [ ] Optional. My organization is added to USERS.md.
Type of Change
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] New tests
- [ ] Build/CI related changes
- [ ] Documentation content changes
- [ ] Other (please describe)
Other information
Allows templating the keys
@OmriShiv Thanks for this PR. Things look good after some manual testing. Can you add a couple tests using inline and annotation, combining keys and values being replaced.
Thanks for the quick review; I added the tests
Hi @werne2j do the tests look ok?
I will take a close look later this week. Could you also add to the fixtures, specifically the nonempty directory and the outputs, in order to run through the generate tests https://github.com/argoproj-labs/argocd-vault-plugin/blob/main/cmd/generate_test.go
I added the fixtures to test and caught a case where <key>:<value>
wasn't being templated. Now it should be
Codecov Report
Merging #510 (611b4be) into main (717f1c0) will increase coverage by
0.10%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #510 +/- ##
==========================================
+ Coverage 75.38% 75.48% +0.10%
==========================================
Files 25 25
Lines 1694 1701 +7
==========================================
+ Hits 1277 1284 +7
Misses 323 323
Partials 94 94
Impacted Files | Coverage Δ | |
---|---|---|
pkg/kube/util.go | 90.59% <100.00%> (+0.33%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@werne2j gentle nudge if this looks good. Thanks!
@werne2j bumping again please