diff --git a/charts/beekeeper/Chart.yaml b/charts/beekeeper/Chart.yaml index 8889dcc..932fd15 100644 --- a/charts/beekeeper/Chart.yaml +++ b/charts/beekeeper/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: beekeeper -version: 0.4.13 +version: 0.4.14 description: Ethereum Swarm Beekeeper Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/beekeeper/templates/cronjob.yaml b/charts/beekeeper/templates/cronjob.yaml index 180f0da..67fdbee 100644 --- a/charts/beekeeper/templates/cronjob.yaml +++ b/charts/beekeeper/templates/cronjob.yaml @@ -55,6 +55,13 @@ spec: value: "{{ .Values.config.BZZ_TOKEN_ADDRESS }}" - name: BEEKEEPER_ETH_ACCOUNT value: "{{ .Values.config.ETH_ACCOUNT }}" + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 16 }} + {{- end }} + {{- with .Values.envFrom }} + envFrom: + {{- toYaml . | nindent 16 }} + {{- end }} command: {{- range .Values.config.command }} - {{ . }} diff --git a/charts/beekeeper/templates/job.yaml b/charts/beekeeper/templates/job.yaml index efd48f8..5354115 100644 --- a/charts/beekeeper/templates/job.yaml +++ b/charts/beekeeper/templates/job.yaml @@ -41,6 +41,13 @@ spec: value: "{{ .Values.config.BZZ_TOKEN_ADDRESS }}" - name: BEEKEEPER_ETH_ACCOUNT value: "{{ .Values.config.ETH_ACCOUNT }}" + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.envFrom }} + envFrom: + {{- toYaml . | nindent 12 }} + {{- end }} command: - sh - -c @@ -72,6 +79,13 @@ spec: value: "{{ .Values.config.BZZ_TOKEN_ADDRESS }}" - name: BEEKEEPER_ETH_ACCOUNT value: "{{ .Values.config.ETH_ACCOUNT }}" + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.envFrom }} + envFrom: + {{- toYaml . | nindent 12 }} + {{- end }} command: {{- range .Values.config.command }} - {{ . }} diff --git a/charts/beekeeper/values.yaml b/charts/beekeeper/values.yaml index 15c9b42..c538da7 100644 --- a/charts/beekeeper/values.yaml +++ b/charts/beekeeper/values.yaml @@ -31,6 +31,30 @@ resources: {} nodeSelector: {} +## Additional environment variables for the beekeeper container. +## Use this to supply secrets rather than putting them in config.command, +## where they end up readable in the Job/CronJob spec. +## +## Beekeeper reads any flag from the environment as BEEKEEPER_, with +## dashes replaced by underscores, so --wallet-key can be provided as +## BEEKEEPER_WALLET_KEY instead of being passed on the command line. +## +## Example: +# extraEnv: +# - name: BEEKEEPER_WALLET_KEY +# valueFrom: +# secretKeyRef: +# name: beekeeper-wallet-key +# key: walletKey +extraEnv: [] + +## Populate environment variables from Secrets or ConfigMaps. +## Example: +# envFrom: +# - secretRef: +# name: beekeeper-wallet-key +envFrom: [] + config: command: ["beekeeper", "check"] parallelism: 1