kots

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitOPALinting

func InitOPALinting() error

Types

type EnterprisePolicy added in v0.1.2

type EnterprisePolicy struct {
	Name   string `json:"name"`
	Policy string `json:"policy"`
}

type GVKDoc

type GVKDoc struct {
	Kind       string      `yaml:"kind" json:"kind" validate:"required"`
	APIVersion string      `yaml:"apiVersion" json:"apiVersion"`
	Metadata   GVKMetadata `yaml:"metadata" json:"metadata"`
}

type GVKMetadata

type GVKMetadata struct {
	Name      string `yaml:"name" json:"name"`
	Namespace string `yaml:"namespace" json:"namespace"`
}

type LintExpression

type LintExpression struct {
	Rule      string                       `json:"rule"`
	Type      string                       `json:"type"`
	Message   string                       `json:"message"`
	Path      string                       `json:"path"`
	Positions []LintExpressionItemPosition `json:"positions"`
}

func EnterpriseLintSpecFiles added in v0.1.2

func EnterpriseLintSpecFiles(specFiles SpecFiles, policies []EnterprisePolicy) ([]LintExpression, error)

func LintBuilders added in v0.2.98

func LintBuilders(ctx context.Context, files SpecFiles) ([]LintExpression, error)

func LintSpecFiles

func LintSpecFiles(ctx context.Context, specFiles SpecFiles) ([]LintExpression, bool, error)

func TroubleshootLintSpec added in v0.2.1

func TroubleshootLintSpec(spec string) ([]LintExpression, error)

type LintExpressionItemLinePosition

type LintExpressionItemLinePosition struct {
	Line int `json:"line"`
}

type LintExpressionItemPosition

type LintExpressionItemPosition struct {
	Start LintExpressionItemLinePosition `json:"start"`
}

type LintExpressionsByRule added in v0.2.98

type LintExpressionsByRule []LintExpression

func (LintExpressionsByRule) Len added in v0.2.98

func (a LintExpressionsByRule) Len() int

func (LintExpressionsByRule) Less added in v0.2.98

func (a LintExpressionsByRule) Less(i, j int) bool

func (LintExpressionsByRule) Swap added in v0.2.98

func (a LintExpressionsByRule) Swap(i, j int)

type OPALintExpression

type OPALintExpression struct {
	Rule     string `json:"rule"`
	Type     string `json:"type"`
	Message  string `json:"message"`
	Path     string `json:"path"`
	DocIndex int    `json:"docIndex"`
	Field    string `json:"field"`
	Match    string `json:"match"`
}

type RenderTemplateError added in v0.0.8

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

func (RenderTemplateError) Error added in v0.0.8

func (r RenderTemplateError) Error() string

func (RenderTemplateError) Match added in v0.2.2

func (r RenderTemplateError) Match() string

type SpecFile

type SpecFile struct {
	Name            string    `json:"name"`
	Path            string    `json:"path"`
	Content         string    `json:"content"`
	DocIndex        int       `json:"docIndex,omitempty"`
	AllowDuplicates bool      `json:"allowDuplicates"` // kotskinds can be duplicated if they are coming from secrets or configmaps
	Children        SpecFiles `json:"children"`
}

type SpecFiles

type SpecFiles []SpecFile

func GetEmbeddedTroubleshootSpecs added in v0.3.7

func GetEmbeddedTroubleshootSpecs(ctx context.Context, specsFiles SpecFiles) SpecFiles

func GetFilesFromChartReader added in v0.2.98

func GetFilesFromChartReader(ctx context.Context, r io.Reader) (SpecFiles, error)

GetFilesFromChartReader will render chart templates and return the resulting files This function will ignore missing required values. This function will also not validate value types.

func SpecFilesFromTar added in v0.2.0

func SpecFilesFromTar(reader io.Reader) (SpecFiles, error)

func SpecFilesFromTarGz added in v0.2.0

func SpecFilesFromTarGz(tarGz SpecFile) (SpecFiles, error)

Jump to

Keyboard shortcuts

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