Skip to content

Commit

Permalink
fix(helm): harmonize REANA_HOST confugirations (#867)
Browse files Browse the repository at this point in the history
This PR is part of harmonizing the treatment of REANA_HOSTNAME
accross all REANA components and introduces REANA_HOSTPORT Helm
value. You can refer to other PRs below.

reenahub/reana-server#717
reanahub/reana-workflow-controller#630

Closes #865
  • Loading branch information
Alputer committed Jan 31, 2025
1 parent b2074bc commit a256dc4
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
3 changes: 2 additions & 1 deletion helm/reana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ collisions.
| `notifications.email_config.smtp_port` | SMTP email server port | None |
| `notifications.enabled` | Enable REANA system events notifications. For more information, visit the [documentation page](https://docs.reana.io/administration/configuration/configuring-access/) on user sign up. | false |
| `notifications.system_status` | Cronjob pattern representing how often the system status notification should be sent. Leave it empty to deactivate it | `"0 0 * * *"` |
| `reana_hostname` | REANA hostname (e.g. reana.example.org) | None |
| `reana_hostname` | REANA hostname (e.g. reana.example.org) | localhost |
| `reana_hostport` | REANA ingress port | 30443 |
| `namespace_runtime` | Namespace in which the REANA runtime pods (workflow engines, jobs etc...) will run | `.Release.Namespace` |
| `naming_scheme` | REANA component naming scheme | None |
| `opensearch.*` | Pass any value from [OpenSearch Helm chart values](https://github.com/opensearch-project/helm-charts/tree/main/charts/opensearch#configuration) here | - |
Expand Down
4 changes: 2 additions & 2 deletions helm/reana/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ finalise its configuration.

4. Try to run your first REANA example:

$ firefox https://{{ default "localhost:30443" .Values.reana_hostname }}
$ firefox https://{{ .Values.reana_hostname }}:{{.Values.reana_hostport}}

Or, using command line:

$ # install REANA client
$ pip install --user reana-client
$ # set environment variables for REANA client
$ export REANA_SERVER_URL=https://{{ default "localhost:30443" .Values.reana_hostname }}
$ export REANA_SERVER_URL=https://{{ .Values.reana_hostname }}:{{.Values.reana_hostport}}
$ export REANA_ACCESS_TOKEN="$mytoken"
$ # test connection to the REANA cluster
$ reana-client ping
Expand Down
8 changes: 4 additions & 4 deletions helm/reana/templates/reana-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ spec:
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.reana_hostname }}
- name: REANA_HOSTNAME
value: {{ .Values.reana_hostname }}
{{- end }}
{{- if .Values.reana_hostname }}
- name: REANA_HOSTNAME
value: {{ .Values.reana_hostname }}
{{- end }}
- name: CERN_CONSUMER_KEY
valueFrom:
secretKeyRef:
Expand Down
16 changes: 12 additions & 4 deletions helm/reana/templates/reana-workflow-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,14 @@ spec:
- name: REANA_DASK_CLUSTER_MAX_SINGLE_WORKER_MEMORY
value: {{ .Values.dask.cluster_max_single_worker_memory | default "8Gi" }}
{{- end }}
{{- if .Values.reana_hostname }}
- name: REANA_HOSTNAME
value: {{ .Values.reana_hostname }}
{{- end }}
{{- if .Values.reana_hostname }}
- name: REANA_HOSTNAME
value: {{ .Values.reana_hostname }}
{{- end }}
{{- if .Values.reana_hostport }}
- name: REANA_HOSTPORT
value: {{ .Values.reana_hostport }}
{{- end }}
{{- if .Values.eos.enabled }}
- name: K8S_CERN_EOS_AVAILABLE
value: "True"
Expand Down Expand Up @@ -292,6 +296,10 @@ spec:
- name: REANA_HOSTNAME
value: {{ .Values.reana_hostname }}
{{- end }}
{{- if .Values.reana_hostport }}
- name: REANA_HOSTPORT
value: {{ .Values.reana_hostport }}
{{- end }}
{{- if .Values.debug.enabled }}
- name: WDB_SOCKET_SERVER
value: "{{ include "reana.prefix" . }}-wdb"
Expand Down
2 changes: 1 addition & 1 deletion helm/reana/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ metadata:
"helm.sh/resource-policy": keep
type: kubernetes.io/tls
data:
{{- $cert := genSelfSignedCert (.Values.reana_hostname | default "localhost") nil nil 90 }}
{{- $cert := genSelfSignedCert (.Values.reana_hostname) nil nil 90 }}
tls.crt: {{ $cert.Cert | b64enc | quote }}
tls.key: {{ $cert.Key | b64enc | quote }}
{{- end }}
Expand Down
9 changes: 7 additions & 2 deletions helm/reana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# reana_hostname: reana.cern.ch
reana_hostname: localhost
# `reana_hostname` should be set for third party integrations to work and for
# production deployments to be secure.
# production deployments to be secure. The default `localhost` value is used
# in local deployment scenarios.
reana_hostport_http: 30080
reana_hostport_https: 30443
# `reana_hostport_http` and `reana_hostport_https` should be set to same port
# you expose in your ingress controller.

debug:
enabled: false
Expand Down

0 comments on commit a256dc4

Please sign in to comment.