Templates
A template is a parameterized blueprint. It stores the shape of a workload and the variables you fill in later. It is not a running container, and it does not schedule anything onto an Edgelet node.
An application template is the blueprint for a whole app: the application group, its microservices, and the NATS account policy that belongs on that group. You use it when many sites should run the same app with different node names, ports, or other values.
A microservice template is the blueprint for one service. You use it when one container shape is reused inside several applications.
Instantiation is a separate step. The running object points at the template. An application sets spec.template to an application template. A microservice sets spec.template to a microservice template. The control plane expands the blueprint, fills in the variables, and creates the real application or microservice.
---
apiVersion: datasance.com/v3
kind: Application
metadata:
name: line-monitor
spec:
template:
name: line-monitor-template
Deploy the template before the application or microservice that names it. Use potctl deploy -f.
Each template lists variables, such as the Edgelet node name or a published port. You can store a default on the template and override it at instantiation. The same blueprint can then be deployed to many sites without copying the full application or microservice file.
On Datasance PoT, a template stays in the catalog until something instantiates it. If you only need one site and the YAML will not be reused, deploy the application or microservice directly. Templates pay off when the same layout is repeated.