hostutils

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// this suffix is used as the default for federated fqdns; this is due to the
	// fact that istio Coredns comes with the *.global suffix already configured:
	// https://istio.io/latest/docs/setup/install/multicluster/gateways/
	DefaultHostnameSuffix = "global"
)

Variables

This section is empty.

Functions

func BuildFederatedFQDN added in v0.12.0

func BuildFederatedFQDN(serviceRef ezkube.ClusterResourceId, virtualMeshSpec *v1.VirtualMeshSpec) string

Construct a federated FQDN for the given service, using the provided hostname suffix if provided, otherwise use default suffix.

func GetFederatedHostnameSuffix added in v0.12.0

func GetFederatedHostnameSuffix(virtualMeshSpec *v1.VirtualMeshSpec) string

Types

type ClusterDomainRegistry

type ClusterDomainRegistry interface {
	// get the domain suffix used by the cluster
	GetClusterDomain(clusterName string) string

	// get the local FQDN of a service in a given cluster.
	// this is the Kubernetes DNS name that clients within that cluster
	// can use to communicate to this cluster.
	GetLocalFQDN(serviceRef ezkube.ClusterResourceId) string

	// get the remote FQDN of a service in a given cluster.
	// this is the DNS name used by Gloo Mesh
	// to establish cross-cluster connectivity.
	GetFederatedFQDN(serviceRef ezkube.ClusterResourceId) string

	// get the FQDN of a service which is being addressed as a
	// destination, e.g. for a traffic split or mirror policy.
	// this will either be the Local or Remote FQDN, depending on the
	// originating cluster.
	GetDestinationFQDN(originatingCluster string, serviceRef ezkube.ClusterResourceId) string
}

ClusterDomainRegistry retrieves known cluster domain suffixes for registered clusters. Returns the default 'cluster.local' when domain cannot be found

Directories

Path Synopsis
Package mock_hostutils is a generated GoMock package.
Package mock_hostutils is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL