Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterised Kubernetes service DNS domain #375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion reana_commons/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,17 @@ def load(cls, kind):
"""Kubernetes namespace in which REANA infrastructure is currently deployed."""

REANA_INFRASTRUCTURE_COMPONENTS_HOSTNAMES = {
KUBERNETES_SERVICE_DNS_DOMAIN = os.getenv(
"KUBERNETES_SERVICE_DNS_DOMAIN", "cluster.local"
)
"""Kubernetes service DNS domain"""
component_name: (
"{component_prefix}-{component_name}.{namespace}.svc.cluster.local"
"{component_prefix}-{component_name}.{namespace}.svc.{service_dns_domain}"
).format(
component_prefix=REANA_COMPONENT_PREFIX,
component_name=component_name,
namespace=REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE,
service_dns_domain=KUBERNETES_SERVICE_DNS_DOMAIN,
)
for component_name in REANA_INFRASTRUCTURE_COMPONENTS
}
Expand Down