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

Remove hard-coding of cluster domain #83

Open
sjgiri opened this issue Apr 16, 2020 · 0 comments
Open

Remove hard-coding of cluster domain #83

sjgiri opened this issue Apr 16, 2020 · 0 comments

Comments

@sjgiri
Copy link

sjgiri commented Apr 16, 2020

Currently, the template definition svc-domain hardcodes
the cluster domain to be cluster.local. For environments where
the cluster domain suffix could be different, hdfs chart does not
work.
The following can be a potential fix.

diff --git a/charts/hdfs-k8s/templates/_helpers.tpl b/charts/hdfs-k8s/templates/_helpers.tpl
index 9d03c4d..84803db 100644
--- a/charts/hdfs-k8s/templates/_helpers.tpl
+++ b/charts/hdfs-k8s/templates/_helpers.tpl
@@ -163,7 +163,7 @@ The HDFS config file should specify FQDN of services. Otherwise, Kerberos
 login may fail.
 */}}
 {{- define "svc-domain" -}}
-{{- printf "%s.svc.cluster.local" .Release.Namespace -}}
+{{- printf "%s.svc.%s" .Release.Namespace .Values.global.cluster_domain_suffix -}}
 {{- end -}}
 
 {{/*
diff --git a/charts/hdfs-k8s/values.yaml b/charts/hdfs-k8s/values.yaml
index 77ca3fe..8e313d2 100644
--- a/charts/hdfs-k8s/values.yaml
+++ b/charts/hdfs-k8s/values.yaml
@@ -170,6 +170,9 @@ hdfs-krb5-k8s:
 ## Global values affecting all sub-charts:
 ## ------------------------------------------------------------------------------
 global:
+  # Domain suffix to be used for FQDN
+  cluster_domain_suffix: cluster.local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant