utils

package
v6.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleFile

func HandleFile(yamlFile string) ([]byte, error)

HandleFile takes a file path and returns the resulting byte array. If an empty string ("") or hyphen ("-") is provided, input is read from stdin.

func ProcessTemplate

func ProcessTemplate(yamlBytes []byte, hubKubeConfigPath, clusterName string) ([]byte, error)

ProcessTemplate takes a YAML byte array input, unmarshals it to a Policy, processes the templates, and marshals it back to YAML, returning the resulting byte array. Validation is performed along the way, returning an error if any failures are found. It uses the `hubKubeConfigPath` and `clusterName` to establish a dynamic client with the hub to resolve any hub templates it finds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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