istio: istio.io/istio/galley/pkg/config/analysis/analyzers/util Index | Files

package util

import "istio.io/istio/galley/pkg/config/analysis/analyzers/util"

Index

Package Files

config.go constants.go exportto.go hosts.go in_mesh.go service_lookup.go

Constants

const (
    DefaultKubernetesDomain   = "svc." + constants.DefaultKubernetesDomain
    ExportToNamespaceLocal    = "."
    ExportToAllNamespaces     = "*"
    IstioProxyName            = "istio-proxy"
    MeshGateway               = "mesh"
    Wildcard                  = "*"
    MeshConfigName            = "istio"
    InjectionLabelName        = "istio-injection"
    InjectionLabelEnableValue = "enabled"
)

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 DeploymentInMesh Uses

func DeploymentInMesh(r *resource.Instance, c analysis.Context) bool

DeploymentinMesh returns true if deployment is in the service mesh (has sidecar)

func GetDestinationHost Uses

func GetDestinationHost(sourceNs resource.Namespace, host string, serviceEntryHosts map[ScopedFqdn]*v1alpha3.ServiceEntry) *v1alpha3.ServiceEntry

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 https://istio.io/docs/reference/config/networking/v1alpha3/virtual-service/#Destination

func InitServiceEntryHostMap Uses

func InitServiceEntryHostMap(ctx analysis.Context) map[ScopedFqdn]*v1alpha3.ServiceEntry

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 PodInMesh Uses

func PodInMesh(r *resource.Instance, c analysis.Context) bool

PodInMesh returns true if a Pod is in the service mesh (has sidecar)

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

func (ScopedFqdn) InScopeOf Uses

func (s ScopedFqdn) InScopeOf(ns string) bool

InScopeOf returns true if ns is in the scope of ScopedFqdn

Package util imports 10 packages (graph) and is imported by 5 packages. Updated 2020-08-05. Refresh now. Tools for package owners.