template

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtraFuncMap

func ExtraFuncMap() template.FuncMap

TxtFuncMap returns an aggregated template function map. Currently (custom functions + sprig)

func GetReferenceResourceName

func GetReferenceResourceName(ctx context.Context, c client.Client,
	clusterNamespace, clusterName, referencedResourceName string, clusterType libsveltosv1beta1.ClusterType,
) (string, error)

`referencedResourceName` supports templating and can dynamically reference fields from the target cluster object. This allows the name of the referenced resource to be constructed based on any attribute of the cluster, including its namespace, name, and other metadata.

func GetReferenceResourceNamespace

func GetReferenceResourceNamespace(ctx context.Context, c client.Client,
	clusterNamespace, clusterName, referencedResourceNamespace string, clusterType libsveltosv1beta1.ClusterType,
) (string, error)

GetReferenceResourceNamespace determines the namespace for a referenced resource. If no namespace is provided, the cluster's namespace is used by default. If a namespace is provided, it may be a Go template string that can reference any field of the cluster object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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