Commit 71b70999 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #42813 from csbell/e2e-dns-name

Automatic merge from submit-queue [Federation] Prevent trailing periods in kube-dns federations domains kubefed-level fix to catch cases where FEDERATIONS_DOMAIN_MAP is not set in the environment (i.e. CI). Addresses https://github.com/kubernetes/kubernetes/issues/42809
parents 6522344b bcad7093
...@@ -829,7 +829,9 @@ func createControllerManager(clientset client.Interface, namespace, name, svcNam ...@@ -829,7 +829,9 @@ func createControllerManager(clientset client.Interface, namespace, name, svcNam
// TODO: the name/domain name pair should ideally be checked for naming convention // TODO: the name/domain name pair should ideally be checked for naming convention
// as done in kube-dns federation flags check. // as done in kube-dns federation flags check.
// https://github.com/kubernetes/dns/blob/master/pkg/dns/federation/federation.go // https://github.com/kubernetes/dns/blob/master/pkg/dns/federation/federation.go
util.FedDomainMapKey: fmt.Sprintf("%s=%s", name, dnsZoneName), // TODO v2: Until kube-dns can handle trailing periods we strip them all.
// See https://github.com/kubernetes/dns/issues/67
util.FedDomainMapKey: fmt.Sprintf("%s=%s", name, strings.TrimRight(dnsZoneName, ".")),
}, },
}, },
Spec: extensions.DeploymentSpec{ Spec: extensions.DeploymentSpec{
......
...@@ -936,7 +936,7 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na ...@@ -936,7 +936,7 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
Namespace: namespaceName, Namespace: namespaceName,
Labels: componentLabel, Labels: componentLabel,
Annotations: map[string]string{ Annotations: map[string]string{
util.FedDomainMapKey: fmt.Sprintf("%s=%s", federationName, dnsZoneName), util.FedDomainMapKey: fmt.Sprintf("%s=%s", federationName, strings.TrimRight(dnsZoneName, ".")),
}, },
}, },
Spec: v1beta1.DeploymentSpec{ Spec: v1beta1.DeploymentSpec{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment