use existing secrets in helm charts#1828
Conversation
_ Signed-off-by: MasayaAoyama <amsy810@gmail.com>
a377cf9 to
adbd3a3
Compare
There was a problem hiding this comment.
Pull request overview
Adds a Helm values flag to allow using pre-created/provider-managed Kubernetes Secrets (e.g., ExternalSecrets) instead of having the chart generate an API key Secret for the default LLM provider.
Changes:
- Introduces
providers.<provider>.useExistingSecretvalues (defaultfalse) for several providers. - Updates
modelconfig-secret.yamlto skip rendering the Secret whenuseExistingSecretis enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| helm/kagent/values.yaml | Adds useExistingSecret values and inline docs for LLM providers. |
| helm/kagent/templates/modelconfig-secret.yaml | Gates Secret rendering on useExistingSecret being false. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Masaya Aoyama (@amsy810) <tennis.tenmasa@gmail.com>
Signed-off-by: MasayaAoyama <amsy810@gmail.com>
EItanya
left a comment
There was a problem hiding this comment.
Overall this makes sense, but can't you just set apiKeySecretRef and skip apiKey to achieve the same behavior?
|
@EItanya Thank you for the review! If we use apiKeySecretRef in that way, then when users provide the apiKey directly, we would likely need to hardcode the Secret name on the chart side when generating the Secret. Alternatively, we might need to introduce another separate value for that purpose. Also, this approach would break backward compatibility with older versions, and it would also affect the Secret name used when mounting the Secret from the Deployment. For these reasons, this PR keeps the current implementation. What do you think about the current approach? |
I'm a little confused, I think the way I mentioned would work today. If a user specifies just Why is the |
Add template values for using existing secrets in the Helm chart.
This is useful when used together with other secret management tools such as ExternalSecret.
Test