istio: Index | Files

package util

import ""


Package Files

config.go constants.go exportto.go hosts.go


const (
    DefaultKubernetesDomain = "svc." + constants.DefaultKubernetesDomain
    MeshGateway             = "mesh"
    ExportToNamespaceLocal  = "."
    ExportToAllNamespaces   = "*"
    Wildcard                = "*"

func ConvertHostToFQDN Uses

func ConvertHostToFQDN(namespace resource.Namespace, host string) string

ConvertHostToFQDN returns the given host as a FQDN, if it isn't already.

func GetFullNameFromFQDN Uses

func GetFullNameFromFQDN(fqdn string) resource.FullName

GetFullNameFromFQDN tries to parse namespace and name from a fqdn. Empty strings are returned if either namespace or name cannot be parsed.

func GetResourceNameFromHost Uses

func GetResourceNameFromHost(defaultNamespace resource.Namespace, host string) resource.FullName

GetResourceNameFromHost figures out the resource.FullName to look up from the provided host string We need to handle two possible formats: short name and FQDN

func IsExportToAllNamespaces Uses

func IsExportToAllNamespaces(exportTos []string) bool

IsExportToAllNamespaces returns true if export to applies to all namespaces and false if it is set to namespace local.

func IsIstioControlPlane Uses

func IsIstioControlPlane(r *resource.Instance) bool

IsIstioControlPlane returns true for resources that are part of the Istio control plane

func IsSystemNamespace Uses

func IsSystemNamespace(ns resource.Namespace) bool

IsSystemNamespace returns true for system namespaces

func MeshConfig Uses

func MeshConfig(ctx analysis.Context) *v1alpha1.MeshConfig

MeshConfig returns the mesh configuration object associated with the context Analyzers that call this should include metadata.IstioMeshV1Alpha1MeshConfig as an input in their Metadata

type ScopedFqdn Uses

type ScopedFqdn string

func NewScopedFqdn Uses

func NewScopedFqdn(scope string, namespace resource.Namespace, host string) ScopedFqdn

NewScopedFqdn converts the passed host to FQDN if needed and applies the passed scope.

func (ScopedFqdn) GetScopeAndFqdn Uses

func (s ScopedFqdn) GetScopeAndFqdn() (string, string)

GetScopeAndFqdn splits ScopedFqdn back to scope namespace and fqdn parts

Package util imports 7 packages (graph) and is imported by 3 packages. Updated 2020-05-29. Refresh now. Tools for package owners.