vet

package
v1.15.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidAPIResourcesCode = "1064"

InvalidAPIResourcesCode represents that we were unable to parse the api-resources.txt in a repo for some reason.

Variables

View Source
var APIResourcesCommand = fmt.Sprintf("kubectl api-resources > %s", APIResourcesPath.SlashPath())

APIResourcesCommand is the command users should run in policyDir to cache the API Resources they want to be available to nomos vet.

View Source
var APIResourcesPath = cmpath.RelativeSlash("api-resources.txt")

APIResourcesPath is the path from policyDir to the cached API Resources.

Functions

func AddCachedAPIResources

func AddCachedAPIResources(file cmpath.Absolute) discovery.AddResourcesFunc

AddCachedAPIResources adds the API Resources from the output of kubectl api-resources and adds them to the passed Scoper.

scoper is the Scoper to add resources to. file is the file to read API Resources from.

func InvalidScopeValue

func InvalidScopeValue(path cmpath.Absolute, line, value string) status.Error

InvalidScopeValue means that a line had an unexpected scope for its type.

func MissingAPIGroup

func MissingAPIGroup(path cmpath.Absolute) status.Error

MissingAPIGroup means that the api-resources.txt is either missing the header row, or was generated with an option that omitted the APIGROUP column.

func UnableToReadAPIResources

func UnableToReadAPIResources(path cmpath.Absolute, err error) status.Error

UnableToReadAPIResources represents that api-resources.txt exists, but we were unable to read it from the disk for some reason.

Types

This section is empty.

Jump to

Keyboard shortcuts

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