Skip to content

API Reference#

Packages#

templates.stakater.com/v1alpha1#

Package v1alpha1 contains API Schema definitions for the templates.stakater.com v1alpha1 API group

Resource Types#

ClusterTemplateInstance#

ClusterTemplateInstance is the Schema for the clustertemplateinstances API

Field Description Default Validation
apiVersion string templates.stakater.com/v1alpha1
kind string ClusterTemplateInstance
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec ClusterTemplateInstanceSpec
status ClusterTemplateInstanceStatus

ClusterTemplateInstanceSpec#

ClusterTemplateInstanceSpec defines the desired state of ClusterTemplateInstance

Appears in: - ClusterTemplateInstance

Field Description Default Validation
template string Template is used to tell what to deploy in matched namespaces
selector LabelSelector Selector is used to filter namespaces where template needs to be deployed
sync boolean Sync is used to keep deployed instance and template in sync
parameters TemplateInstanceParameter array Parameters hold the values of the defined parameters in the template Optional: {}

TemplateInstanceParameter#

Appears in: - ClusterTemplateInstanceSpec - TemplateInstanceSpec

Field Description Default Validation
name string Name is the name of the parameter to set
value string Value is the value of the parameter to set

ClusterTemplateInstanceStatus#

ClusterTemplateInstanceStatus defines the observed state of ClusterTemplateInstance

Appears in: - ClusterTemplateInstance

Field Description Default Validation
conditions Condition array Status conditions Optional: {}
deployedNamespaces object (keys:string, values:DeployedNamespaceState) DeployedNamespaces is a list of namespaces where template has been deployed along with its state. Optional: {}
mappedSecrets object (keys:string, values:map[string]MappedResourcesState) MappedSecrets is a list of secrets which have been mapped along with its state. Optional: {}
mappedConfigmaps object (keys:string, values:map[string]MappedResourcesState) MappedConfigmaps is a list of configmaps which have been mapped along with its state. Optional: {}
templateManifestsHash string TemplateManifestsHash is used to ignore false-positive template.manifests update events Optional: {}
templateResourceMappingHash string TemplateResourceMappingHash is used to ignore false-positive template.resourceMappings update events Optional: {}
namespaceCount integer NamespaceCount tells the number of namespaces CTI matches Optional: {}

Template#

Template is the Schema for the templates API

Field Description Default Validation
apiVersion string templates.stakater.com/v1alpha1
kind string Template
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
resources TemplateResources Optional: {}
spec TemplateSpec
status TemplateStatus Optional: {}
parameters TemplateParameter array Parameters can be used to replace certain parts of the template. A parameter is referenced
by this format: ${NAME}, to parse the value as an expression write ${{NAME}} instead. Besides the
parameters defined here, the following predefined parameters can be used:
- ${NAMESPACE}: the namespace where the template instance was created
- ${TENANT}: the tenant name of the tenant that owns the namespace (if any)
Optional: {}

TemplateResources#

TemplateResources defines a templates resources

Appears in: - Template

Field Description Default Validation
manifests EmbeddedResource array manifest represents kubernetes resources that will be deployed into the target namespace Optional: {}
helm HelmConfiguration helm defines the configuration for a helm deployment Optional: {}
resourceMappings ResourceMapping ResourceMappings defines the secrets/configmaps which will be mapped into the target namespaces Optional: {}
gotemplate string gotemplate is a Go template with Sprig functions support which will be rendered to generate Kubernetes resources. Optional: {}

EmbeddedResource#

EmbeddedResource holds a kubernetes resource

Appears in: - TemplateResources

HelmConfiguration#

HelmConfiguration holds the helm configuration

Appears in: - TemplateResources

Field Description Default Validation
releaseName string The helm release name. If omitted the template name will be used Optional: {}
setValues HelmSetValue array Values in the form of name=value that will be passed to the helm command during
helm template
Optional: {}
values string The additional helm values to use. Expected block string Optional: {}
chart HelmChart Tells us where to find the helm chart to deploy

HelmSetValue#

HelmSetValue defines a name=value pair that will be passed to helm template

Appears in: - HelmConfiguration

Field Description Default Validation
name string The path of the value to set
value string The value to set
forceString boolean ForceString specifies if the parameter --set or --set-string should be used Optional: {}

