Documentation ¶
Index ¶
- Variables
- func AggregateFiles(args []string, directories []string) ([]string, error)
- func Convert(resource runtime.Object, b []byte, fileName string) (*utils.ResourceInfo, error)
- func Execute()
- func GetConfigPath() (string, bool)
- func GetFiles(filenames []string, args []string) ([]*os.File, error)
- func GetResourcesGroupedByKind(resources []*utils.ResourceInfo) map[string][]*utils.ResourceInfo
- func GetResourcesGroupedByLabel(resources []*utils.ResourceInfo) map[string][]*utils.ResourceInfo
- func MakeResourceInformation(b []byte, fileName string) (*utils.ResourceInfo, error)
- func PrintDefault(resources []*utils.ResourceInfo)
- func PrintDependencyInformation(dependencies []*utils.DependencyInformation)
- func PrintFilteredByKind(resources []*utils.ResourceInfo, kind string)
- func PrintGroupByKind(resources []*utils.ResourceInfo)
- func PrintGroupByLabel(resources []*utils.ResourceInfo)
- func PrintLabels(labels map[string][]string)
- func ReportFixes(errorFixes []string)
- func StripAndWriteToBytesSlice(s *json.Serializer, o runtime.Object) ([]byte, error)
- type Colour
- type Selection
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Directories = []string{} StandaloneLintMode bool Fix bool OutPath string Report bool )
View Source
var RootCmd = &cobra.Command{
Use: "k8sutil",
Short: "Command-line utility for working with kubernetes resources",
}
Functions ¶
func AggregateFiles ¶
copied and pasted directly from kubeval/main.go. I realy just needed to process the command line arguments and send them off. Is this plagiarism
func Execute ¶
func Execute()
Execute is called by main.main(). It only needs to happen once to the rootCmd.
func GetConfigPath ¶
func GetResourcesGroupedByKind ¶
func GetResourcesGroupedByKind(resources []*utils.ResourceInfo) map[string][]*utils.ResourceInfo
func GetResourcesGroupedByLabel ¶
func GetResourcesGroupedByLabel(resources []*utils.ResourceInfo) map[string][]*utils.ResourceInfo
func MakeResourceInformation ¶
func MakeResourceInformation(b []byte, fileName string) (*utils.ResourceInfo, error)
func PrintDefault ¶
func PrintDefault(resources []*utils.ResourceInfo)
func PrintDependencyInformation ¶
func PrintDependencyInformation(dependencies []*utils.DependencyInformation)
func PrintFilteredByKind ¶
func PrintFilteredByKind(resources []*utils.ResourceInfo, kind string)
func PrintGroupByKind ¶
func PrintGroupByKind(resources []*utils.ResourceInfo)
func PrintGroupByLabel ¶
func PrintGroupByLabel(resources []*utils.ResourceInfo)
func PrintLabels ¶
func ReportFixes ¶
func ReportFixes(errorFixes []string)
func StripAndWriteToBytesSlice ¶
Remove unnecessary fields from the runtime Object so that we don't accidentally get fields that are empty becoming marshalled. One example is that creationTimestamp: null always appears because apparently encoding/json cannot handle the empty struct and prints null anyway. Very annoying.
Types ¶
Click to show internal directories.
Click to hide internal directories.