objecttemplate

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RelaxedJSONPathExpression

func RelaxedJSONPathExpression(pathExpression string) (string, error)

RelaxedJSONPathExpression attempts to be flexible with JSONPath expressions, it accepts:

  • metadata.name (no leading '.' or curly braces '{...}'
  • {metadata.name} (no leading '.')
  • .metadata.name (no curly braces '{...}')
  • {.metadata.name} (complete expression)

And transforms them all into a valid jsonpath expression:

{.metadata.name}

Types

type GenericClusterObjectTemplate

type GenericClusterObjectTemplate struct {
	corev1alpha1.ClusterObjectTemplate
}

func (*GenericClusterObjectTemplate) ClientObject

func (t *GenericClusterObjectTemplate) ClientObject() client.Object

func (*GenericClusterObjectTemplate) GetConditions

func (t *GenericClusterObjectTemplate) GetConditions() *[]metav1.Condition

func (*GenericClusterObjectTemplate) GetGeneration

func (t *GenericClusterObjectTemplate) GetGeneration() int64

func (*GenericClusterObjectTemplate) GetSources

func (*GenericClusterObjectTemplate) GetTemplate

func (t *GenericClusterObjectTemplate) GetTemplate() string

func (*GenericClusterObjectTemplate) UpdatePhase

func (t *GenericClusterObjectTemplate) UpdatePhase()

type GenericObjectTemplate

type GenericObjectTemplate struct {
	corev1alpha1.ObjectTemplate
}

func (*GenericObjectTemplate) ClientObject

func (t *GenericObjectTemplate) ClientObject() client.Object

func (*GenericObjectTemplate) GetConditions

func (t *GenericObjectTemplate) GetConditions() *[]metav1.Condition

func (*GenericObjectTemplate) GetGeneration

func (t *GenericObjectTemplate) GetGeneration() int64

func (*GenericObjectTemplate) GetSources

func (*GenericObjectTemplate) GetTemplate

func (t *GenericObjectTemplate) GetTemplate() string

func (*GenericObjectTemplate) UpdatePhase

func (t *GenericObjectTemplate) UpdatePhase()

type GenericObjectTemplateController

type GenericObjectTemplateController struct {
	// contains filtered or unexported fields
}

func NewClusterObjectTemplateController

func NewClusterObjectTemplateController(
	client, uncachedClient client.Client,
	log logr.Logger,
	dynamicCache dynamicCache,
	scheme *runtime.Scheme,
	restMapper meta.RESTMapper,
) *GenericObjectTemplateController

func NewObjectTemplateController

func NewObjectTemplateController(
	client, uncachedClient client.Client,
	log logr.Logger,
	dynamicCache dynamicCache,
	scheme *runtime.Scheme,
	restMapper meta.RESTMapper,
) *GenericObjectTemplateController

func (*GenericObjectTemplateController) Reconcile

func (*GenericObjectTemplateController) SetEnvironment

func (*GenericObjectTemplateController) SetupWithManager

func (c *GenericObjectTemplateController) SetupWithManager(
	mgr ctrl.Manager,
) error

type JSONPathFormatError

type JSONPathFormatError struct {
	Path string
}

func (*JSONPathFormatError) Error

func (e *JSONPathFormatError) Error() string

type SourceError

type SourceError struct {
	Source client.Object
	Err    error
}

func (*SourceError) Error

func (e *SourceError) Error() string

type SourceKeyNotFoundError

type SourceKeyNotFoundError struct {
	Key string
}

func (*SourceKeyNotFoundError) Error

func (e *SourceKeyNotFoundError) Error() string

type TemplateContext

type TemplateContext struct {
	Config      map[string]any `json:"config"`
	Environment map[string]any `json:"environment"`
}

type TemplateError

type TemplateError struct {
	Err error
}

func (*TemplateError) Error

func (e *TemplateError) Error() string

type TemplateTransformer

type TemplateTransformer struct {
	// contains filtered or unexported fields
}

func NewTemplateTransformer

func NewTemplateTransformer(tmplCtx TemplateContext) (*TemplateTransformer, error)

Jump to

Keyboard shortcuts

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