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
This commit is contained in:
Kubernetes Submit Queue 2017-03-09 23:39:42 -08:00 committed by GitHub
commit 71b7099944
2 changed files with 4 additions and 2 deletions

View File

@ -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
// as done in kube-dns federation flags check.
// 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{

View File

@ -936,7 +936,7 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
Namespace: namespaceName,
Labels: componentLabel,
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{