feat(beekeeper): add extraEnv and envFrom support - #237
Merged
Conversation
The chart renders a fixed env list and offers no way to inject anything
else, so secrets have to be passed on the command line via
config.command. Anything passed that way is stored verbatim in the
Job/CronJob spec and is readable by anyone who can read those objects in
the namespace.
The node-funder deployments hit this directly: they pass a funding
wallet private key as --wallet-key.
Beekeeper already binds every flag to an environment variable (viper,
prefix "beekeeper", dashes replaced by underscores), so --wallet-key can
be supplied as BEEKEEPER_WALLET_KEY with no beekeeper change. This adds
the chart plumbing to do that:
extraEnv:
- name: BEEKEEPER_WALLET_KEY
valueFrom:
secretKeyRef:
name: beekeeper-wallet-key
key: walletKey
Both extraEnv and envFrom are applied to the CronJob container and to
both Job containers (init-ping and main), so the behaviour is the same
whichever mode is used.
Both default to empty and are wrapped in `with`, so a chart rendered
without them is byte-identical to before -- verified with helm template
on default values.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The beekeeper chart renders a fixed
envlist with no way to inject anything else, so secrets have to be passed on the command line throughconfig.command. Anything passed that way is stored verbatim in the Job/CronJob spec, readable by anyone who can read those objects in the namespace.The node-funder deployments hit this directly — they pass a funding wallet private key as
--wallet-key.Beekeeper already binds every flag to an environment variable (viper, prefix
beekeeper, dashes → underscores), so--wallet-keycan be supplied asBEEKEEPER_WALLET_KEYwith no beekeeper change. This adds the chart plumbing:extraEnvandenvFromare applied to the CronJob container and to both Job containers (init-pingand main), so behaviour is identical in either mode.Backwards compatible: both default to
[]and are wrapped inwith, so a chart rendered without them is byte-identical to before. Verified withhelm templateon default values — no stray keys. Also verified the secret-backed andenvFromvariants render valid YAML in bothjob.yamlpaths.Chart version 0.4.13 → 0.4.14.