Skip to content

Commit

Permalink
cronjobs: add secret key and admin access token to environment
Browse files Browse the repository at this point in the history
Add `REANA_SECRET_KEY` and `REANA_ADMIN_ACCESS_TOKEN` environment
variables to cronjobs. The former is needed to decrypt the tokens in the
database, the latter is needed to execute `reana-admin` commands.

Closes reanahub/reana-server#489
  • Loading branch information
mdonadoni committed Jun 29, 2023
1 parent 14d5186 commit 198e8c7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions helm/reana/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ spec:
secretKeyRef:
name: {{ include "reana.prefix" . }}-admin-access-token
key: ADMIN_ACCESS_TOKEN
- name: REANA_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ include "reana.prefix" . }}-secrets
key: REANA_SECRET_KEY
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
Expand Down Expand Up @@ -256,6 +261,16 @@ spec:
{{- end }}
- name: REANA_COMPONENT_PREFIX
value: {{ include "reana.prefix" . }}
- name: REANA_ADMIN_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "reana.prefix" . }}-admin-access-token
key: ADMIN_ACCESS_TOKEN
- name: REANA_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ include "reana.prefix" . }}-secrets
key: REANA_SECRET_KEY
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
Expand Down Expand Up @@ -340,6 +355,16 @@ spec:
{{- end }}
- name: REANA_COMPONENT_PREFIX
value: {{ include "reana.prefix" . }}
- name: REANA_ADMIN_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "reana.prefix" . }}-admin-access-token
key: ADMIN_ACCESS_TOKEN
- name: REANA_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ include "reana.prefix" . }}-secrets
key: REANA_SECRET_KEY
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
Expand Down

0 comments on commit 198e8c7

Please sign in to comment.