I'm currently deploying a ktor app in google cloud...
# ktor
j
I'm currently deploying a ktor app in google cloud. I am using google cloud secret-manager to store secrets across my project. I've been wondering how best to inject these variables into a ktor app. We've considered either calling the secret-manager during CI/CD and inject the env variables into the build. However we'd prefer not to give our ci/cd access to google cloud secrets. For quarkus we found this , however I've yet to find something similar to ktor. Is there any way to inject these variables in KTOR?
a
Wouldn’t using the Quarkus extension also require you to permit your pipeline to read secrets? Or does it evaluate properties lazily at runtime?
j
The quarkus dependency injects it runtime, not buildtime
a
You should check out Hoplite, it supports GCP secrets: https://github.com/sksamuel/hoplite
But to answer your question, there isn’t anything specifically for Ktor. The least invasive option is to use/keep using the GCP client, though Hoplite is great.
j
That looks very relevant! Do you have any examples using ktor and hoplite?
a
Not sure, I simply have the bare minimum in my Ktor config, and everything I need on the application side is in a Hoplite config 👍
👍 1