Documentation
¶
Index ¶
- func GetChartVersion() (string, error)
- func GetOtelConfigFromTemplate(t *testing.T, templateContent string) string
- func GetOtelConfigYaml(t *testing.T, valuesYaml string, templatePath string) string
- func GetServiceMonitors(t *testing.T, valuesYaml string, templatePath string) []*monitoringv1.ServiceMonitor
- func RenderTemplate(t *testing.T, options *helm.Options, chartDir string, releaseName string, ...) string
- func RenderTemplateE(t *testing.T, options *helm.Options, chartDir string, releaseName string, ...) (string, error)
- func RenderTemplateFromValuesFile(t *testing.T, valuesYaml string, templatePath string) (string, error)
- func RenderTemplateFromValuesString(t *testing.T, valuesYaml string, templatePath string) string
- func RenderTemplateFromValuesStringE(t *testing.T, valuesYaml string, templatePath string) (string, error)
- func SplitYaml(yamlDocs string) ([]string, error)
- func UnmarshalMultipleFromYaml[T any](t *testing.T, yamlDocs string) []T
- func UnmarshalMultipleK8sObjectsFromYaml(yamlDocs string) (objects []runtime.Object, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOtelConfigFromTemplate ¶
GetOtelConfigFromTemplate takes otel ConfigMap template content and returns the otel configuration as a yaml string
func GetOtelConfigYaml ¶
GetOtelConfigYaml renders the given template using a values string, assumes it's an otel ConfigMap, and returns the otel configuration as a yaml string
func GetServiceMonitors ¶
func GetServiceMonitors(t *testing.T, valuesYaml string, templatePath string) []*monitoringv1.ServiceMonitor
GetServiceMonitors returns serviceMonitors list from the given templatePath In case of error it returns empty list
func RenderTemplate ¶
func RenderTemplate(t *testing.T, options *helm.Options, chartDir string, releaseName string, templateFiles []string, skipDependencies bool, extraHelmArgs ...string) string
RenderTemplate runs `helm template` to render the template given the provided options and returns stdout/stderr from the template command. If you pass in templateFiles, this will only render those templates. This function will fail the test if there is an error rendering the template.
func RenderTemplateE ¶
func RenderTemplateE(t *testing.T, options *helm.Options, chartDir string, releaseName string, templateFiles []string, skipDependencies bool, extraHelmArgs ...string) (string, error)
RenderTemplateE runs `helm template` to render the template given the provided options and returns stdout/stderr from the template command. If you pass in templateFiles, this will only render those templates.
func RenderTemplateFromValuesFile ¶
func RenderTemplateFromValuesFile(t *testing.T, valuesYaml string, templatePath string) (string, error)
RenderTemplateFromValuesYaml renders a template based on its path and a values file it uses package defaults for other parameters.
func RenderTemplateFromValuesString ¶
RenderTemplateFromValuesString renders a template based on its path and a values string it uses package defaults for other parameters. This function will fail the test if there is an error rendering the template.
func RenderTemplateFromValuesStringE ¶
func RenderTemplateFromValuesStringE(t *testing.T, valuesYaml string, templatePath string) (string, error)
RenderTemplateFromValuesStringE renders a template based on its path and a values string it uses package defaults for other parameters.
func SplitYaml ¶
SplitYaml splits a yaml string containing multiple yaml documents into strings containing one document each
func UnmarshalMultipleFromYaml ¶
UnmarshalMultipleFromYaml can unmarshal multiple objects of the same type from a yaml string containing multiple documents, separated by ---
func UnmarshalMultipleK8sObjectsFromYaml ¶
UnmarshalMultipleK8sObjectsFromYaml unmarshals all the objects in the provided yaml string into Kubernetes object. The returned type is runtime.Object, and these can later be cast to the right concrete type based on meta information.
Types ¶
This section is empty.