Documentation
¶
Index ¶
- Constants
- Variables
- func AddCachedAPIResources(file cmpath.Absolute) discovery.AddResourcesFunc
- func InvalidScopeValue(path cmpath.Absolute, line, value string) status.Error
- func MissingAPIVersion(path cmpath.Absolute) status.Error
- func UnableToReadAPIResources(path cmpath.Absolute, err error) status.Error
Constants ¶
const InvalidAPIResourcesCode = "1064"
InvalidAPIResourcesCode represents that we were unable to parse the api-resources.txt in a repo for some reason.
Variables ¶
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.
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 ¶
InvalidScopeValue means that a line had an unexpected scope for its type.
func MissingAPIVersion ¶ added in v1.16.2
MissingAPIVersion means that the api-resources.txt is either missing the header row, or was generated with an option that omitted the APIVERSION column.
Types ¶
This section is empty.