feat: Add plugins.install.plugins list and existingSecret support#328
Open
ermeaney wants to merge 1 commit intoopencost:mainfrom
Open
feat: Add plugins.install.plugins list and existingSecret support#328ermeaney wants to merge 1 commit intoopencost:mainfrom
ermeaney wants to merge 1 commit intoopencost:mainfrom
Conversation
This decouples plugin binary downloads from plugin credentials, enabling secure secret management workflows (ExternalSecrets, Vault, etc.). Changes: - Add plugins.install.plugins list to specify which plugins to download independently of configs - Add plugins.existingSecret to use an existing secret instead of creating one from values - Install script uses install.plugins if set, falls back to configs keys - plugins-config secret is not created when existingSecret is specified - Deployment uses existingSecret for volume mount when specified This maintains full backward compatibility - existing configs-based workflows continue to work unchanged. Fixes opencost#327 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ameijer
reviewed
Mar 5, 2026
| secret: | ||
| secretName: {{ template "opencost.fullname" . }}-plugins-config | ||
| {{- /* Use existingSecret if specified, otherwise use the generated secret name */}} | ||
| secretName: {{ .Values.plugins.existingSecret | default (printf "%s-plugins-config" (include "opencost.fullname" .)) }} |
Member
There was a problem hiding this comment.
can you pull this out into a template function? in general, we try to avoid the use of default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR decouples plugin binary downloads from plugin credentials, enabling secure secret management workflows (ExternalSecrets, Vault, etc.).
plugins.install.pluginslist to specify which plugins to download independently of configsplugins.existingSecretto use an existing secret instead of creating one from valuesProblem
The current plugin installation mechanism requires plugin configurations to be defined in
plugins.configsfor the install script to download the plugin binary. This creates a security issue because:plugins.configsto determine which plugins to downloadThis makes it impossible to use Kubernetes ExternalSecrets, Vault, or other secret management tools for plugin credentials.
Solution
New Values
Behavior
plugins.install.pluginsis set, download those plugins regardless of what's in configsplugins.install.pluginsis empty, fall back to downloading plugins based on keys in configs (legacy behavior)plugins.existingSecretis set, use that secret instead of creating one from configsplugins.existingSecretis not set, create the secret from configs (legacy behavior)Test plan
helm lintpassesFixes #327
🤖 Generated with Claude Code