-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix hard-coded cluster.local domain (#10306)
Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Sam Heilbron <[email protected]>
- Loading branch information
1 parent
0ed35ac
commit 208226b
Showing
4 changed files
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
changelog: | ||
- type: FIX | ||
issueLink: https://github.com/solo-io/gloo/issues/10268 | ||
resolvesIssue: false | ||
description: >- | ||
Fix issue where Gloo Gateway did not respect the cluster domain for the xds host address. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
package kubeutils | ||
|
||
import ( | ||
"fmt" | ||
|
||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
const ( | ||
// ClusterInternalDomainName is the internal domain for a Kubernetes Cluster | ||
ClusterInternalDomainName = "cluster.local" | ||
"knative.dev/pkg/network" | ||
) | ||
|
||
// ServiceFQDN returns the FQDN for the Service, assuming it is being accessed from within the Cluster | ||
// https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#services | ||
func ServiceFQDN(serviceMeta metav1.ObjectMeta) string { | ||
return fmt.Sprintf("%s.%s.svc.%s", serviceMeta.GetName(), serviceMeta.GetNamespace(), ClusterInternalDomainName) | ||
return network.GetServiceHostname(serviceMeta.Name, serviceMeta.Namespace) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters