Documentation
¶
Overview ¶
Package resources provides helpers that materialise Kubernetes objects described by sample/template YAML files into a running cluster.
Index ¶
- func CreateResourceFromFile(env *environment.TestingEnvironment, namespace, sampleFilePath string)
- func CreateResourcesFromFileWithError(env *environment.TestingEnvironment, namespace, sampleFilePath string) error
- func DeleteResourcesFromFile(env *environment.TestingEnvironment, namespace, sampleFilePath string) error
- func GetYAMLContent(env *environment.TestingEnvironment, sampleFilePath string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResourceFromFile ¶
func CreateResourceFromFile(env *environment.TestingEnvironment, namespace, sampleFilePath string)
CreateResourceFromFile creates the Kubernetes objects defined in a YAML sample file inside the namespace, retrying transient failures.
func CreateResourcesFromFileWithError ¶
func CreateResourcesFromFileWithError(env *environment.TestingEnvironment, namespace, sampleFilePath string) error
CreateResourcesFromFileWithError parses the YAML at sampleFilePath and creates each contained object, returning the first error encountered.
func DeleteResourcesFromFile ¶
func DeleteResourcesFromFile(env *environment.TestingEnvironment, namespace, sampleFilePath string) error
DeleteResourcesFromFile deletes every Kubernetes object described in the YAML at sampleFilePath, returning the first error encountered.
func GetYAMLContent ¶
func GetYAMLContent(env *environment.TestingEnvironment, sampleFilePath string) ([]byte, error)
GetYAMLContent reads a .yaml or .template file and returns its content.
.template files are run through envsubst so SHELL-FORMAT variables are substituted using both the process environment and a small set of e2e defaults derived from env.
Types ¶
This section is empty.