Skip to content

Commit

Permalink
feat(helm): introduce traefik.external Helm chart value (reanahub#866)
Browse files Browse the repository at this point in the history
Introduces a new Helm chart value `traefik.external` instructing REANA
whether Traefik is already provided externally and should not be
deployed by REANA itself.  In this case, REANA will only add necessary
roles for Traefik middleware.

- If `traefik.external` is set to `true` and `traefik.enabled` is set to
  `false` the Helm chart will assume an external Traefik instance is
  managing ingress, and it will not deploy Traefik within the cluster.
- If `traefik.external` is set to `false` and `traefik.enabled` is set
  to `true`, the default behaviour remains unchanged, and Traefik will
  be installed as part of the REANA deployment.

This change fixes cluster role issues and provides greater flexibility
for users who want to manage Traefik separately or already have an
existing instance in their cluster.

Closes reanahub#852
  • Loading branch information
Alputer committed Jan 31, 2025
1 parent 06fa887 commit b2074bc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions helm/reana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ collisions.
| `shared_storage.hostpath.root_path` | Path to the REANA directory inside the underlying storage volume | /var/reana |
| `traefik.*` | Pass any value from [Traefik Helm chart values](https://github.com/helm/charts/tree/master/stable/traefik#configuration) here, e.g. `traefik.rbac.enabled=true` | - |
| `traefik.enabled` | Install Traefik in the cluster when installing REANA | true |
| `traefik.external` | Use an externally installed Traefik instance | false |
| `volume_paths.root_path` | Path to the REANA directory inside the underlying storage volume | /var/reana |
| `volume_paths.shared_volume_path` | Path inside the REANA components where the shared volume will be mounted | /var/reana |
| `quota.enabled` | Enable user workflow accounting capabilities. | true |
Expand Down
4 changes: 4 additions & 0 deletions helm/reana/templates/reana-workflow-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ spec:
value: {{ .Values.components.reana_job_controller.environment | toJson | quote }}
- name: REANA_INTERACTIVE_SESSIONS_ENVIRONMENTS
value: {{ .Values.interactive_sessions.environments | toJson | quote }}
- name: TRAEFIK_ENABLED
value: {{ .Values.traefik.enabled | quote | default "true" }}
- name: TRAEFIK_EXTERNAL
value: {{ .Values.traefik.external | quote | default "false" }}
- name: DASK_ENABLED
value: {{ .Values.dask.enabled | quote }}
{{- if .Values.dask.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion helm/reana/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rules:
verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]
{{- end }}
# Traefik Middleware permissions
{{- if and .Values.traefik.enabled .Values.dask.enabled }}
{{- if and .Values.dask.enabled (or .Values.traefik.enabled .Values.traefik.external) }}
- apiGroups: ["traefik.io"]
resources: ["middlewares"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
Expand Down
1 change: 1 addition & 0 deletions helm/reana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ traefik:
# without additional configs will use default insecure one
enabled: true
enabled: true
external: false
rbac:
enabled: true
service:
Expand Down

0 comments on commit b2074bc

Please sign in to comment.