configvalidator

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

README

How it works

  1. execute Kiali's config validator as a library and get the results (in validation_kiali.go)
    • If the file paths are provided as command line arguments, then we pass them so that we can locally test these yamls against the live cluster before actually applying.
  2. execute istioctl analyze directly, and parse the outputted results (in validation_istio.go)
    • If the file paths are provided as command line arguments, then we pass them so that we can locally test these yamls against the live cluster before actually applying.
    • Parsing the istioctl analyze's stdout directly is a little hacky (See parseIstioctlAnalyzeResult function in validation_istio.go). After Kiali's upgrade of client-go, we should use istioctl's analysis as a library (See #44).
  3. print the results

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SeverityLevelError   = Severity{Name: "Error", /* contains filtered or unexported fields */}
	SeverityLevelWarn    = Severity{Name: "Warning", /* contains filtered or unexported fields */}
	SeverityLevelInfo    = Severity{Name: "Info", /* contains filtered or unexported fields */}
	SeverityLevelUnknown = Severity{Name: "Info", /* contains filtered or unexported fields */}

	SeverityNames = []string{SeverityLevelError.Name, SeverityLevelWarn.Name, SeverityLevelInfo.Name}
)
View Source
var ErrConfigIssuesFound = errors.New("getmesh config validation exit with istio config issues")

Functions

This section is empty.

Types

type ConfigValidator

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

ConfigValidator is general structure for validating istio config preset in current live-cluster

func New

func New(homedir, namespace, outputThreshold string, files []string) (*ConfigValidator, error)

InitConfigValidator initialize the ConfigValidator struct.

func (*ConfigValidator) Validate

func (cv *ConfigValidator) Validate() error

type Severity

type Severity struct {
	Name string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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