Skip to content

Commit

Permalink
feat(helm): allow cluster administrator to configure ingress host (re…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alputer committed Jun 18, 2024
1 parent 1dc2116 commit a7c9c85
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The list of contributors in alphabetical order:

- [Adelina Lintuluoto](https://orcid.org/0000-0002-0726-1452)
- [Alp Tuna](https://orcid.org/0009-0001-1915-3993)
- [Anton Khodak](https://orcid.org/0000-0003-3263-4553)
- [Audrius Mecionis](https://orcid.org/0000-0002-3759-1663)
- [Camila Diaz](https://orcid.org/0000-0001-5543-797X)
Expand Down
3 changes: 3 additions & 0 deletions reana_workflow_controller/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ def _env_vars_dict_to_k8s_list(env_vars):
REANA_INGRESS_ANNOTATIONS = json.loads(os.getenv("REANA_INGRESS_ANNOTATIONS", "{}"))
"""REANA Ingress annotations defined by the administrator."""

REANA_INGRESS_HOST = os.getenv("REANA_INGRESS_HOST", "")
"""REANA Ingress host defined by the administrator."""

IMAGE_PULL_SECRETS = os.getenv("IMAGE_PULL_SECRETS", "").split(",")
"""Docker image pull secrets which allow the usage of private images."""

Expand Down
7 changes: 5 additions & 2 deletions reana_workflow_controller/k8s.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of REANA.
# Copyright (C) 2019, 2020, 2021, 2022 CERN.
# Copyright (C) 2019, 2020, 2021, 2022, 2024 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -26,6 +26,7 @@
JUPYTER_INTERACTIVE_SESSION_DEFAULT_IMAGE,
JUPYTER_INTERACTIVE_SESSION_DEFAULT_PORT,
REANA_INGRESS_ANNOTATIONS,
REANA_INGRESS_HOST,
)


Expand Down Expand Up @@ -103,7 +104,9 @@ def _build_ingress(self):
]
)
spec = client.V1IngressSpec(
rules=[client.V1IngressRule(http=ingress_rule_value)]
rules=[
client.V1IngressRule(http=ingress_rule_value, host=REANA_INGRESS_HOST)
]
)
ingress = client.V1Ingress(
api_version="networking.k8s.io/v1",
Expand Down

0 comments on commit a7c9c85

Please sign in to comment.