Skip to main content
Version: v3.9.0

Microservice template fields

Reference for kind: MicroserviceTemplate. Deploy and instantiation are on Microservice templates.

The CLI parses spec in non-strict mode.

Deploy
apiVersion: datasance.com/v3 # required, string
kind: MicroserviceTemplate # required, string
metadata:
name: my-ms-template # required, string
namespace: my-ecn # no, string
spec:
description: Example microservice template # no, string
variables: # no, list. Same shape as application template variables
- key: agent-name # required on each entry, string
description: Edgelet node name # no, string
defaultValue: edge-01 # no, any
microservice: # no, object. Same keys as Microservice. Stored template drops name, uuid, and a nested template
agent:
name: "{{agent-name}}"
images:
registry: remote
amd64: ghcr.io/datasance/example/api:1.0.0

Spec​

FieldTypeDescription
descriptionstringSummary for operators.
variableslistSame shape as application template variables.
variables[].keystringRequired on each entry.
variables[].descriptionstringOptional help text.
variables[].defaultValueanyDefault when the microservice YAML omits that override.
microserviceobjectPartial or full microservice spec. The Controller template engine fills placeholders.

microservice uses the same field names as Microservice fields. Placeholders such as "{{application}}" and "{{agent-name}}" are allowed. The stored template drops name, uuid, and a nested template.

spec.template on a microservice​

When you deploy kind: Microservice:

spec:
template:
name: my-ms-template
variables:
agent-name: edge-01
application: myapp

variables may be a map or a list of {key, value} pairs.

Create and update​

Deploy the same metadata.name again to update the template. Microservices already deployed from it are not updated automatically.

Group 3See anything wrong with the document? Help us improve it!