feat: add ngrok provider#5160
Conversation
3500e0d to
c7daad9
Compare
|
Hello! :) Please update stability-support.md and also you have to link the provider documentation under hack/api-docs/mkdocs.yaml file so it shows up on the website. |
Also worth it - if you are not willing to maintain it @jonstacks , we need to find someone (maybe |
|
Hello :) Thank you both for the good call outs. I'll get those files updated. I work at |
866747b to
872b944
Compare
|
I think I've addressed all of the comments and this should be good to go for another round of reviews. |
|
At first, I thought the doc and dep are invalid labels. But actually, this is modifying go mod and the docs folder. :) So I allow it. :D |
This newer version supports getting secrets scoped to a particular vault Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
Cache the vault ID to reduce the number of API calls needed to be made when pushing secrets. Also, change the tests to ginkgo as it makes some of the more complex scenairos easier to test. Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
2f72b1a to
6eab85c
Compare
jakobmoellerdev
left a comment
There was a problem hiding this comment.
I think for me this is LGTM when you remove the 2 defensive guard checks
Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
|
@jakobmoellerdev thanks for the re-review. I've removed those guard checks. Let me know if there is anything else needed |
Skarlso
left a comment
There was a problem hiding this comment.
I have a couple of questions, please take a peek. :)
Address more code review comments: * Add a context with timeout for list calls * Remove redundant set for vault ID * Add //+optional code marker Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
|
Thank you @Skarlso, I think I've correctly addressed them. Let me know if there is anything else that needs to be changed. |
|
Thanks! |
Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
f416e92 to
568d645
Compare
|
I forgot to re-gen the docs after the |
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
|
|
Thank you very much and thanks for baring with the process! 🙇 |
* feat: Add ngrok provider Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * chore: Update stability support Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * Update pkg/provider/ngrok/provider.go Co-authored-by: Gustavo Fernandes de Carvalho <17139678+gusfcarvalho@users.noreply.github.com> Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * feat(ngrok): Move to a more flexible auth As suggested during code review, our API only supports key based authentication, but let's leave it flexible in case that changes in the future Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * fix(ngrok): Remove unneeded ctx.Done() Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * refactor(ngrok): Only marshall the whole secret if the secret key is not provided Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * refactor(ngrok): Reduce error nesting Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * refactor(ngrok): Make vault configuration more easily changed later I'm not sure if we'll need to support finding vaults by things like identifiers in the future or not Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * fix(ngrok): Parse push secret metadata correctly Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * tests(ngrok): Add more tests Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * Update pkg/provider/ngrok/client.go Co-authored-by: Jakob Möller <contact@jakob-moeller.com> Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * fix(ngrok): Consider secrets deleted if they no longer exist Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * refactor(ngrok): Reduce error nesting again Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * chore: Upgrade ngrok-api-go version This newer version supports getting secrets scoped to a particular vault Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * refactor(ngrok): Cache the vault ID Cache the vault ID to reduce the number of API calls needed to be made when pushing secrets. Also, change the tests to ginkgo as it makes some of the more complex scenairos easier to test. Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * feat(ngrok): Add codeowners entry for ngrok provider Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * fix(ngrok): Update license for check Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * fix(ngrok): Address code review feedback Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * refactor(ngrok): Remove defensive guard checks Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * fix(ngrok): Address code review feedback pt.2 Address more code review comments: * Add a context with timeout for list calls * Remove redundant set for vault ID * Add //+optional code marker Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * fix(ngrok): re-generate docs to fix diff Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> * run make test.crds.update Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> --------- Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Co-authored-by: Gustavo Fernandes de Carvalho <17139678+gusfcarvalho@users.noreply.github.com> Co-authored-by: Jakob Möller <contact@jakob-moeller.com> Co-authored-by: Gergely Brautigam <skarlso777@gmail.com> Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Signed-off-by: Samuel Molling <samuelmolling@gmail.com>



Problem Statement
Add a ngrok provider for pushing k8s secrets to ngrok secrets to be used with traffic policy.
Related Issue
N/A
Proposed Changes
ngrokprovider with tests and documentation.Checklist
git commit --signoffmake testmake reviewable