Documentation ¶
Index ¶
- Constants
- func InterpolateLeafNode(executor TemplateExecutor, template []byte, tagInterpolator tagInterpolator) (interface{}, error)
- func NewClusterConfigTemplateReader(template *v1alpha1.ClusterConfigTemplate) *clusterConfigTemplate
- func NewClusterDeploymentTemplateReader(template *v1alpha1.ClusterDeploymentTemplate) *clusterDeploymentTemplate
- func NewClusterImageTemplateReader(template *v1alpha1.ClusterImageTemplate) *clusterImageTemplate
- func NewClusterSourceTemplateReader(template *v1alpha1.ClusterSourceTemplate) *clusterSourceTemplate
- func NewClusterTemplateReader(template *v1alpha1.ClusterTemplate) *clusterTemplate
- type ClusterRunTemplate
- type Config
- type ConfigInput
- type Image
- type ImageInput
- type JsonPathContext
- type Labels
- type Lifecycle
- type Output
- type Outputs
- type Reader
- type Source
- type SourceInput
- type Stamper
- type StandardTagInterpolator
- type TemplateExecutor
Constants ¶
View Source
const SuccessStatusPath = `status.conditions[?(@.type=="Succeeded")].status`
Variables ¶
This section is empty.
Functions ¶
func InterpolateLeafNode ¶
func InterpolateLeafNode(executor TemplateExecutor, template []byte, tagInterpolator tagInterpolator) (interface{}, error)
InterpolateLeafNode merges the context variables anywhere a $(<<jsonPath>>)$ tag is found It validates that the jsonPath refers to objects within the context
func NewClusterConfigTemplateReader ¶ added in v0.6.0
func NewClusterConfigTemplateReader(template *v1alpha1.ClusterConfigTemplate) *clusterConfigTemplate
func NewClusterDeploymentTemplateReader ¶ added in v0.6.0
func NewClusterDeploymentTemplateReader(template *v1alpha1.ClusterDeploymentTemplate) *clusterDeploymentTemplate
func NewClusterImageTemplateReader ¶ added in v0.6.0
func NewClusterImageTemplateReader(template *v1alpha1.ClusterImageTemplate) *clusterImageTemplate
func NewClusterSourceTemplateReader ¶ added in v0.6.0
func NewClusterSourceTemplateReader(template *v1alpha1.ClusterSourceTemplate) *clusterSourceTemplate
func NewClusterTemplateReader ¶ added in v0.6.0
func NewClusterTemplateReader(template *v1alpha1.ClusterTemplate) *clusterTemplate
Types ¶
type ClusterRunTemplate ¶ added in v0.0.7
type ClusterRunTemplate interface { GetName() string GetResourceTemplate() v1alpha1.TemplateSpec GetLatestSuccessfulOutput(stampedObjects []*unstructured.Unstructured) (Outputs, *unstructured.Unstructured, error) }
func NewRunTemplateModel ¶ added in v0.0.5
func NewRunTemplateModel(template *v1alpha1.ClusterRunTemplate) ClusterRunTemplate
type ConfigInput ¶
type ConfigInput struct { Config interface{} `json:"config"` Name string `json:"name"` }
type ImageInput ¶
type ImageInput struct { Image interface{} `json:"image"` Name string `json:"name"` }
type JsonPathContext ¶
type JsonPathContext interface{}
JsonPathContext is any structure that you intend for jsonpath to treat as it's context. typically any struct with template-specific json structure tags
type Lifecycle ¶ added in v0.6.0
type Lifecycle string
func (*Lifecycle) IsImmutable ¶ added in v0.6.0
type Outputs ¶ added in v0.0.5
type Outputs map[string]apiextensionsv1.JSON
type Reader ¶ added in v0.6.0
type Reader interface { GetDefaultParams() v1alpha1.TemplateParams // GetResourceTemplate returns the actual representation of a resource to stamp, and how to handle it // TODO: we should be expecting something with a [ytt|template] interface, the health rules and params should // not be fetched here GetResourceTemplate() v1alpha1.TemplateSpec GetHealthRule() *v1alpha1.HealthRule IsYTTTemplate() bool GetLifecycle() *Lifecycle GetRetentionPolicy() v1alpha1.RetentionPolicy }
type Source ¶
type Source struct { URL interface{} `json:"url"` Revision interface{} `json:"revision"` }
type SourceInput ¶
type SourceInput struct { URL interface{} `json:"url"` Revision interface{} `json:"revision"` Name string `json:"name"` }
type Stamper ¶
type Stamper struct { TemplatingContext JsonPathContext Owner client.Object Labels Labels }
func StamperBuilder ¶
func StamperBuilder(owner client.Object, templatingContext JsonPathContext, labels Labels) Stamper
func (*Stamper) Stamp ¶
func (s *Stamper) Stamp(ctx context.Context, resourceTemplate v1alpha1.TemplateSpec) (*unstructured.Unstructured, error)
type StandardTagInterpolator ¶
type StandardTagInterpolator struct { Context JsonPathContext Evaluator evaluator }
func (StandardTagInterpolator) Evaluate ¶
func (t StandardTagInterpolator) Evaluate(tag string) (interface{}, error)
func (StandardTagInterpolator) InterpolateTag ¶
type TemplateExecutor ¶
type TemplateExecutor func(template, startTag, endTag string, f fasttemplate.TagFunc) (string, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.