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

package local

import "istio.io/istio/galley/pkg/config/analysis/local"

Index

Package Files

analyze.go defaults.go source.go

type AnalysisResult Uses

type AnalysisResult struct {
    Messages          diag.Messages
    SkippedAnalyzers  []string
    ExecutedAnalyzers []string
}

AnalysisResult represents the returnable results of an analysis execution

type ReaderSource Uses

type ReaderSource struct {
    // Name is the name of the source (commonly the path to a file, but can be "-" for sources read from stdin or "" if completely synthetic).
    Name string
    // Reader is the reader instance to use.
    Reader io.Reader
}

ReaderSource is a tuple of a io.Reader and filepath.

type SourceAnalyzer Uses

type SourceAnalyzer struct {
    // contains filtered or unexported fields
}

SourceAnalyzer handles local analysis of k8s event sources, both live and file-based

func NewSourceAnalyzer Uses

func NewSourceAnalyzer(m *schema.Metadata, analyzer *analysis.CombinedAnalyzer, namespace, istioNamespace resource.Namespace,
    cr snapshotter.CollectionReporterFn, serviceDiscovery bool, timeout time.Duration) *SourceAnalyzer

NewSourceAnalyzer creates a new SourceAnalyzer with no sources. Use the Add*Source methods to add sources in ascending precedence order, then execute Analyze to perform the analysis

func (*SourceAnalyzer) AddDefaultResources Uses

func (sa *SourceAnalyzer) AddDefaultResources() error

AddDefaultResources adds some basic dummy Istio resources, based on mesh configuration. This is useful for files-only analysis cases where we don't expect the user to be including istio system resources and don't want to generate false positives because they aren't there. Respect mesh config when deciding which default resources should be generated

func (*SourceAnalyzer) AddFileKubeMeshConfig Uses

func (sa *SourceAnalyzer) AddFileKubeMeshConfig(file string) error

AddFileKubeMeshConfig gets mesh config from the specified yaml file

func (*SourceAnalyzer) AddFileKubeMeshNetworks Uses

func (sa *SourceAnalyzer) AddFileKubeMeshNetworks(file string) error

AddFileKubeMeshNetworks gets a file meshnetworks and add it to the analyzer.

func (*SourceAnalyzer) AddReaderKubeSource Uses

func (sa *SourceAnalyzer) AddReaderKubeSource(readers []ReaderSource) error

AddReaderKubeSource adds a source based on the specified k8s yaml files to the current SourceAnalyzer

func (*SourceAnalyzer) AddRunningKubeSource Uses

func (sa *SourceAnalyzer) AddRunningKubeSource(k kube.Interfaces)

AddRunningKubeSource adds a source based on a running k8s cluster to the current SourceAnalyzer Also tries to get mesh config from the running cluster, if it can

func (*SourceAnalyzer) Analyze Uses

func (sa *SourceAnalyzer) Analyze(cancel chan struct{}) (AnalysisResult, error)

Analyze loads the sources and executes the analysis

func (*SourceAnalyzer) SetSuppressions Uses

func (sa *SourceAnalyzer) SetSuppressions(suppressions []snapshotter.AnalysisSuppression)

SetSuppressions will set the list of suppressions for the analyzer. Any resource that matches the provided suppression will not be included in the final message output.

Package local imports 34 packages (graph) and is imported by 2 packages. Updated 2020-05-31. Refresh now. Tools for package owners.