HelmChart#

HelmChart holds the information needed to find a chart to deploy

Appears in: - HelmConfiguration

Field Description Default Validation
repository HelmChartRepository Load helm chart from a repository Optional: {}

HelmChartRepository#

HelmChartRepository defines a helm repository where TO can load a chart from

Appears in: - HelmChart

Field Description Default Validation
name string Name of the chart to deploy
version string Version is the version of the chart to deploy Optional: {}
repoUrl string The repo url to use Optional: {}
username HelmSecretRef The username to use for the selected repository Optional: {}
password HelmSecretRef The password to use for the selected repository Optional: {}

HelmSecretRef#

HelmSecretRef holds a secret reference to a secret

Appears in: - HelmChartRepository

Field Description Default Validation
key string
name string
namespace string Optional: {}

ResourceMapping#

Appears in: - TemplateResources

Field Description Default Validation
secrets Resource array Secrets consist of secrets which will be mapped to matching namespaces Optional: {}
configMaps Resource array ConfigMaps consist of configMaps which will be mapped to matching namespaces Optional: {}

Resource#

Appears in: - ResourceMapping

Field Description Default Validation
name string Name is the name of the resource Required: {}
namespace string Namespace is the namespace where the resource lives Required: {}

TemplateSpec#

Appears in: - Template

TemplateStatus#

Appears in: - Template

TemplateParameter#

Appears in: - Template

Field Description Default Validation
name string Name is the name of the parameter
value string Value is the default value of the parameter Optional: {}
required boolean If required is true, the template instance must
define this parameter, otherwise the deployment will fail.
Optional: {}
validation string Validation takes a regular expression as value to
verify the provided value does match expected values.
Optional: {}

TemplateInstance#

TemplateInstance is the Schema for the templatesinstance API

Field Description Default Validation
apiVersion string templates.stakater.com/v1alpha1
kind string TemplateInstance
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec TemplateInstanceSpec
status TemplateInstanceStatus Optional: {}

TemplateInstanceSpec#

TemplateInstanceSpec holds the expected cluster status of the template instance

Appears in: - TemplateInstance

Field Description Default Validation
template string The template to instantiate. This is an immutable field
sync boolean If true the template instance will keep the deployed resources in sync with the template. Optional: {}
parameters TemplateInstanceParameter array Parameters hold the values of the defined parameters in the template Optional: {}

TemplateInstanceStatus#

TemplateInstanceStatus describes the current status of the template instance in the cluster

Appears in: - TemplateInstance

Field Description Default Validation
status InstanceDeploymentStatus Status holds the template instances status
message string A human readable message indicating details about why the namespace is in this condition. Optional: {}
reason string A brief CamelCase message indicating details about why the namespace is in this state. Optional: {}
templateHash string TemplateHash is used to ignore false-positive template update events Optional: {}
templateManifests string TemplateManifests are the manifests that were rendered before Optional: {}
mappedSecrets object (keys:string, values:MappedResourcesState) MappedSecrets is a list of secrets which have been mapped along with its state. Optional: {}
mappedConfigmaps object (keys:string, values:MappedResourcesState) MappedConfigmaps is a list of configmaps which have been mapped along with its state. Optional: {}
observedAt Time LastAppliedAt indicates when the template was last applied Optional: {}

InstanceDeploymentStatus#

Underlying type: string

InstanceDeploymentStatus describes the status of template instance deployment as {"Deployed", "Failed", ""}

Appears in: - DeployedNamespaceState - MappedResourcesState - TemplateInstanceStatus

Field Description
Deployed InstanceDeploymentStatusDeployed describes a succeeded instance deployment
Failed InstanceDeploymentStatusFailed describes a failed instance deployment
`` InstanceDeploymentStatusPending describes a not yet deployed instance

DeployedNamespaceState#

Appears in: - ClusterTemplateInstanceStatus

Field Description Default Validation
templateManifests string TemplateManifests are the manifests that were rendered before Optional: {}
status InstanceDeploymentStatus

MappedResourcesState#

Appears in: - ClusterTemplateInstanceStatus - TemplateInstanceStatus

Field Description Default Validation
reason string Reason of resource mapping if failed Optional: {}
status InstanceDeploymentStatus